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] Update prometheus-operator to 0.42.1 #128

Merged

Conversation

bashofmann
Copy link
Contributor

What this PR does / why we need it:

Update prometheus-operator to 0.42.1.

This also introduces a new Probes CRD. Since Helm does not create this new CRD on a chart upgrade automatically, the chart version is bumped to 10 to indicate the breaking change.

Checklist

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

@cablespaghetti
Copy link
Contributor

Would love for this to get merged. I've done this by hand by bumping image versions and deploying the CRDs by hand but the lack of "probes" in the ClusterRole makes things difficult.

@tiagomeireles
Copy link
Contributor

This also bumps the kubernetes prerequisite to 1.16+. prometheus-operator 0.39 introduced a requirement for kubernetes v1.16 or newer. https://github.com/prometheus-operator/prometheus-operator/releases/tag/v0.39.0

I'm +1 with getting this merged in.

@bashofmann
Copy link
Contributor Author

What do you think, should I add a kubeVersion field in the Chart.yaml to restrict this?

@bashofmann bashofmann force-pushed the prometheus-operator-0.42.1 branch from 0219394 to 96d1037 Compare September 27, 2020 10:43
@bashofmann
Copy link
Contributor Author

kubeVersion requirement is added.

@scottrigby
Copy link
Member

Related to #24

@scottrigby
Copy link
Member

Have these CRDs been updated in the upstream https://github.com/prometheus-operator/kube-prometheus project? This may be a question for @brancz

@bashofmann
Copy link
Contributor Author

@scottrigby
Copy link
Member

@bashofmann OK thanks yes, it appears the source – generated as part of the prometheus-operator/kube-prometheus project (which this chart installs) – is here: https://github.com/prometheus-operator/kube-prometheus/tree/master/manifests/setup

These were updated recently upstream:

Which is interesting to me. I wonder:

  1. why the chart README recommends installing directly from https://raw.githubusercontent.com/prometheus-operator/prometheus-operator as opposed to from the kube-prometheus generated manifests
  2. and why the chart crds dir files have similar comments listing prometheus-operator/prometheus-operator as the file source
  3. Also, this chart's hack dir has sync scripts for grafana dashboards and prom rules, but not for CRDs – should it?

Maybe some of the other kube-prometheus project maintainers can help me understand if these are just relics/gaps left over from the stable chart, or if there is some reason. Either way I think we can clean this up and decide on a nicer path forward to keep better in sync with the upstream kube-prometheus project. CC @metalmatze @paulfantom @lilic

@bashofmann
Copy link
Contributor Author

Are you sure that kube-prometheus is the source of truth for the CRDs? It feels more logical to me that the source of truth is in prometheus-operator which uses and implements logic for these CRDs and not in kube-prometheus which bundles the operator with monitors, dashboards and rules.

@bashofmann bashofmann force-pushed the prometheus-operator-0.42.1 branch from 9a9284a to eb813c3 Compare September 28, 2020 07:37
@paulfantom
Copy link
Member

paulfantom commented Sep 28, 2020

The source of truth for CRDs is their jsonnet definition in prometheus-operator repository, this is used to generate yaml files in prometheus-operator and it is also consumed by kube-prometheus.

Note: jsonnet code is also generated from go code using generate-crd.go script.

@Nuru
Copy link

Nuru commented Sep 30, 2020

This chart fails on AWS EKS and probably fails on GKE due to the kubeVersion constraint:

Error: UPGRADE FAILED: chart requires kubeVersion: >=1.16.0 which is incompatible with Kubernetes v1.17.9-eks-4c6976

Solution appears to be to change the constraint to >=1.16.0-0. See helm/helm#3810 (comment) and this documentation

@bashofmann bashofmann force-pushed the prometheus-operator-0.42.1 branch from f3d2663 to 03fba17 Compare October 1, 2020 09:32
@bashofmann
Copy link
Contributor Author

Thanks, good catch. I fixed the constraint and rebased the PR.

@deleted
Copy link

deleted commented Oct 2, 2020

I would also love to see this PR land, as prometheus-operator v0.39 added support to enable the prometheus query logger.

@uptickmetachu
Copy link

(Also keenly interested in this one for black box exporter)

@bashofmann
Copy link
Contributor Author

@scottrigby Is there anything else this PR needs besides the obvious rebase?

Copy link
Member

@monotek monotek left a comment

Choose a reason for hiding this comment

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

resolve merge conflict please

@bashofmann bashofmann force-pushed the prometheus-operator-0.42.1 branch from 03fba17 to b9546f9 Compare October 6, 2020 08:40
monotek
monotek previously approved these changes Oct 6, 2020
@bashofmann
Copy link
Contributor Author

I rebased the branch again to resolve conflicts.

@bashofmann bashofmann force-pushed the prometheus-operator-0.42.1 branch from 554e13f to 31df5b6 Compare October 8, 2020 06:51
@bashofmann
Copy link
Contributor Author

The lint task seems to have failed due to a network hickup. Is there a way to rerun it (with the right permissions), or do I need to make a tiny change and push again?

Copy link
Member

@monotek monotek left a comment

Choose a reason for hiding this comment

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

@bashofmann

Could you merge the changes from master to your branch introduced by #191 please?
After that linting should succeed :)

This also introduces a new `Probes` CRD. Since Helm does not create this new CRD on a chart upgrade automatically, the chart version is bumped to 10 to indicate the breaking change.

Signed-off-by: Bastian Hofmann <bashofmann@gmail.com>
…rRole

Signed-off-by: Bastian Hofmann <bashofmann@gmail.com>
….clusterAdvertiseAddress

Introduced in 0.39.0 with prometheus-operator/prometheus-operator#3160

Signed-off-by: Bastian Hofmann <bashofmann@gmail.com>
Introduced in 0.41.0 with prometheus-operator/prometheus-operator#3334

Signed-off-by: Bastian Hofmann <bashofmann@gmail.com>
Compatibility added in in 0.41.0 with prometheus-operator/prometheus-operator#3316

Signed-off-by: Bastian Hofmann <bashofmann@gmail.com>
…rtiseAddress

Signed-off-by: Bastian Hofmann <bashofmann@gmail.com>
Signed-off-by: Bastian Hofmann <bashofmann@gmail.com>
Signed-off-by: Bastian Hofmann <bashofmann@gmail.com>
@bashofmann bashofmann force-pushed the prometheus-operator-0.42.1 branch from 31df5b6 to 19f327c Compare October 9, 2020 07:46
@bashofmann
Copy link
Contributor Author

@monotek rebased and pushed

Copy link
Member

@scottrigby scottrigby left a comment

Choose a reason for hiding this comment

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

Thanks for your work on this

@scottrigby scottrigby merged commit eccf50d into prometheus-community:main Oct 9, 2020
@bashofmann bashofmann deleted the prometheus-operator-0.42.1 branch October 10, 2020 08:08
stamzid pushed a commit to Unstructured-IO/prometheus-community-helm-charts that referenced this pull request Mar 3, 2023
…eus-community#128)

* [kube-prometheus-stack] Update prometheus-operator to 0.42.1

This also introduces a new `Probes` CRD. Since Helm does not create this new CRD on a chart upgrade automatically, the chart version is bumped to 10 to indicate the breaking change.

Signed-off-by: Bastian Hofmann <bashofmann@gmail.com>

* [kube-prometheus-stack] Remove duplicated podmonitors entry in ClusterRole

Signed-off-by: Bastian Hofmann <bashofmann@gmail.com>

* [kube-prometheus-stack] Add support for alertmanager.alertmanagerSpec.clusterAdvertiseAddress

Introduced in 0.39.0 with prometheus-operator/prometheus-operator#3160

Signed-off-by: Bastian Hofmann <bashofmann@gmail.com>

* [kube-prometheus-stack] Update configmap-reload to 0.4.0

Introduced in 0.41.0 with prometheus-operator/prometheus-operator#3334

Signed-off-by: Bastian Hofmann <bashofmann@gmail.com>

* [kube-prometheus-stack] Update default prometheus version to 2.19.2

Compatibility added in in 0.41.0 with prometheus-operator/prometheus-operator#3316

Signed-off-by: Bastian Hofmann <bashofmann@gmail.com>

* [kube-prometheus-stack] Fix alertmanager.alertmanagerSpec.clusterAdvertiseAddress

Signed-off-by: Bastian Hofmann <bashofmann@gmail.com>

* [kube-prometheus-stack] Fix kubeVersion constraint for GKE and EKS

Signed-off-by: Bastian Hofmann <bashofmann@gmail.com>

* [kube-prometheus-stack] Update Prometheus to 2.21.0

Signed-off-by: Bastian Hofmann <bashofmann@gmail.com>
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.

9 participants