Skip to content
Distr
Book DemoStart free trialLogin

Helm Chart Registry Authentication

Distr is an OCI artifact registry that is compliant with the OCI distribution specification. As such, it can be used to host container images, Helm charts and many other types of artifact. Distr requires authentication to access the registry API, but our controllers can inject the relevant credentials where they are needed.

A common use-case is to host both a Helm chart and related container images on Distr. In this case the controller has to create a Secret resource in the same namespace as the helm release and supply that as an image pull secret to workloads created as part of the Helm release. To take advantage of this feature, you have to include one or more imagePullSecrets or pullSecrets entries in the values.yaml field of your application version where you want the controller to inject the secret name. For example:

imagePullSecrets:
- name: foo
myAppServer:
imagePullSecrets: []
myAppDb:
imagePullSecrets: {}
image:
pullSecrets: []
worker:
imagePullSecrets:
- ''

will be transformed into

imagePullSecrets:
- name: foo
- name: sh.distr.agent.v1.xxxxxx.pull
myAppServer:
imagePullSecrets:
- name: sh.distr.agent.v1.xxxxxx.pull
myAppDb:
# not changed because it is not an array
imagePullSecrets: {}
image:
pullSecrets:
- name: sh.distr.agent.v1.xxxxxx.pull
worker:
imagePullSecrets:
- sh.distr.agent.v1.xxxxxx.pull

The controller adds the secret as name: ... by default. Some charts expect plain strings instead, e.g. imagePullSecrets: [foo]. If an array is non-empty and every entry is a string, the controller adds the secret name as a string as well. To get this form without a secret of your own, put an empty string into the array, as worker does above. The controller replaces the empty string with its secret name.