A test project to evaluate the effectiveness of Rust and the Kube-rs framework for developing Kubernetes Operators.
# Create CDBootstrap CRD
kubectl create -f config/crd/cdbootstraps.cndev.nl.yaml# Run the Operator
KUBECONFIG=~/.kube/k3s.yaml
cargo fmt
cargo run# apply CDBootstrap sample
kubectl apply -f config/samples/cdbootstrap-example.yaml# Inject Token in Agent secret
export EPAT=$(echo "<pat_token>" | base64)
kubectl patch secret test-bootstrap -p '{"data":{"AZP_TOKEN": "'"$EPAT"'"}}'
# restart pods
kubectl scale deploy test-bootstrap --replicas=0 && kubectl scale deploy test-bootstrap --replicas=2