An open API service indexing awesome lists of open source software.

https://github.com/linode/dbaas-lke-acl-sync

A Kubernetes service that automatically syncs LKE node IP addresses with Linode Managed Database access lists, ensuring seamless connectivity between your Kubernetes workloads and managed databases.
https://github.com/linode/dbaas-lke-acl-sync

Last synced: 22 days ago
JSON representation

A Kubernetes service that automatically syncs LKE node IP addresses with Linode Managed Database access lists, ensuring seamless connectivity between your Kubernetes workloads and managed databases.

Awesome Lists containing this project

README

          

# LKE DBaaS ACL Syncer Demo
### THIS REPO IS FOR DEMONSTRATION PURPOSES ##

A service that adds LKE node IP addresses t the allow list for a given of list of Linode Managed Database (PostgreSQL or MySQL) clusters.

## Features

- Lists LKE nodes frequently and get a list of IP addresses
- Updates `allow_list` in Linode Managed Database
- Stores current state in a Kubernetes ConfigMap for tracking
- Exposes a `/health` endpoint for monitoring
- Exposes a `/force-next-update` endpoint to force updating
- Built with FastAPI and Kubernetes Python client

## Environment Variables
### Required:
| Name | Description |
|-----------------------------|-------------------------------------------------------|
| `LINODE_API_KEY` | Linode personal access token |
| `DATABASE_PG_CLUSTER_IDS` | ID of your Linode Managed DB cluster |
| `DATABASE_MYSQL_CLUSTER_IDS`| `postgresql` or `mysql` |

### Optional:
| Name | Description |
|-----------------------|-------------------------------------------------------|
| `NODES_CONFIGMAP_NAME`| The name of the configmap to store list of current |
| | addresses. (default: "lke-node-ips") |
| `NAMESPACE` | The namespace for the configmap to store list of |
| | current addresses. (default: "default") |
| `LOG_LEVEL` | Logging level (`DEBUG`, `INFO`, etc.) |

## Running Locally

```bash
pip install -r requirements.txt
fastapi run app/main.py --port 8000
```

## Docker
```bash
docker build -t lke-dbaas-acl-sync-service-demo:latest .
docker run -p 8000:8000 \
--env-file .env \
-v ~/.kube/config:/etc/kubeconfig \
-e KUBECONFIG=/etc/kubeconfig \
--name lke-dbaas-acl-sync-service \
lke-dbaas-acl-sync-service-demo:latest
```

## Kubernetes
```bash
./install.sh
```