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

chore(deps): update prometheus-stack (prometheus 3.0.1, operator 0.79.2) #949

Merged
merged 8 commits into from
Dec 19, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 21, 2024

Note: This PR was initially generated by Renovate but due to changes needed in the operator/other places to support the latest Prometheus version this PR description has been scrubbed of the original contents.

Description

This PR contains a number of application updates to the prometheus stack:

  • Prometheus: 2.54.1 -> 3.0.1
  • Prometheus Operator: 0.77.1 -> 0.79.2
  • Prometheus Config Reloader: 0.77.1 -> 0.79.2
  • Kube State Metrics: 2.13.0 -> 2.14.0

Two helm chart updates are also included for the prometheus stack:

  • Kube-Prometheus-Stack: 65.3.1 -> 67.3.1
  • Prometheus-Operator-CRDs: 15.0.0 -> 17.0.2

In addition to provide a seamless upgrade experience with the new version of Prometheus 3.0 (specifically the change in behavior around scrape protocol), the following changes were made:

  • Addition of support for setting fallbackScrapeProtocol in the monitor section of the Package CR spec
  • New mutation added to PodMonitor and ServiceMonitor code to set the fallbackScrapeProtocol to PrometheusText004 by default (this matches the pre-3.x behavior in Prometheus)
  • "One-time" onDeploy.after task to annotate all existing pod and service monitors: This forces all monitors to go through the mutation cycle again and have the fallbackScrapeProtocol added immediately, without operator intervention. Note that other options were considered (i.e. doing this via Pepr) but this was seen as the easiest and most lightweight solution.
  • In order to support the above changes in the operator code the types for Prometheus CRDs were regenerated

Also note that since this update includes a major version of Prometheus there are additional notes in the upstream migration guide. In testing with UDS Core and several apps on top of core no immediate issues were identified with this upgrade.

Related Issue

N/A

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Other (security config, docs update, etc)

Steps to Validate

The issue with metrics and scrape protocol can be seen with GitLab. To validate the proper behavior across upgrades I ran through the below steps:

# Using Colima the below VM was a good size to handle the GitLab workloads
colima start --cpu 12 --memory 20 -t vz --disk 100

# Deploy part of core FROM `main`
uds run test-single-layer --set LAYER=monitoring --set FLAVOR=unicorn

# Deploy gitlab test bundle
uds deploy ghcr.io/defenseunicorns/packages/uds/bundles/gitlab-test:17.6.2-uds.0 --confirm

# Check metrics status using the e2e test (this is with main so all should pass, just here as a sanity check)
uds run -f src/prometheus-stack/tasks.yaml e2e-test

# Deploy core base, then monitoring FROM `renovate/prometheus-stack` branch
uds run test:single-layer --set LAYER=base --set FLAVOR=unicorn
uds run test:single-layer --set LAYER=monitoring --set FLAVOR=unicorn 
# Note that the tests may fail here due to timing, Prometheus takes upwards of 1 min to read in the new config, re-run them after a short wait
uds run -f src/prometheus-stack/tasks.yaml e2e-test
# Expected behavior here is that all metrics continue to work, simply by deploying latest core, despite upstream issues with GitLab's content type on some metrics

# Check metrics status (manual version of the e2e test) if desired
kubectl port-forward svc/kube-prometheus-stack-prometheus 9090:9090 -n monitoring
# Navigate to http://localhost:9090/targets?pool= and validate all show as up/no targets

To more generally validate core:

# Test a complete install
uds run test-uds-core --set FLAVOR=unicorn
# Run the e2e tests for Prom
uds run -f src/prometheus-stack/tasks.yaml e2e-test

# Test a complete upgrade (e2e tests will run as part of this)
uds run test-uds-core-upgrade --set FLAVOR=unicorn

Checklist before merging

@renovate renovate bot requested a review from a team as a code owner October 21, 2024 18:07
@renovate renovate bot force-pushed the renovate/prometheus-stack branch 4 times, most recently from 79bba10 to 550051a Compare October 22, 2024 10:33
@renovate renovate bot changed the title chore(deps): update prometheus-stack to v0.77.2 chore(deps): update prometheus-stack Oct 22, 2024
@UnicornChance UnicornChance added the waiting on ironbank This PR is waiting on an image update for ironbank label Oct 22, 2024
@renovate renovate bot force-pushed the renovate/prometheus-stack branch 2 times, most recently from 9320888 to 6ed9421 Compare October 22, 2024 14:33
@UnicornChance UnicornChance removed the waiting on ironbank This PR is waiting on an image update for ironbank label Oct 22, 2024
@renovate renovate bot force-pushed the renovate/prometheus-stack branch 4 times, most recently from d061c82 to c4ff9b0 Compare October 30, 2024 12:29
@renovate renovate bot force-pushed the renovate/prometheus-stack branch 10 times, most recently from 7a5cab7 to aa3935c Compare November 6, 2024 13:54
@UnicornChance UnicornChance added the waiting on cgr This PR is waiting on an image update for cgr label Nov 6, 2024
@renovate renovate bot force-pushed the renovate/prometheus-stack branch from f86f361 to f5a009f Compare November 8, 2024 19:08
@mjnagel mjnagel added waiting on cgr This PR is waiting on an image update for cgr and removed waiting on cgr This PR is waiting on an image update for cgr labels Nov 8, 2024
@renovate renovate bot force-pushed the renovate/prometheus-stack branch 2 times, most recently from d911d0b to 4cc8280 Compare November 10, 2024 21:03
@mjnagel
Copy link
Contributor

mjnagel commented Dec 17, 2024

Looking for 0.79.1 here to support the fallbackScrapeProtocol.

@renovate renovate bot force-pushed the renovate/prometheus-stack branch from 511a18c to 6e177ac Compare December 17, 2024 17:46
@mjnagel mjnagel added waiting on helm chart This PR is waiting on an update to the helm chart and removed waiting on cgr This PR is waiting on an image update for cgr labels Dec 17, 2024
| datasource  | package                                                                              | from    | to      |
| ----------- | ------------------------------------------------------------------------------------ | ------- | ------- |
| docker      | cgr.dev/du-uds-defenseunicorns/kube-state-metrics-fips                               | 2.13.0  | 2.14.0  |
| docker      | cgr.dev/du-uds-defenseunicorns/prometheus-config-reloader-fips                       | 0.77.1  | 0.79.1  |
| docker      | cgr.dev/du-uds-defenseunicorns/prometheus-fips                                       | 2.54.1  | 3.0.1   |
| docker      | cgr.dev/du-uds-defenseunicorns/prometheus-operator-fips                              | 0.77.1  | 0.79.1  |
| helm        | kube-prometheus-stack                                                                | 65.3.1  | 67.2.0  |
| helm        | prometheus-operator-crds                                                             | 15.0.0  | 17.0.0  |
| github-tags | prometheus-operator/prometheus-operator                                              | v0.77.1 | v0.79.1 |
| docker      | quay.io/prometheus-operator/prometheus-config-reloader                               | v0.77.1 | v0.79.1 |
| docker      | quay.io/prometheus-operator/prometheus-operator                                      | v0.77.1 | v0.79.1 |
| docker      | quay.io/prometheus/prometheus                                                        | v2.54.1 | v3.0.1  |
| docker      | registry.k8s.io/kube-state-metrics/kube-state-metrics                                | v2.13.0 | v2.14.0 |
| docker      | registry1.dso.mil/ironbank/opensource/kubernetes/kube-state-metrics                  | v2.13.0 | v2.14.0 |
| docker      | registry1.dso.mil/ironbank/opensource/prometheus-operator/prometheus-config-reloader | v0.77.1 | v0.79.0 |
| docker      | registry1.dso.mil/ironbank/opensource/prometheus-operator/prometheus-operator        | v0.77.1 | v0.79.0 |
| docker      | registry1.dso.mil/ironbank/opensource/prometheus/prometheus                          | v2.54.1 | v3.0.1  |
@renovate renovate bot force-pushed the renovate/prometheus-stack branch from 6e177ac to fab87c8 Compare December 17, 2024 18:08
Copy link
Contributor Author

renovate bot commented Dec 17, 2024

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

@mjnagel mjnagel removed waiting on ironbank This PR is waiting on an image update for ironbank waiting on helm chart This PR is waiting on an update to the helm chart labels Dec 18, 2024
@mjnagel mjnagel added waiting on ironbank This PR is waiting on an image update for ironbank waiting on cgr This PR is waiting on an image update for cgr labels Dec 18, 2024
@mjnagel
Copy link
Contributor

mjnagel commented Dec 18, 2024

Operator 0.79.2 has a fix we need for some of our endpoints, so waiting on the cgr and ib images for that.

This should be fully functional now for the upstream flavor. The below is how I validate the metrics changes in the operator code:

# Note that these steps deploy GitLab which can be resource intensive. This worked for me with a Colima VM setup with 12 cpu / 20gb memory
colima start --cpu 12 --memory 20 -t vz --disk 100

# Deploy core monitoring
uds run test-single-layer --set LAYER=monitoring --set FLAVOR=upstream

# Deploy gitlab test bundle
uds deploy ghcr.io/defenseunicorns/packages/uds/bundles/gitlab-test:17.6.2-uds.0 --confirm

# Portforward prometheus
kubectl port-forward svc/kube-prometheus-stack-prometheus 9090:9090 -n monitoring

# Open http://localhost:9090/targets and validate that all targets show as up (or unknown/no active targets)

@mjnagel mjnagel changed the title chore(deps): update prometheus-stack chore(deps): update prometheus-stack (prometheus 3.0.1, operator 0.79.2) Dec 19, 2024
@mjnagel mjnagel removed the waiting on cgr This PR is waiting on an image update for cgr label Dec 19, 2024
@mjnagel mjnagel marked this pull request as draft December 19, 2024 16:31
@mjnagel mjnagel marked this pull request as ready for review December 19, 2024 17:02
@mjnagel mjnagel removed the waiting on ironbank This PR is waiting on an image update for ironbank label Dec 19, 2024
@mjnagel mjnagel merged commit 5a35fc6 into main Dec 19, 2024
33 checks passed
@mjnagel mjnagel deleted the renovate/prometheus-stack branch December 19, 2024 21:19
mjnagel pushed a commit that referenced this pull request Dec 20, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.33.1](v0.33.0...v0.33.1)
(2024-12-20)


### Bug Fixes

* add generated target for all node IPs
([#1119](#1119))
([033338b](033338b))


### Miscellaneous

* add action to check readiness on renovate PRs before running CI
([#1144](#1144))
([83d81c6](83d81c6))
* **deps:** update codeql action to v3.28.0
([#1146](#1146))
([fe9bccf](fe9bccf))
* **deps:** update k8s-sidecar to v1.28.4
([#1132](#1132))
([b4f15ff](b4f15ff))
* **deps:** update loki
([#1134](#1134))
([56d0e39](56d0e39))
* **deps:** update prometheus-stack (prometheus 3.0.1, operator 0.79.2)
([#949](#949))
([5a35fc6](5a35fc6))
* **deps:** update support-deps
([#1131](#1131))
([4853969](4853969))
* **deps:** update support-deps
([#1138](#1138))
([2764d03](2764d03))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.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.

3 participants