2021-10-27: Upgrade prometheus helm chart gprd
Production Change
Change Summary
Part of https://gitlab.com/gitlab-com/gl-infra/infrastructure/-/issues/13973 to upgrade the following in gprd
:
component | before | after |
---|---|---|
prometheus-operator |
v0.42.1 | master@sha256:bb79240165868c7d73d3db2b45bd065bf2b3050729aa4809f6de79cace232feb |
kube-state-metrics |
v1.9.7 | v2.2.0 |
prometheus-community/kube-prometheus-stack |
10.3.5 | 19.1.0 |
Upgrades to environments were done in the following change management issue:
- Previous failed attempted in
gprd
: #5753 (closed) -
org-ci
,ops
,gstg
: #5753 (closed)
Change Details
- Services Impacted - ServicePrometheus
-
Change Technician -
@steveazz
- Change Reviewer - @pguinoiseau
- Time tracking - 60
- Downtime Component - none
Detailed steps for the change
Pre-Change Steps - steps to be completed before execution of the change
Estimated Time to Complete (mins) - 1
-
Make sure gitlab-com/gl-infra/k8s-workloads/gitlab-helmfiles!510 (merged) is reviewed -
Make sure gitlab-com/runbooks!4028 (merged) is reviewed -
Make sure gitlab-com/runbooks!4027 (merged) is reviewed -
Set up kubectl
to access the clusters: https://gitlab.com/gitlab-com/runbooks/-/blob/master/docs/kube/k8s-oncall-setup.md#accessing-clusters-via-console-servers -
Set label changein-progress on this issue
Change Steps - steps to take to execute the change
Estimated Time to Complete (mins) - 50
-
Merge gitlab-com/gl-infra/k8s-workloads/gitlab-helmfiles!510 (merged) -
Manual run apply
jobs forgprd
and wait for them to finish before start the next cluster👉 https://ops.gitlab.net/gitlab-com/gl-infra/k8s-workloads/gitlab-helmfiles/-/pipelines/860974-
gprd-us-east1-b
-
gprd-us-east1-c
-
gprd-us-east1-d
-
gprd
-
-
Verify that you have kube_horizontalpodautoscaler_
metrics` -
Merge gitlab-com/runbooks!4028 (merged) -
Merge gitlab-com/runbooks!4027 (merged)
Post-Change Steps - steps to take to verify the change
Estimated Time to Complete (mins) - 10
-
Verify that all pods have restarted: kubectl -n monitoring get po
apart from thanos, memcached, gitaly-exporter -
Verify that the new operator version is running: kubectl -n monitoring get po gitlab-monitoring-promethe-operator-7dc8f7b879-4dk88 -o json | jq .spec.containers[0].image
expected value is"ghcr.io/prometheus-operator/prometheus-operator:master@sha256:bb79240165868c7d73d3db2b45bd065bf2b3050729aa4809f6de79cace232feb"
-
Take a look at the operator logs and check if there are any error level logs: kubectl -n monitoring logs gitlab-monitoring-promethe-operator-7dc8f7b879-4dk88 --since=5m
. If there is a large amount of logs you can filter for error levelkubectl -n monitoring logs gitlab-monitoring-promethe-operator-7dc8f7b879-4dk88 --since=5m | grep 'err'
-
Verify that service discovery is working curl -s -L $(kubectl -n monitoring get svc prometheus-headless -o json | jq '.metadata.annotations["external-dns.alpha.kubernetes.io/hostname"]' -r):9090/metrics | grep 'scrape_pool_targets'
-
Check the ingress is working as expected: https://console.cloud.google.com/kubernetes/ingresses?project=gitlab-production&pageState=(%22savedViews%22:(%22i%22:%226c0e9c818063462585995d31405639f5%22,%22c%22:%5B%5D,%22n%22:%5B%5D),%22ingress_list_table%22:(%22f%22:%22%255B%255D%22)) if any backends are reporting unhealthy investigate
Rollback
Rollback steps - steps to be taken in the event of a need to rollback this change
Estimated Time to Complete (mins) - 5
-
Revert gitlab-com/gl-infra/k8s-workloads/gitlab-helmfiles!510 (merged) -
Revert gitlab-com/runbooks!4027 (merged)
Monitoring
Key metrics to observe
- Metric: Operator build info
- Location: https://thanos.gitlab.net/graph?g0.expr=prometheus_operator_build_info&g0.tab=1&g0.stacked=0&g0.range_input=1h&g0.max_source_resolution=0s&g0.deduplicate=1&g0.partial_response=0&g0.store_matches=%5B%5D
- What changes to this metric should prompt a rollback: Not seeing the new environments (this is a new metric)
- Metric: Apdex
- Location: https://dashboards.gitlab.net/d/monitoring-main/monitoring-overview?viewPanel=712482646&orgId=1&var-PROMETHEUS_DS=Global&var-environment=gstg&var-stage=main&from=1634095320000&to=1634116979999
- What changes to this metric should prompt a rollback: A dip in apdex
- Metric: Alert sender SLI
- Location: https://dashboards.gitlab.net/d/monitoring-main/monitoring-overview?viewPanel=3098809023&orgId=1&var-PROMETHEUS_DS=Global&var-environment=gprd&var-stage=main
- What changes to this metric should prompt a rollback: A spike in apdex scope
- Logs: Error logs
- Location: https://log.gprd.gitlab.net/goto/d97c71d4c18a34a4cbcb18eb0ee238d7
- What changes to this metric should prompt a rollback: A spike in error rates
Summary of infrastructure changes
-
Does this change introduce new compute instances? -
Does this change re-size any existing compute instances? -
Does this change introduce any additional usage of tooling like Elastic Search, CDNs, Cloudflare, etc?
Changes checklist
-
This issue has a criticality label (e.g. C1, C2, C3, C4) and a change-type label (e.g. changeunscheduled, changescheduled) based on the Change Management Criticalities. -
This issue has the change technician as the assignee. -
Pre-Change, Change, Post-Change, and Rollback steps and have been filled out and reviewed. -
This Change Issue is linked to the appropriate Issue and/or Epic -
Necessary approvals have been completed based on the Change Management Workflow. -
Change has been tested in staging and results noted in a comment on this issue. 👉 #5731 (closed) -
A dry-run has been conducted and results noted in a comment on this issue. -
SRE on-call has been informed prior to change being rolled out. (In #production channel, mention @sre-oncall
and this issue and await their acknowledgement.) -
Release managers have been informed (If needed! Cases include DB change) prior to change being rolled out. (In #production channel, mention @release-managers
and this issue and await their acknowledgment.) -
There are currently no active incidents.
Edited by Steve Xuereb