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

Helm: Container create-secret in job-provisioner is not completing successful #8403

Closed
basvdl opened this issue Feb 4, 2023 · 0 comments · Fixed by #8449
Closed

Helm: Container create-secret in job-provisioner is not completing successful #8403

basvdl opened this issue Feb 4, 2023 · 0 comments · Fixed by #8449

Comments

@basvdl
Copy link

basvdl commented Feb 4, 2023

Describe the bug
Container create-secret in job-provisioner is not completing successful, therefor the Helm deployment is reported as failed, which makes it difficult to automate the deplyment.

The default value secretNamespace: "{{ .Release.Namespace }}" set in in the values.yaml (line 586) is not rendered properly inside templates/provisioner/job-provisioner.yaml (line 106, 96, 105).

Output from kubectl -n gel-lab describe job enterprise-logs-provisioner

    Command:
      /bin/bash
      -exuc
      kubectl --namespace "gel-lab" create secret generic "enterprise-logs-provisioned-self-monitoring" \
        --from-literal=username="self-monitoring" \
        --from-literal=password="$(cat /bootstrap/token-self-monitoring)"
      kubectl --namespace "{{ .Release.Namespace }}" create secret generic "enterprise-logs-provisioned-self-monitoring" \
        --from-literal=username="self-monitoring" \
        --from-literal=password="$(cat /bootstrap/token-self-monitoring)"

Error from pod:

enterprise-logs-provisioner-d58sx create-secret error: failed to create secret secrets "enterprise-logs-provisioned-self-monitoring" already exists

Error from Helm install:

Error: failed post-install: job failed: BackoffLimitExceeded

Helm list output:

helm list -n gel-lab
NAME                        	NAMESPACE	REVISION	UPDATED                             	STATUS  	CHART          	APP VERSION
gel-lab                     	gel-lab  	1       	2023-02-04 14:55:41.974468 +0100 CET	failed  	loki-4.4.2     	2.7.2

To Reproduce
Install Loki with config below using Helm and wait till Helm returns failed post-install

Run to kubectl get job -n gel-lab and check the completion counter for the provisioner

NAME                          COMPLETIONS   DURATION   AGE
enterprise-logs-provisioner   0/1           5m54s      5m54s
enterprise:
  enabled: true
  useExternalLicense: true
  externalLicenseName: gel-license
  image:
    tag: v1.6.1

read:
  # true will run two (read, write) targets, false will run 3 (read, write, backend) targets.
  # not yet supported in v1.6.1
  legacyReadTarget: true

Environment:

  • Kubernetes
  • Helm chart version 4.4.2
  • Helm version version.BuildInfo{Version:"v3.7.2", GitCommit:"663a896f4a815053445eec4153677ddc24a0a361", GitTreeState:"clean", GoVersion:"go1.17.3"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants