I use CircleCI to build a go binary that I want to run in a pod installed by Helm charts. I want to move the binary from CircleCI to the remote cluster so it's available when the pod starts. I know it's possible with volumes, like ConfigMap or Secrets but I'm not sure what the best way to do this.
I once made it work with a private docker registry and a kubernetes Secrets for the credentials of the registry but I don't like this option. I don't want to have to build and push a new docker image on every binary change.
version: 2.1
jobs:
build_and_deploy:
docker:
- image: circleci/golang:1.12.7
steps:
- checkout
- run: go get -v -t -d ./...
- run: go build cmd/main.go
- run: ...
- run: helm install
workflows:
version: 2
build:
jobs:
- build_and_deploy:
The expected result should be a new binary available on the cluster every time the job runs.