Replace Prometheus object definitions with objects from charts
What does this MR do?
Use Helm resources for Prometheus
Replace the Operator specific Prometheus resources with the resources of the Prometheus chart (subchart of the GitLab chart).
Changelog: changed
Migration Notes
- No data must be migrated, because the Prometheus CR was not configured for any persistence.
- The operator will delete the obsolete Prometheus CR and reconcile the Prometheus chart resources. The CR config and the Prometheus chart config are different in many aspects (persistence, alert manager config, scrape config, ...).
Checklist
See Definition of done.
For anything in this list which will not be completed, please provide a reason in the MR discussion.
Required
-
Merge Request Title and Description are up to date, accurate, and descriptive -
MR targeting the appropriate branch -
MR has a green pipeline on GitLab.com -
When ready for review, MR is labeled "~workflow::ready for review" per the Distribution MR workflow
Expected (please provide an explanation if not completing)
-
Test plan indicating conditions for success has been posted and passes -
Documentation created/updated -
Tests added -
Integration tests added to GitLab QA -
Equivalent MR/issue for omnibus-gitlab opened -
Validate potential values for new configuration settings. Formats such as integer 10
, duration10s
, URIscheme://user:passwd@host:port
may require quotation or other special handling when rendered in a template and written to a configuration file.
Test Plan
- Prepare a cluster and install the Prometheus Operator and its CRDs
- Create a
prometheus-k8s
ServiceAccount as described in the docs - Install Operator (from
master
or the latest release) - Apply a
GitLab
CR- Verify the CR is reconciled and a
Prometheus
resource is created
- Verify the CR is reconciled and a
- Upgrade the Operator to this branch (not just the image, the whole bundle) and enable prometheus in the CR.
- Verify the
Prometheus
CR is deleted - Verify the Prometheus-chart resources are created
- Verify the
Example CR:
apiVersion: apps.gitlab.com/v1beta1
kind: GitLab
metadata:
name: gitlab
spec:
chart:
values:
prometheus:
alertmanager:
enabled: true
install: true
nodeExporter:
enabled: true
pushgateway:
enabled: true
version: 7.3.4
Related issues
Closes #1354 (closed)
Edited by Clemens Beck