-
Notifications
You must be signed in to change notification settings - Fork 5k
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
[prometheus] pdb template values #5001
base: main
Are you sure you want to change the base?
[prometheus] pdb template values #5001
Conversation
@gianrubio @naseemkullah @Xtigyro @zanhsieh @zeritti Hello, Would appreciate a review on this. Our prom instance keeps jumping nodes and I want to add a correct PDB |
Please, sign your commits so that DCO check can pass. |
d19a84e
to
0dfbb89
Compare
Signed-off-by: mentlak <[email protected]>
0dfbb89
to
cac557a
Compare
@zeritti Apologies, first time doing a sign off. This has now been done. |
{{- if $pdbSpec.minAvailable }} | ||
minAvailable: {{ $pdbSpec.minAvailable }} | ||
{{- end }} | ||
{{- if $pdbSpec.maxUnavailable }} | ||
maxUnavailable: {{ $pdbSpec.maxUnavailable }} | ||
{{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can make PDB a bit friendlier to users who would like to set minAvailable
since they have to set two fields: unset default maxUnavailable
and then set minAvailable
. I would suggest a change in this respect - commenting the current default out in the values file and rewriting the template while setting the current default. unhealthyPodEvictionPolicy
should not be discarded.
{{- if not (or (hasKey $pdbSpec "minAvailable") (hasKey $pdbSpec "maxUnavailable")) }}
maxUnavailable: 1
{{- end }}
{{- if hasKey $pdbSpec "minAvailable" }}
minAvailable: {{ $pdbSpec.minAvailable }}
{{- end }}
{{- if hasKey $pdbSpec "maxUnavailable" }}
maxUnavailable: {{ $pdbSpec.maxUnavailable }}
{{- end }}
{{- if hasKey $pdbSpec "unhealthyPodEvictionPolicy" }}
unhealthyPodEvictionPolicy: {{ $pdbSpec.unhealthyPodEvictionPolicy }}
{{- end }}
We'd have to add a comment in the values stating that default is set to maxUnavailable=1
if neither minAvailable
nor maxUnavailable
is set. What dou you think?
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
Checklist
[prometheus-couchdb-exporter]
)