Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[blockscout-stack] migrations job does not use imagePullSecrets in case of using private image repository #61

Open
bcg-mmorca opened this issue Feb 17, 2025 · 0 comments

Comments

@bcg-mmorca
Copy link

Problem

When using blockscout stack with separate api configuration, database migrations handled through a kubernetes job instead of initContainers.

Although initContainers configured properly(using image pull secrets), when using private image repo, this is not the case for kubernetes job.

How to reproduce

Set separateApi: true and use private image repository for the images

The job will not be able to pull images with the following error

Failed to pull image "my_private_repo/blockscout:my_tag": rpc error: code = Unknown desc = failed to pull and unpack image "my_private_repo/blockscout:my_tag": failed to resolve reference "my_private_repo/blockscout:my_tag": pulling from host 'my_private_repo' failed with status code [manifests my_tag]: 401 Unauthorized

Solution

Adding imagePullSecrets in https://github.com/blockscout/helm-charts/blob/main/charts/blockscout-stack/templates/blockscout-migration-job.yaml will done nicely.

...
spec:
  template:
    spec:
      {{- with .Values.imagePullSecrets }}
      imagePullSecrets:
        {{- toYaml . | nindent 8 }}
      {{- end }}
     ....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant