-
Notifications
You must be signed in to change notification settings - Fork 46
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-operator] chore: upgrade to v9.3.1 #743
Conversation
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.
This is a lot to review, for the most part lgtm, just a few comments, nothing major.
@@ -6,7 +6,7 @@ apiVersion: v1 | |||
kind: List | |||
metadata: | |||
name: {{ include "prometheus-operator.fullname" $ }}-prometheus-ingressperreplica | |||
namespace: {{ $.Release.Namespace }} | |||
namespace: {{ template "prometheus-operator.namespace" $ }} |
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.
namespace: {{ template "prometheus-operator.namespace" . }}
now we have $
is this a consistency issue?
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.
@@ -3,7 +3,6 @@ apiVersion: policy/v1beta1 | |||
kind: PodSecurityPolicy | |||
metadata: | |||
name: {{ template "prometheus-operator.fullname" . }}-prometheus | |||
namespace: {{ $.Release.Namespace }} |
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 do not need namespace here?
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.
same as upstream: https://github.com/helm/charts/blob/master/stable/prometheus-operator/templates/prometheus/psp.yaml#L5-L7
that said, here is the history for why they removed it helm/charts@30b43ea
staging/prometheus-operator/patch/mesosphere/templates/rules/etcd-rules.yaml
Outdated
Show resolved
Hide resolved
staging/prometheus-operator/patch/mesosphere/templates/rules/velero-rules.yaml
Outdated
Show resolved
Hide resolved
@@ -17,7 +17,7 @@ items: | |||
{{ end -}} | |||
metadata: | |||
name: {{ include "prometheus-operator.fullname" $ }}-alertmanager-{{ $i }} | |||
namespace: {{ $.Release.Namespace }} | |||
namespace: {{ template "prometheus-operator.namespace" $ }} |
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.
consistency here? should use .
insteady of $
?
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.
this is just a copy from upstream: https://github.com/helm/charts/blob/master/stable/prometheus-operator/templates/alertmanager/ingressperreplica.yaml#L9-L20
If you look at the list of commits, starting from chore: copy upstream chart version: 9.3.1
each one applies a set of patches that are different from upstream. Everything else is a direct copy from helm/charts.
that said, do we want to fix it/change it? Is it required? If so I can work on a patch file but not sure we really need to
@@ -3,7 +3,6 @@ apiVersion: policy/v1beta1 | |||
kind: PodSecurityPolicy | |||
metadata: | |||
name: {{ template "prometheus-operator.fullname" . }}-alertmanager | |||
namespace: {{ $.Release.Namespace }} |
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.
namespace not needed? This would be installed in kubeaddons in helm3 is this intentional?
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.
Looks like they took it out upstream: https://github.com/helm/charts/blob/master/stable/prometheus-operator/templates/alertmanager/psp.yaml#L5-L7
Do we need it back? If so, I can add another patch to the set in PR #742
Here's a diff I ran against upstream so it's easier to see what changes we've applied on top of upstream |
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.
Thanks for the review @alejandroEsc! I'll add in the needed new lines but for the other comments you pointed out, it's all the same as the upstream chart. Should we fix in here or try to fix upstream? Do we even need to?
@@ -17,7 +17,7 @@ items: | |||
{{ end -}} | |||
metadata: | |||
name: {{ include "prometheus-operator.fullname" $ }}-alertmanager-{{ $i }} | |||
namespace: {{ $.Release.Namespace }} | |||
namespace: {{ template "prometheus-operator.namespace" $ }} |
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.
this is just a copy from upstream: https://github.com/helm/charts/blob/master/stable/prometheus-operator/templates/alertmanager/ingressperreplica.yaml#L9-L20
If you look at the list of commits, starting from chore: copy upstream chart version: 9.3.1
each one applies a set of patches that are different from upstream. Everything else is a direct copy from helm/charts.
that said, do we want to fix it/change it? Is it required? If so I can work on a patch file but not sure we really need to
@@ -3,7 +3,6 @@ apiVersion: policy/v1beta1 | |||
kind: PodSecurityPolicy | |||
metadata: | |||
name: {{ template "prometheus-operator.fullname" . }}-alertmanager | |||
namespace: {{ $.Release.Namespace }} |
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.
Looks like they took it out upstream: https://github.com/helm/charts/blob/master/stable/prometheus-operator/templates/alertmanager/psp.yaml#L5-L7
Do we need it back? If so, I can add another patch to the set in PR #742
@@ -6,7 +6,7 @@ apiVersion: v1 | |||
kind: List | |||
metadata: | |||
name: {{ include "prometheus-operator.fullname" $ }}-prometheus-ingressperreplica | |||
namespace: {{ $.Release.Namespace }} | |||
namespace: {{ template "prometheus-operator.namespace" $ }} |
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.
@@ -3,7 +3,6 @@ apiVersion: policy/v1beta1 | |||
kind: PodSecurityPolicy | |||
metadata: | |||
name: {{ template "prometheus-operator.fullname" . }}-prometheus | |||
namespace: {{ $.Release.Namespace }} |
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.
same as upstream: https://github.com/helm/charts/blob/master/stable/prometheus-operator/templates/prometheus/psp.yaml#L5-L7
that said, here is the history for why they removed it helm/charts@30b43ea
67028e6
to
37ae575
Compare
I am good to merge whenever you are, thanks! |
e5d5bb5
to
8de4138
Compare
…pstream chart version: 9.3.1 * chore: apply patch_1_mesosphere_dashboards.sh * chore: apply patch_2_mesosphere_cron_jobs.sh * chore: apply patch_3_mesosphere_hooks.sh * chore: apply patch_4_ingress_rbac.sh * chore: apply patch_5_mesosphere_rules.sh * chore: apply patch_6_mesosphere_values.sh * chore: apply patch_7_prometheus_crd.sh - reformat yaml with yq (no new changes) * chore: apply patch_7_prometheus_crd.sh - update volumeClaimTemplate * chore: apply patch_8_prometheus_operator_crd.sh
…: copy upstream chart version: 9.3.1 * chore: apply patch_1_mesosphere_dashboards.sh * chore: apply patch_2_mesosphere_cron_jobs.sh * chore: apply patch_3_mesosphere_hooks.sh * chore: apply patch_4_ingress_rbac.sh * chore: apply patch_5_mesosphere_rules.sh * chore: apply patch_6_mesosphere_values.sh * chore: apply patch_7_prometheus_crd.sh - reformat yaml with yq (no new changes) * chore: apply patch_7_prometheus_crd.sh - update volumeClaimTemplate * chore: apply patch_8_prometheus_operator_crd.sh" This reverts commit b88c046.
* Revert "[prometheus-operator] chore: upgrade to v9.3.1 (#743) * chore: copy upstream chart version: 9.3.1 * chore: apply patch_1_mesosphere_dashboards.sh * chore: apply patch_2_mesosphere_cron_jobs.sh * chore: apply patch_3_mesosphere_hooks.sh * chore: apply patch_4_ingress_rbac.sh * chore: apply patch_5_mesosphere_rules.sh * chore: apply patch_6_mesosphere_values.sh * chore: apply patch_7_prometheus_crd.sh - reformat yaml with yq (no new changes) * chore: apply patch_7_prometheus_crd.sh - update volumeClaimTemplate * chore: apply patch_8_prometheus_operator_crd.sh" This reverts commit b88c046. * Revert "[prometheus-operator] feat: add scripts to make upgrading easier (#742) * chore: move all mesosphere files to patch This moves all the mesosphere-related templates to the patch folder. This makes it easier to update the operator with a copy and replace as none of the mesosphere files will get lost. Signed-off-by: Sam Tran <[email protected]> * feat: add patch files This adds patch files that copy all the mesosphere files into the templates/ folder. This way they get deployed as part of the chart. It makes it easier to keep all the patches in one place and know what changes are needed/differ from upstream. Signed-off-by: Sam Tran <[email protected]> * feat: add helpers script for git commands This adds a helper file so that all the patch files can use the git_add_and_commit function which adds and commits all the files that were changed as part of the patch script. This should make it easy to see the commit history of what changed. Signed-off-by: Sam Tran <[email protected]> * chore: update prometheus crd patch script This commit updates the patch script to use a docker image as the previous code did not run on OSX. Also, due to the underlying go-parser lib used in the yq docker image, updating a yaml file automatically reformats the yaml removing empty newlines and converting multiline strings into one line[1]. This makes it hard to see the actual needed change for patch7 which is just to update the crd volumeClaimTemplate.metadata stanza. Thus, patch7 is changed to apply two commits, one to simply let yq format the file with no new changes and a second commit with the needed change. Similar to what we do with chart revision changes. Also updated the helper script to accept a commit message. [1] mikefarah/yq#465 (comment) Signed-off-by: Sam Tran <[email protected]> * feat: add update_operator script This script does a sparse clone of helm/stable/prometheus-operator and replaces all the files in our fork with latest upstream. Then it applies all the patches in the /patch folder which should now make updating our prometheus chart a bit easier. Signed-off-by: Sam Tran <[email protected]> * chore: add newlines from PR review Signed-off-by: Sam Tran <[email protected]> * chore: add doc for upgrading + patch comments Add an UPGRADING doc so users know what to do to upgrade. Add comments to the patch scripts so users know what each one does. crd patch script needed explaining. Signed-off-by: Sam Tran <[email protected]> * chore: add patch for checking CRD exists again This adds back the check for that was removed from upstream. Signed-off-by: Sam Tran <[email protected]> * chore: fixup shellcheck errors Co-authored-by: Joe Julian <[email protected]>" This reverts commit 54b4815.
This reverts commit 9a2b458.
What type of PR is this?
Chore
What this PR does/ why we need it:
Upgrades prometheus-operator to v9.3.1
I used the upgrade scripts from PR #742 to generate these changes.
Which issue(s) this PR fixes:
Special notes for your reviewer:
Right now this PR includes changes from PR #742. Please review that one first.
Does this PR introduce a user-facing change?:
Checklist