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

Fix backwards incompatible change: include a prometheus service by default #6699

Merged
merged 2 commits into from Feb 1, 2024

Conversation

inteon
Copy link
Member

@inteon inteon commented Feb 1, 2024

In #6459 the prometheus service was made conditional both on .Values.prometheus.enabled and .Values.prometheus.servicemonitor.enabled. This however conflicts with the original intentions of the author of this Service: #1942 (comment).
For that reason, we decided to still include the service when only .Values.prometheus.enabled is set.
We do however remove the service when .Values.prometheus.podmonitor.enabled is true and aim to add an extra option in the future to disable this service.

Kind

/kind bug

Release Note

Fix backwards incompatible removal of default prometheus Service resource.

…fault

Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
@jetstack-bot jetstack-bot added release-note-none Denotes a PR that doesn't merit a release note. kind/bug Categorizes issue or PR as related to a bug. area/deploy Indicates a PR modifies deployment configuration dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. labels Feb 1, 2024
@inteon inteon requested a review from wallrj February 1, 2024 12:15
@jetstack-bot jetstack-bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 1, 2024
@@ -1,4 +1,4 @@
{{- if and .Values.prometheus.enabled .Values.prometheus.servicemonitor.enabled }}
{{- if and .Values.prometheus.enabled (not .Values.prometheus.podmonitor.enabled) }}
Copy link
Member

Choose a reason for hiding this comment

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

I would have preferred making the simplest possible change, and returning it to be exactly how it used to be.

$ git diff origin/release-1.13 origin/release-1.14 -- deploy/charts/cert-
manager/templates/service.yaml
diff --git a/deploy/charts/cert-manager/templates/service.yaml b/deploy/charts/cert-manager/templates/service.yaml
index ec34d5878..112a55228 100644
--- a/deploy/charts/cert-manager/templates/service.yaml
+++ b/deploy/charts/cert-manager/templates/service.yaml
@@ -1,4 +1,4 @@
-{{- if .Values.prometheus.enabled }}
+{{- if and .Values.prometheus.enabled .Values.prometheus.servicemonitor.enabled }}
 apiVersion: v1
 kind: Service
 metadata:

What harm does the Service resource do if the user also enables PodMonitor?
What if a user wants the metrics Service for some other bespoke monitoring system and they want to use the PodMonitor?

I guess this can easily be changed again in a future release.

Copy link
Member Author

Choose a reason for hiding this comment

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

podmonitor was added in this release.
I think best thing to do right now is to keep the current behavior without extending the behavior to the new options that we added.

deploy/charts/cert-manager/values.yaml Outdated Show resolved Hide resolved
@wallrj wallrj mentioned this pull request Feb 1, 2024
73 tasks
Co-authored-by: Richard Wall <wallrj@users.noreply.github.com>
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
Copy link
Member

@wallrj wallrj left a comment

Choose a reason for hiding this comment

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

Ok. Thanks.

/lgtm
/approve

Copy link
Member

@SgtCoDFish SgtCoDFish left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

(Looks like the labels from the previous review weren't picked up. Adding my own review to poke prow)

@SgtCoDFish
Copy link
Member

/cherry-pick release-1.14

@jetstack-bot
Copy link
Collaborator

@SgtCoDFish: once the present PR merges, I will cherry-pick it on top of release-1.14 in a new PR and assign it to you.

In response to this:

/cherry-pick release-1.14

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.

@jetstack-bot jetstack-bot added the lgtm Indicates that a PR is ready to be merged. label Feb 1, 2024
@jetstack-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: SgtCoDFish, wallrj

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jetstack-bot jetstack-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 1, 2024
@jetstack-bot jetstack-bot merged commit 03e3188 into cert-manager:master Feb 1, 2024
7 checks passed
@jetstack-bot
Copy link
Collaborator

@SgtCoDFish: #6699 failed to apply on top of branch "release-1.14":

Applying: fix backwards incompatible change: include a prometheus service by default
Using index info to reconstruct a base tree...
M	deploy/charts/cert-manager/values.yaml
Falling back to patching base and 3-way merge...
Auto-merging deploy/charts/cert-manager/values.yaml
CONFLICT (content): Merge conflict in deploy/charts/cert-manager/values.yaml
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 fix backwards incompatible change: include a prometheus service by default
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-1.14

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.

@SgtCoDFish
Copy link
Member

I'll manually backport

@wallrj wallrj added this to the 1.14 milestone Feb 2, 2024
@jetstack-bot jetstack-bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/deploy Indicates a PR modifies deployment configuration dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants