-
Notifications
You must be signed in to change notification settings - Fork 16.7k
[stable/prometheus-operator] prevent nodePort from constantly changing #23320
Conversation
…g when using a nodePort service on AlertManager and Prometheus Signed-off-by: Mickaël Le Baillif <mickael.le.baillif@gmail.com>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: demikl The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Hi @demikl. Thanks for your PR. I'm waiting for a helm member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Signed-off-by: Mickaël Le Baillif <mickael.le.baillif@gmail.com>
a019b79
to
4f83250
Compare
/assign @bismarck @vsliouniaev @gianrubio |
I believe this is a non-backwards compatible change, since removing the nodePort entry from the service will cause an error on an upgrade. Are you able to confirm this isn't the case? /ok-to-test |
I have tested that the following workflow doesn't trigger any error :
|
/hold Let’s hold PRs to stable/prometheus-operator chart for a short time until prometheus-community/community#28 (comment) is resolved. If you want to help with that effort, to test etc, that would be great! |
@demikl as a user and contributor, would you mind helping to review/test this PR? prometheus-community/helm-charts#1 No need to reply here. If you can, please just reply and help there. It would help this process move along faster. Thanks! |
🚧 This chart is now deprecated. Further development has moved to prometheus-community/helm-charts. The chart has been renamed kube-prometheus-stack to more clearly reflect that it installs the If applicable, please re-open this PR there. Thanks! |
Prevent nodePort from constantly changing when using a nodePort service on AlertManager and Prometheus and not specifying a fixed port number.
Signed-off-by: Mickaël Le Baillif mickael.le.baillif@gmail.com
Chart maintainers:
@vsliouniaev
@bismarck
@gianrubio
Is this a new chart
No.
What this PR does / why we need it:
Avoid assigning a new nodePort number when applying the "Service" manifests for prometheus and alertmanager. This is especially noticeable when these manifests are handled with a GitOps method, such as with FluxCD, because manifests are applied on a regular basis.
Why is the nodePort number modified when applying the generated manifest ? Because when
prometheus.service.type
isNodePort
, or the same withalertmanager.service.type
, andprometheus.service.nodePort
(respectivelyalertmanager.service.nodePort
is unassigned, the generated service manifest contains a keyservice.spec.ports.nodePort
and with an empty value.This PR remove this key from the manifest if the port number is unassigned.
Which issue this PR fixes
No related issue found.
Checklist
[stable/mychartname]
)