CHANGE: Migrate service discovery to EndpointSlices
Endpoints are deprecated in k8s 1.33, to avoid warnings and stay upto-date with upstream k8s we need to move to EndpointSlices.
This commit sets the field serviceDiscoveryRole
to EndpointSlices and updates the RBAC permissions on endpointslice resoures.
Adds --kubelet-endpointslice arg to the operator.
Related-to prometheus-operator/kube-prometheus#2646
Description
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
Type of change
What type of changes does your code introduce to the kube-prometheus? Put an x in the box that apply.
- [x]
CHANGE(fix or feature that would cause existing functionality to not work as expected) - [ ]
FEATURE(non-breaking change which adds functionality) - [ ]
BUGFIX(non-breaking change which fixes an issue) - [ ]
ENHANCEMENT(non-breaking change which improves existing functionality) - [ ]
NONE(if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)
Changelog entry
Please put a one-line changelog entry below. Later this will be copied to the changelog file.
CHANGE: Migrate service discovery to EndpointSlices
Fixing the rbac
superseded by #2752