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 endpoint slices #4899

Merged

Conversation

DrFaust92
Copy link
Contributor

@DrFaust92 DrFaust92 commented Oct 4, 2024

What this PR does / why we need it

Which issue this PR fixes

(optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged)

Special notes for your reviewer

Based one upstream prometheus-operator/prometheus-operator#6882

Checklist

  • DCO signed
  • Chart Version bumped
  • Title of the PR starts with chart name (e.g. [prometheus-couchdb-exporter])

Sorry, something went wrong.

Copy link
Member

@jkroepke jkroepke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Reading discussion upstream and it seems kinda useful for larger clusters. I as understand, OpenShift toggle the default to endpointslices. WDYT about? We can also leave the upstream defaults.

@@ -63,6 +63,12 @@ spec:
- --kubelet-selector={{ .Values.prometheusOperator.kubeletService.selector }}
{{- end }}
{{- end }}
{{- if .Values.prometheusOperator.kubeletEndpointsEnabled }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if in combination with an boolean might be mis-leading.

Since --kubelet-endpoints= is set to true by default, I set the value to false keep the flag still to true, because --kubelet-endpoints=false would be omit.

not sure, if

{{- if (print .Values.prometheusOperator.kubeletEndpointsEnabled) }}

would help here, since it converts the value to a string and "false" is still true-ish, I guess?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, maybe just omit the ifs entirely and go by the values.yaml values?

@DrFaust92
Copy link
Contributor Author

DrFaust92 commented Oct 4, 2024

jkroepke I think (assume) to leave it same as upstream for the "common" case.

@DrFaust92
Copy link
Contributor Author

@jkroepke any additional thoughts before i make changes? I think i wont add toggle to avoid edge cases/breaking too much

@jkroepke
Copy link
Member

I would says omit toggles overall, including at CLI flags. That would avoid the issue to set the CLI flags to false.

@DrFaust92 DrFaust92 force-pushed the support-kubelet-endpoint-slices branch from 66552c6 to 1c6ae32 Compare October 16, 2024 23:56
@DrFaust92 DrFaust92 requested a review from jkroepke October 17, 2024 00:58

Verified

This commit was signed with the committer’s verified signature.
renovate-bot Mend Renovate
Signed-off-by: drfaust92 <ilia.lazebnik@gmail.com>

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Signed-off-by: drfaust92 <ilia.lazebnik@gmail.com>
Signed-off-by: drfaust92 <ilia.lazebnik@gmail.com>
@DrFaust92 DrFaust92 force-pushed the support-kubelet-endpoint-slices branch from 1c6ae32 to c54d5bb Compare October 17, 2024 00:59
@jkroepke jkroepke merged commit 8a79b09 into prometheus-community:main Oct 17, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[kube-prometheus-stack] support --kubelet-endpointslice=true
2 participants