This is a Kubernetes controller which watches for newly created EKS clusters and configures ArgoCD to provision software to it via gitops.
When a new EKS Cluster is created in Crossplane, this controller creates the following:
- a Kubernetes cluster in ArgoCD
- an
AppProjectin ArgoCD which references the cluster - an
Applicationin this project which references a git repo
All manifests in the git repo are automatically deployed to the EKS cluster
Use ko to build and deploy:
### build Go package and deploy ############
<https://cloud.google.com/blog/topics/developers-practitioners/ship-your-go-applications-faster-cloud-run-ko>
brew install ko
ko login --username exocode --password # change "exocode" to your username
export KO_DOCKER_REPO=index.docker.io/exocode/crossargo-sync # for docker hub
ko publish . # creates sha digest as tag
ko publish . --bare # creates :latest and not a sha digest
ko apply -f deployment.yaml