skaffold
skaffold copied to clipboard
`helm repo add` for skaffold init
See #2039 for context.
This assumes that we can somehow detect the helm repos from the users helm charts and then try a helm repo add
during skaffold init
. We need to understand this better. Help wanted!
I think this needs to be done on a Skaffold build: consider the case where a developer is trying to do a build on a new machine, where no Helm repositories have been configured.
So the Helm builder should ensure Helm repositories are defined for all of the remote repositories referenced in the skaffold.yaml
and in the chart dependencies.
From my understanding, skaffold init
just helps to build an initial skaffold.yaml file. Adding support to it for Helm configuration would be nice, but the helm add ...
and helm install ...
commands should probably still be performed on deploy to accommodate those of us creating our own custom skaffold.yaml. The skaffold init
could at least create the necessary skaffold deploy:
config to connect to a Helm repo on deploy though.
There is one integral piece of functionality that is related to this Helm configuration I believe Skaffold is currently missing: the ability to authenticate to a private Helm repo via the deploy:
process. The repo
and remoteChart
options currently allow a remote Helm repo to be used in deploy, but there are a couple of options that are necessary to allow authentication to private repositories. I propose adding username
and password
options to make those current Helm authentication options usable to Skaffold.
I go into greater detail on that issue here: https://github.com/GoogleContainerTools/skaffold/issues/7255
This Skaffold example that highlights repo
and remoteChart
options should also be updated to provide examples for how to add authentication to private Helm repos:
https://github.com/GoogleContainerTools/skaffold/tree/main/examples/helm-remote-repo
I had this problem as well, but I solved it by removing the helm repo name from remoteChart
in the skaffold.yaml
file:
old file:
deploy:
helm:
releases:
- name: prometheus-operator
repo: https://prometheus-community.github.io/helm-charts
remoteChart: prometheus-community/kube-prometheus-stack
new one:
deploy:
helm:
releases:
- name: prometheus-operator
repo: https://prometheus-community.github.io/helm-charts
remoteChart: kube-prometheus-stack