CZERTAINLY / CZERTAINLY-Helm-Charts

CZERTAINLY - Helm Charts
https://www.czertainly.com
MIT License
4 stars 2 forks source link

Hooks do not have ImagePullPolicy defined in Helm Chart #189

Closed lubohr closed 2 months ago

lubohr commented 5 months ago

Describe the bug Hooks where public images are used do not have an imagePullPolicy defined in the Helm chart. Without it, it is not possible to use images stored in the internal registry, which is defined in the global parameters.

To Reproduce

  1. Set global.image.registry, repository, pullSecrets to own registry and repository
  2. Deploy app Czertainly to k8S cluster
  3. czertainly-add-hosts-to-deployment-job-xxxxx pod not started, because ErrPullImage
  4. Failed to pull image "registry_host:port/czertainly/kubectl:1.27.3": failed to pull and unpack image "registry_host:port/czertainly/kubectl:1.27.3": failed to resolve reference "registry_host:port/czertainly/kubectl:1.27.3": failed to authorize: failed to fetch anonymous token: unexpected status from GET request to https://registry_host/jwt/auth?scope=repository%3Aczertainly%2Fkubectl%3Apull&service=container_registry: 403 Forbidden

Expected behavior A pull image will be performed and pod will start as with other microservices

Desktop (please complete the following information):

3keyroman commented 3 months ago

Hi @lubohr , according to your description it seems that the issue is not related to imagePullPolicy, but rather to missing imagePullSecrets in hooks that will cause 403 Forbidden when the container should be pulled from the private registry.

I believe that the PR #196 should resolve this issue, it includes both imagePullSecrets and imagePullPolicy in hooks according the data in values.yaml.

Do you have any comments to that?