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 upgrade broke the entire release. #5309

Open
droslean opened this issue Feb 11, 2025 · 0 comments
Open

Helm upgrade broke the entire release. #5309

droslean opened this issue Feb 11, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@droslean
Copy link

Describe the bug a clear and concise description of what the bug is.

After helm upgrade, I want getting errors like:

ts=2025-02-11T11:07:38.267796695Z level=info caller=/workspace/pkg/prometheus/server/operator.go:985 msg="failed to apply prometheus status subresource, trying again without scale fields" component=prometheus-controller err="failed to create typed patch object (monitoring/kube-prometheus-stack-prometheus; monitoring.coreos.com/v1, Kind=Prometheus): .status.selector: field not declared in schema"
ts=2025-02-11T11:07:38.310852183Z level=info caller=/workspace/pkg/alertmanager/operator.go:712 msg="failed to apply alertmanager status subresource, trying again without scale fields" component=alertmanager-controller err="failed to create typed patch object (monitoring/kube-prometheus-stack-alertmanager; monitoring.coreos.com/v1, Kind=Alertmanager): .status.selector: field not declared in schema"
ts=2025-02-11T11:07:38.483237329Z level=info caller=/workspace/pkg/prometheus/server/operator.go:985 msg="failed to apply prometheus status subresource, trying again without scale fields" component=prometheus-controller err="failed to create typed patch object (monitoring/kube-prometheus-stack-prometheus; monitoring.coreos.com/v1, Kind=Prometheus): .status.shards: field not declared in schema"
ts=2025-02-11T11:07:38.605491053Z level=info caller=/workspace/pkg/prometheus/server/operator.go:766 msg="sync prometheus" component=prometheus-controller key=monitoring/kube-prometheus-stack-prometheus
ts=2025-02-11T11:07:38.622452504Z level=info caller=/workspace/pkg/prometheus/server/operator.go:985 msg="failed to apply prometheus status subresource, trying again without scale fields" component=prometheus-controller err="failed to create typed patch object (monitoring/kube-prometheus-stack-prometheus; monitoring.coreos.com/v1, Kind=Prometheus): .status.shards: field not declared in schema"
ts=2025-02-11T11:07:38.93804047Z level=info caller=/workspace/pkg/prometheus/server/operator.go:985 msg="failed to apply prometheus status subresource, trying again without scale fields" component=prometheus-controller err="failed to create typed patch object (monitoring/kube-prometheus-stack-prometheus; monitoring.coreos.com/v1, Kind=Prometheus): .status.shards: field not declared in schema"

I tried to run helm upgrade with crds.enabled=true but it didn't help. I deleted the CRDs manually and tried to upgrade again, but now its failing with error:

Error: UPGRADE FAILED: [resource mapping not found for name: "kube-prometheus-stack-alertmanager" namespace: "monitoring" from "": no matches for kind "Alertmanager" in version "monitoring.coreos.com/v1"
ensure CRDs are installed first, resource mapping not found for name: "kube-prometheus-stack-prometheus" namespace: "monitoring" from "": no matches for kind "Prometheus" in version "monitoring.coreos.com/v1"
ensure CRDs are installed first]

But how can I install the CRDs manually?

The CustomResourceDefinition "alertmanagers.monitoring.coreos.com" is invalid: metadata.annotations: Too long: must have at most 262144 bytes
The CustomResourceDefinition "prometheuses.monitoring.coreos.com" is invalid: metadata.annotations: Too long: must have at most 262144 bytes
The CustomResourceDefinition "alertmanagerconfigs.monitoring.coreos.com" is invalid: metadata.annotations: Too long: must have at most 262144 bytes

In overall, helm upgrade broke the entire kube-prometheus-stack release.

What's your helm version?

version.BuildInfo{Version:"3.16.4", GitCommit:"7877b45b63f95635153b29a42c0c2f4273ec45ca", GitTreeState:"clean", GoVersion:"go1.22.9"}

What's your kubectl version?

v1.28.3

Which chart?

kube-prometheus-chart

What's the chart version?

v0.80.0

What happened?

No response

What you expected to happen?

No response

How to reproduce it?

No response

Enter the changed values of values.yaml?

No response

Enter the command that you execute and failing/misfunctioning.

see description

Anything else we need to know?

No response

@droslean droslean added the bug Something isn't working label Feb 11, 2025
@droslean droslean changed the title [name of the chart e.g. prometheus-kube-stack] Issue Title Helm upgrade broke the entire release. Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant