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.
- Host: GitHub
- URL: https://github.com/linode/dbaas-lke-acl-sync
- Owner: linode
- License: apache-2.0
- Created: 2025-07-01T16:40:15.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-10-20T19:31:05.000Z (8 months ago)
- Last Synced: 2026-02-11T01:36:16.429Z (4 months ago)
- Language: Python
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING
- License: LICENSE
- Codeowners: CODEOWNERS
- Authors: AUTHORS
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
```