Use {Service,Pod}Monitors from the Helm template
What does this MR do?
Replaces {Service,Pod}Monitor objects using objects from the Helm template. See commit messages for more information.
Related: gitlab-org/charts/gitlab!2376 (merged)
Test plan
Build the Operator manifest, configuring the image tag:
TAG=$(git branch --show-current) task build_operator
Install CR, enabling a PodMonitor and ServiceMonitor to test:
apiVersion: apps.gitlab.com/v1beta1
kind: GitLab
metadata:
name: gitlab
namespace: gitlab-system
spec:
chart:
version: "7.4.1"
values:
gitlab:
gitaly:
metrics:
serviceMonitor:
enabled: true
sidekiq:
metrics:
podMonitor:
enabled: true
global:
appConfig:
initialDefaults:
signupEnabled: false
hosts:
domain: mydomain.com
externalIP: 1.2.3.4
certmanager-issuer:
email: mnielsen@gitlab.com
Ensure CR is Running
:
$ kubectl get gl
NAME STATUS VERSION
gitlab Running 7.4.1
Ensure objects exist:
$ kubectl get podmonitors
NAME AGE
gitlab-sidekiq 8m50s
$ kubectl get servicemonitors
NAME AGE
gitlab-gitaly 8m58s
gitlab-postgresql 8m58s
gitlab-redis 8m58s
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 (see !661 (comment 1602841777)) -
Integration tests added to GitLab QA -
Equivalent MR/issue for omnibus-gitlab opened -
Validate potential values for new configuration settings. Formats such as integer10
, duration10s
, URIscheme://user:passwd@host:port
may require quotation or other special handling when rendered in a template and written to a configuration file.
Related issues
Closes #621 (closed)
Edited by Mitchell Nielsen