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] support --kubelet-endpointslice=true #4897

Open
jihuiyang opened this issue Oct 3, 2024 · 4 comments · May be fixed by #4899
Open

[kube-prometheus-stack] support --kubelet-endpointslice=true #4897

jihuiyang opened this issue Oct 3, 2024 · 4 comments · May be fixed by #4899
Labels
bug Something isn't working

Comments

@jihuiyang
Copy link

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

with 65.0.0, --kubelet-endpointslice=true feature is available. please support setting

        - --kubelet-endpoints=false
        - --kubelet-endpointslice=true

to the operator in values

also when i tried enabling it, operator failed to run due to

ts=2024-10-03T22:27:05.878020844Z level=warn caller=/home/runner/work/prometheus-operator/prometheus-operator/cmd/operator/main.go:556 msg="missing permission on resource 'endpointslices' (group: \"discovery.k8s.io\")" reason="missing \"create\" permission on resource \"endpointslices\" (group: \"discovery.k8s.io\") for namespace \"kube-system\""
ts=2024-10-03T22:27:05.878065181Z level=warn caller=/home/runner/work/prometheus-operator/prometheus-operator/cmd/operator/main.go:556 msg="missing permission on resource 'endpointslices' (group: \"discovery.k8s.io\")" reason="missing \"update\" permission on resource \"endpointslices\" (group: \"discovery.k8s.io\") for namespace \"kube-system\""
ts=2024-10-03T22:27:05.878072703Z level=warn caller=/home/runner/work/prometheus-operator/prometheus-operator/cmd/operator/main.go:556 msg="missing permission on resource 'endpointslices' (group: \"discovery.k8s.io\")" reason="missing \"delete\" permission on resource \"endpointslices\" (group: \"discovery.k8s.io\") for namespace \"kube-system\""

looks like in clusterrole/kube-prometheus-stack-operator
you only have

- apiGroups:
  - discovery.k8s.io
  resources:
  - endpointslices
  verbs:
  - get
  - list
  - watch

please update it to

- apiGroups:
  - discovery.k8s.io
  resources:
  - endpointslices
  verbs:
  - get
  - create
  - update
  - delete
  - list
  - watch

What's your helm version?

3.16.1

What's your kubectl version?

1.29.1

Which chart?

kube-prometheus-stack

What's the chart version?

65.0.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.

command works, i need to enable new functionality

Anything else we need to know?

No response

@jihuiyang jihuiyang added the bug Something isn't working label Oct 3, 2024
@DrFaust92
Copy link
Contributor

Hi, doesnt this flag do this

serviceDiscoveryRole: {{ .Values.prometheus.prometheusSpec.serviceDiscoveryRole }}
?

@jihuiyang-x
Copy link

jihuiyang-x commented Oct 4, 2024

This tells prometheus to discover targets based on endpoints vs endpointslices.
Th support for creating kubelet endpointslices via prom-operator is a new feature this is a new change in 0.77.0. prometheus-operator/prometheus-operator#6882. Need to add option to set

- --kubelet-endpoints=false
- --kubelet-endpointslice=true

in operator args. and also modify the discovery.k8s.io apigroup

@DrFaust92
Copy link
Contributor

@jihuiyang went over upstream PR. will add those permissions to chart

@DrFaust92 DrFaust92 linked a pull request Oct 4, 2024 that will close this issue
3 tasks
@jihuiyang-x
Copy link

@DrFaust92 is this change good to merge?

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.

3 participants