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-state-metrics] Installation failed #3228

Closed
rneto12 opened this issue Apr 12, 2023 · 6 comments · Fixed by #3233
Closed

[kube-state-metrics] Installation failed #3228

rneto12 opened this issue Apr 12, 2023 · 6 comments · Fixed by #3233
Labels
bug Something isn't working

Comments

@rneto12
Copy link

rneto12 commented Apr 12, 2023

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

Kube-state-metrics installation failed in this new chart version

What's your helm version?

3.11.2

What's your kubectl version?

1.25.4

Which chart?

kube-state-metrics

What's the chart version?

5.4.0

What happened?

Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: error validating "": error validating data: [ValidationError(Deployment.spec.template.spec.securityContext): unknown field "allowPrivilegeEscalation" in io.k8s.api.core.v1.PodSecurityContext, ValidationError(Deployment.spec.template.spec.securityContext): unknown field "capabilities" in io.k8s.api.core.v1.PodSecurityContext]

What you expected to happen?

kube-state-metrics installed

How to reproduce it?

helm install kube-state-metrics prometheus-community/kube-state-metrics -n kube-system

Enter the changed values of values.yaml?

NONE

Enter the command that you execute and failing/misfunctioning.

helm install kube-state-metrics prometheus-community/kube-state-metrics -n kube-system

Anything else we need to know?

On deployments, maybe the securityContext should be under container spec, like Deployment.spec.template.spec.containers.securityContext.

https://v1-25.docs.kubernetes.io/docs/tasks/configure-pod-container/security-context/

@rneto12 rneto12 added the bug Something isn't working label Apr 12, 2023
@pemaxim
Copy link

pemaxim commented Apr 12, 2023

I have the exact same error.

helm: 3.7.1
kubectl 1.24.9
chart: kube-state-metrics
version: 5.4.0

@robertlindner
Copy link
Contributor

The fields allowPrivilegeEscalation and capabilities are only defined in containerSecurityContext but the chart tries to set them in PodSecurityContext

@ramdaspotale
Copy link

i wonder if maintainers do care to test before merging changes into main and releasing it. it does not work on k8s version 1.24 and 1.26 as well @mrueg @jcpunk @dotdc

@dotdc
Copy link
Member

dotdc commented Apr 13, 2023

We do care and are generally doing tests, but everyone can make mistakes, being rude doesn't help anyone.

Please use 5.3.0 or wait for 5.4.1 once #3233 is merged.

@ramdaspotale
Copy link

@dotdc I sincerely apologize for my rude remarks and appreciate your quick action to fix it.

@dotdc
Copy link
Member

dotdc commented Apr 15, 2023

Should be good in kube-state-metrics-5.5.0

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

Successfully merging a pull request may close this issue.

5 participants