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

[kube-prometheus-stack] Default thanos-ruler name too long #4511

Closed
vitaliyf opened this issue May 2, 2024 · 2 comments · Fixed by #4527
Closed

[kube-prometheus-stack] Default thanos-ruler name too long #4511

vitaliyf opened this issue May 2, 2024 · 2 comments · Fixed by #4527
Labels
bug Something isn't working

Comments

@vitaliyf
Copy link
Contributor

vitaliyf commented May 2, 2024

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

Upgrading to kube-prometheus-stack version 58.x with thanosRuler.enabled=true broke thanos-ruler, with:

create Pod thanos-ruler-prometheus-kube-prometheus-thanos-ruler-0 in StatefulSet thanos-ruler-prometheus-kube-prometheus-thanos-ruler failed error: Pod "thanos-ruler-prometheus-kube-prometheus-thanos-ruler-0" is invalid: [spec.volumes[3].name: Invalid value: "thanos-ruler-prometheus-kube-prometheus-thanos-ruler-rulefiles-0": must be no more than 63 characters, spec.containers[0].volumeMounts[4].name: Not found: "thanos-ruler-prometheus-kube-prometheus-thanos-ruler-rulefiles-0", spec.containers[1].volumeMounts[0].name: Not found: "thanos-ruler-prometheus-kube-prometheus-thanos-ruler-rulefiles-0"]

this sounds similar to #2408 and #3020 and I suspect regressed because of #4439

What's your helm version?

version.BuildInfo{Version:"v3.14.4", GitCommit:"81c902a123462fd4052bc5e9aa9c513c4c8fc142", GitTreeState:"clean", GoVersion:"go1.21.9"}

What's your kubectl version?

v1.28.9

Which chart?

kube-prometheus-stack

What's the chart version?

58.3.1

What happened?

The diff between helm template of 58.0.0 and 58.0.1 changes ThanosRuler's name, making it slightly too long:

<   name: kube-prometheus-stack-thanos-ruler
>   name: prometheus-kube-prometheus-thanos-ruler

What you expected to happen?

No response

How to reproduce it?

No response

Enter the changed values of values.yaml?

thanosRuler:
  enabled: true
cleanPrometheusOperatorObjectNames: false

Enter the command that you execute and failing/misfunctioning.

helm upgrade --install prometheus prometheus-community/kube-prometheus-stack --values ourfile.yaml --version 58.3.1

Anything else we need to know?

/cc @than-pet since you worked on #4439

@vitaliyf vitaliyf added the bug Something isn't working label May 2, 2024
@zeritti zeritti changed the title [prometheus-kube-stack] Default thanos-ruler name too long [kube-prometheus-stack] Default thanos-ruler name too long May 4, 2024
@than-pet
Copy link
Contributor

than-pet commented May 9, 2024

@vitaliyf i could reproduce the issue. You are correct.
The underlying issue is that the operator creates a configmap with the following pattern: thanos-ruler-${.Values.ube-prometheus-stack.thanosRuler.crname}-rulefiles-0, which must be no more than 63 characters.

The issue introduced by this

I will commit a fix to restrict the length of the string

@vitaliyf
Copy link
Contributor Author

Confirmed fixed. Thank you!

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
2 participants