This is a Kubernetes controller to manage BGP neighbors on an A10 device.
It uses the A10 API to manage the BGP neighbors and the Kubernetes API to add eligible nodes to the A10 device and remove them if they are not eligible.
Nodes are eligible if they are:
- labeled with the NODES_LABEL_SELECTOR label
- are ready
- are not cordoned
- have an external IP address
Actually, this controller doesn't control anything in K8S. It just uses the K8S API to watch for nodes events.
export KUBECONFIG=kubeconfig.yaml
export A10_ADDRESS=https://address
export A10_USERNAME=admin
export A10_PASSWORD=XXX
export A10_AS=12345
export A10_REMOTE_AS=54321
export NODES_LABEL_SELECTOR="bgp=cilium"
go run .- If kubeconfig is not set, the tool will use the in-cluster config.
export DEBUG=truewill enable debug logging.
Adjust the values in helm/values.yaml
helm upgrade --install a10-bgp-neighbor-controller ./helmmise installto install dev dependenciesgo run .to run the app locallytilt upto deploy app to a clustertilt downto tear down the appmise run publishto build and push the docker image to a registry