You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This idea came from a discussion with @jonathan-innis on the Kubernetes Slack #karpenter channel.
Proposal: Add a make build target that will run ko build to build and push the docker images. The command would run the same ko commands as the current apply task:
build:
$(WITH_GOFLAGS) ko build -B github.com/aws/karpenter/cmd/controller
$(WITH_GOFLAGS) ko build -B github.com/aws/karpenter/cmd/webhook
Rationale: Support development use cases where using the make apply task is not desirable because it runs a helm upgrade. You may be working on a cluster that has a helm config that differs from the default values in this repo.
In my particular case the development cluster I was working against has karpenter installed and managed by an argoCD instance with various rules and logic around the values.yaml files that are applied. All that I really needed to do to test my karpenter changes was to build/push and patch new docker images into them without any use of helm.
In my initial attempts at doing this I was using the ko build ... commands pulled out of the Makefile. This led to an incorrect webhook build because I forgot to include the GOFLAGS=-tag=$CLOUD_PROVIDER env var for ko.
Workaround: I am currently working around this by incorporating these commands into my dev workflow:
GOFLAGS="-tags=${CLOUD_PROVIDER}" ko build -B github.com/aws/karpenter/cmd/webhook -t $TAGGOFLAGS="-tags=${CLOUD_PROVIDER}" ko build -B github.com/aws/karpenter/cmd/controller -t $TAG
Community Note
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
The text was updated successfully, but these errors were encountered:
This idea came from a discussion with @jonathan-innis on the Kubernetes Slack #karpenter channel.
Proposal: Add a make
build
target that will runko build
to build and push the docker images. The command would run the sameko
commands as the currentapply
task:build: $(WITH_GOFLAGS) ko build -B github.com/aws/karpenter/cmd/controller $(WITH_GOFLAGS) ko build -B github.com/aws/karpenter/cmd/webhook
Rationale: Support development use cases where using the
make apply
task is not desirable because it runs ahelm upgrade
. You may be working on a cluster that has a helm config that differs from the default values in this repo.In my particular case the development cluster I was working against has karpenter installed and managed by an argoCD instance with various rules and logic around the values.yaml files that are applied. All that I really needed to do to test my karpenter changes was to build/push and patch new docker images into them without any use of helm.
In my initial attempts at doing this I was using the
ko build ...
commands pulled out of the Makefile. This led to an incorrect webhook build because I forgot to include theGOFLAGS=-tag=$CLOUD_PROVIDER
env var forko
.Workaround: I am currently working around this by incorporating these commands into my dev workflow:
Community Note
The text was updated successfully, but these errors were encountered: