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

Duplicate annotation in deployment-sidekiq #48

Open
Azuki-bar opened this issue Feb 24, 2023 · 2 comments
Open

Duplicate annotation in deployment-sidekiq #48

Azuki-bar opened this issue Feb 24, 2023 · 2 comments

Comments

@Azuki-bar
Copy link

I tried to deploy using helm and could not, so I identified the cause.
The cause was a duplicate annotation key.

deployment-sidekiq.yaml file has duplicate annotation key checksum/config-secrets. k8s requires a unique annotation key, so installing mastodon chart failed.

I will show you how to reproduce it in the next section. I tried with 3934da1.

reproduct

$ helm dependency update
$ helm template . \
  --values dev-values.yaml \
  --output-dir rendered-templates
$ cat rendered-templates/mastodon/templates/deployment-sidekiq.yaml
...
annotations:
  # roll the pods to pick up any db migrations or other changes

  rollme: "1"
  checksum/config-secrets: "c988861c081539520cbb260007ba5b9292a189a02254ba616eb4e67445f210d0"
  checksum/config-configmap: "8ed3ba7c668487c141b93a946bfdb2b3caebf3f8ae5efccbe922cbedc711fa6d"
  checksum/config-secrets: "58c287f58852f11e58b06dbea32d36751824156324743461f864565d9ebbb969"
...
# -> the annotation `checksum/config-secrets` in L31, L33 were duplicated.

I think #38 may be a hint.

@iavael
Copy link

iavael commented May 10, 2023

@renchap please look at this problem, helm chart is broken now, fix is trivial and couple of PRs are already here. Looks like an easy hanging fruit.

@iavael
Copy link

iavael commented Jun 16, 2023

Short summary for context of this problem:
while helm ignores duplicate annotations kustomize (that can deploy helm charts too) doesn't kubernetes-sigs/kustomize#3480 because of limitation in go-yaml go-yaml/yaml#751
And kustomize is used by gitops tool fluxcd fluxcd/flux2#1522 fluxcd/helm-controller#286 fluxcd/helm-controller#283

The easiest fis is to remove duplicate keys from rendered resources

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

Successfully merging a pull request may close this issue.

2 participants