Skip to content

fix(): values path for CRDs when running upgrade job#6959

Open
termin-natetor wants to merge 1 commit into
prometheus-community:mainfrom
termin-natetor:fix-crds-upgrade-job
Open

fix(): values path for CRDs when running upgrade job#6959
termin-natetor wants to merge 1 commit into
prometheus-community:mainfrom
termin-natetor:fix-crds-upgrade-job

Conversation

@termin-natetor

Copy link
Copy Markdown

[kube-prometheus-stack] Fix incorrect values path in CRD upgrade job template

What this PR does / why we need it:

When rolling out a major upgrade from 85.0->86.0, I noticed that even when I tried to disable the upgrade Job (we use Argo), it was still being created.

I poked around and it looks like the Helm template is using the wrong key:
.Values.upgradeJob.* instead of .Values.crds.upgradeJob.*

Special notes for your reviewer

Checklist

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [prometheus-couchdb-exporter])

Signed-off-by: Nathaniel Allen <nathaniel.allen@gridfuse.com>
@termin-natetor

Copy link
Copy Markdown
Author

Per docs, at'ing the maintainers:
@andrewgkew
@gianrubio
@gkarthiks
@jkroepke
@Xtigyro
@QuentinBisson

@jkroepke

jkroepke commented Jun 1, 2026

Copy link
Copy Markdown
Member

Per docs, at'ing the maintainers:

which docs telling you to at'ing the maintainers?

@jkroepke

jkroepke commented Jun 1, 2026

Copy link
Copy Markdown
Member

Mention that the jobs lives in the sub chart crd. Values from the main. chart to the sub chart needs to be prefixed by the sub chart name itself. Any values under .Values.crds will be passed as .Values to the sub chart. .Values.upgradeJob.* is the right key inside the template.

@termin-natetor

Copy link
Copy Markdown
Author

Hiya,

Per docs, at'ing the maintainers:

which docs telling you to at'ing the maintainers?
When you open up a PR, it is part of the template - is that generated by github and not your repo?

In any case thanks for responding. I suspected that would be the case but that's not the behavior I see in my chart, is there a test for that? I had to set values to this in our ArgoCD wrapper chart to get the behavior I expected (no upgrade job):

kube-prometheus-stack:
  upgradeJob:
    enabled: false
  crds:
    upgradeJob:
      # explicitly disable the upgrade job so Argo can manage it
      enabled: false

@jkroepke

jkroepke commented Jun 2, 2026

Copy link
Copy Markdown
Member

This should be sufficent:

kube-prometheus-stack:
  crds:
    upgradeJob:
      # explicitly disable the upgrade job so Argo can manage it
      enabled: false

Ref:

The default is false anyways.

@termin-natetor

Copy link
Copy Markdown
Author

Thats not the behavior I got, here is a little excerpt from Argo:

Screenshot 2026-06-01 at 14 53 46

As soon as I added in the "reduntant" flag, as I showed, it worked - i.e. the job was not created and the upgrade was successful.

@jkroepke

jkroepke commented Jun 8, 2026

Copy link
Copy Markdown
Member

The chart itself works as expected:

  • crds.upgradeJob.enabled=false -> No Upgrade Job
  • crds.upgradeJob.enabled=true -> Upgrade Job present.
jok@joe-air ~ % helm template kube-prometheus-stack -n monitoring oci://ghcr.io/prometheus-community/charts/kube-prometheus-stack --set crds.upgradeJob.enabled=false | grep kube-prometheus-stack-crds-upgrade
Pulled: ghcr.io/prometheus-community/charts/kube-prometheus-stack:86.2.0
Digest: sha256:2182a9de8cd44d7a7ac98aa04743de4335766376cc896b9a6e099c61e81fd2d3
jok@joe-air ~ % helm template kube-prometheus-stack -n monitoring oci://ghcr.io/prometheus-community/charts/kube-prometheus-stack --set crds.upgradeJob.enabled=true | grep kube-prometheus-stack-crds-upgrade
Pulled: ghcr.io/prometheus-community/charts/kube-prometheus-stack:86.2.0
Digest: sha256:2182a9de8cd44d7a7ac98aa04743de4335766376cc896b9a6e099c61e81fd2d3
  name: kube-prometheus-stack-crds-upgrade
  name: kube-prometheus-stack-crds-upgrade
  name: kube-prometheus-stack-crds-upgrade
  name: kube-prometheus-stack-crds-upgrade
    name: kube-prometheus-stack-crds-upgrade
  name: kube-prometheus-stack-crds-upgrade
  name: kube-prometheus-stack-crds-upgrade
      serviceAccountName: kube-prometheus-stack-crds-upgrade
            name: kube-prometheus-stack-crds-upgrade

With this PR, the value to enable the crds-upgrade Job would be --set crds.crds.upgradeJob.enabled=true

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 this pull request may close these issues.

2 participants