0

I am trying to deploy bitnami moodle chart with custom image hosted on gitlab. When I use the registry in pod the image gets downloaded. However, when used in the chart, it gives the error below with access forbiden. Tested on minikube, and private cluster.

*Failed to pull image "registry.gitlab.com/<repo>/01976966/container/external/moodle:3.11.4-debian-10-r0": rpc error: code = Unknown desc = Er ││ ror response from daemon: Head "https://registry.gitlab.com/v2/<repo>/01976966/container/external/moodle/manifests/3.11.4-debian-10-r0": denied: access forbidden*

This settings are used in parent chart values.yaml:

image:
      registry: registry.gitlab.com
      repository: <repo>/01976966/container/external/moodle
      tag: 3.11.4-debian-10-r0
      pullPolicy: Always
      pullSecrets:
        - name: <secret-name>

Base chart in question: https://github.com/bitnami/charts/tree/master/bitnami/moodle/

  • You have `- name:` in your `pullSecrets:` but [the values uses just the Secret name](https://github.com/bitnami/charts/blob/master/bitnami/moodle/values.yaml#L65) [and here](https://github.com/bitnami/charts/blob/master/bitnami/common/templates/_images.tpl#L44); but, ultimately the answer is "did it end up generating the `PodSpec` you expected," and start debugging from there – mdaniel Nov 16 '21 at 16:22
  • This is the answer. Thank you! I wouldn't spot it. – dominik-devops Nov 16 '21 at 22:13

1 Answers1

0

You have

image:
  pullSecrets:
  - name: the-secret-name

but their values uses just the Secret name and as seen here

You'll want to just make a list of the secret names:

image:
  pullSecrets:
  - the-secret-name
mdaniel
  • 2,338
  • 1
  • 8
  • 13