diff --git a/chart/templates/gitlab-runner/values.yaml b/chart/templates/gitlab-runner/values.yaml index d298dcfbb64ed077d175104dfd43eecda025ae5a..bc950621b4a58beddb73272c36f0b3b99181df76 100644 --- a/chart/templates/gitlab-runner/values.yaml +++ b/chart/templates/gitlab-runner/values.yaml @@ -25,4 +25,7 @@ podAnnotations: {{ include "istioAnnotation" . }} {{- end }} +monitoring: + enabled: {{ .Values.monitoring.enabled }} + {{- end -}} diff --git a/chart/templates/gitlab/secret-redis.yaml b/chart/templates/gitlab/secret-redis.yaml new file mode 100644 index 0000000000000000000000000000000000000000..c483c25ea5a0ab0d8171b808cd0df0a4be8721d1 --- /dev/null +++ b/chart/templates/gitlab/secret-redis.yaml @@ -0,0 +1,12 @@ +{{- if or .Values.addons.gitlab.enabled .Values.addons.gitlabRunner.enabled }} +{{- if ne .Values.addons.gitlab.redis.password "" }} +apiVersion: v1 +kind: Secret +metadata: + name: gitlab-redis-secret + namespace: gitlab +type: Opaque +data: + secret: {{ .Values.addons.gitlab.redis.password | b64enc }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/chart/templates/monitoring/grafana-env-secret.yaml b/chart/templates/monitoring/grafana-env-secret.yaml new file mode 100644 index 0000000000000000000000000000000000000000..314062529981325323c7cca4e5b6fc1288cdded9 --- /dev/null +++ b/chart/templates/monitoring/grafana-env-secret.yaml @@ -0,0 +1,12 @@ +{{- if and .Values.monitoring.enabled (ne .Values.addons.gitlab.redis.password "") }} +apiVersion: v1 +kind: Secret +metadata: + name: grafana-env-secret + namespace: monitoring + labels: + grafana_datasource: "1" +type: Opaque +stringData: + GITLAB_REDIS_PASSWORD: {{ .Values.addons.gitlab.redis.password }} +{{- end }} \ No newline at end of file diff --git a/chart/templates/monitoring/values.yaml b/chart/templates/monitoring/values.yaml index 57f22acaaab25de371271f8ca3c0e0e08a7beb55..ee7547fa1eb91e3f313cc1c57d2bae36e93eaced 100644 --- a/chart/templates/monitoring/values.yaml +++ b/chart/templates/monitoring/values.yaml @@ -9,6 +9,9 @@ hostname: {{ $domainName }} domain: {{ $domainName }} {{- $istioInjection := (and (eq (dig "istio" "injection" "enabled" .Values.monitoring) "enabled") .Values.istio.enabled) }} +{{- $gitlabRedis := (and (ne .Values.addons.gitlab.redis.password "" ) (or .Values.addons.gitlab.enabled .Values.addons.gitlabRunner.enabled)) }} +{{- $authserviceRedisEnabled := (and (dig "values" "redis" "enabled" false .Values.addons.authservice) .Values.addons.authservice.enabled) }} +{{- $redisDatasource := (or $gitlabRedis .Values.addons.argocd.enabled $authserviceRedisEnabled) }} flux: enabled: true @@ -108,6 +111,11 @@ kiali: loki: enabled: {{ .Values.loki.enabled }} +{{- if or $gitlabRedis $authserviceRedisEnabled $redisDatasource }} +redis: + enabled: true +{{- end }} + global: imagePullSecrets: - name: private-registry @@ -116,6 +124,11 @@ sso: enabled: {{ .Values.monitoring.sso.enabled }} grafana: + + {{- if $gitlabRedis }} + envFromSecret: grafana-env-secret + {{- end }} + image: pullPolicy: {{ .Values.imagePullPolicy }} pullSecrets: @@ -128,8 +141,58 @@ grafana: {{ include "istioAnnotation" . }} {{- end }} - {{- if or .Values.loki.enabled .Values.tempo.enabled }} + {{- if or .Values.loki.enabled .Values.tempo.enabled $gitlabRedis $authserviceRedisEnabled .Values.addons.argocd.enabled }} additionalDataSources: + {{- if .Values.addons.argocd.enabled }} + - name: Argo Master + type: redis-datasource + access: proxy + url: argocd-argocd-redis-bb-master.argocd.svc.cluster.local:6379 + jsonData: + client: standalone + - name: Argo Headless + type: redis-datasource + access: proxy + url: argocd-argocd-redis-bb-headless.argocd.svc.cluster.local:6379 + jsonData: + client: standalone + - name: Argo Replicas + type: redis-datasource + access: proxy + url: argocd-argocd-redis-bb-replicas.argocd.svc.cluster.local:6379 + jsonData: + client: standalone + {{- end }} + {{- if $authserviceRedisEnabled }} + - name: AuthService Master + type: redis-datasource + access: proxy + url: authservice-authservice-redis-bb-master.authservice.svc.cluster.local:6379 + jsonData: + client: standalone + - name: AuthService Headless + type: redis-datasource + access: proxy + url: authservice-authservice-redis-bb-headless.authservice.svc.cluster.local:6379 + jsonData: + client: standalone + - name: AuthService Replicas + type: redis-datasource + access: proxy + url: authservice-authservice-redis-bb-replicas.authservice.svc.cluster.local:6379 + jsonData: + client: standalone + {{- end }} + {{- if $gitlabRedis }} + - name: GitLab + type: redis-datasource + access: proxy + url: gitlab-redis-master.gitlab.svc.cluster.local:6379 + jsonData: + client: standalone + secureJsonData: + password: $GITLAB_REDIS_PASSWORD + {{- end }} {{- if .Values.loki.enabled }} - name: Loki type: loki @@ -184,8 +247,11 @@ grafana: {{- list "tls_client_key" .tls_client_key | include "bigbang.addValueIfSet" | indent 6 }} {{- end }} - {{- if or .Values.loki.enabled .Values.addons.gitlabRunner.enabled }} + {{- if or .Values.loki.enabled .Values.addons.gitlabRunner.enabled $redisDatasource }} plugins: + {{- if $redisDatasource }} + - redis-datasource + {{- end }} {{- if .Values.loki.enabled }} - grafana-piechart-panel {{- end }} diff --git a/chart/values.yaml b/chart/values.yaml index 5bfed041f0ba3aa3e066bc30c3096ba8528a9ec9..4d46211c612a2ad13612eff29e2c5d487804d280 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -544,7 +544,7 @@ monitoring: git: repo: https://repo1.dso.mil/platform-one/big-bang/apps/core/monitoring.git path: "./chart" - tag: "32.2.1-bb.0" + tag: "32.2.1-bb.1" # -- Flux reconciliation overrides specifically for the Monitoring Package flux: @@ -630,7 +630,7 @@ addons: git: repo: https://repo1.dso.mil/platform-one/big-bang/apps/core/argocd.git path: "./chart" - tag: "3.33.5-bb.4" + tag: "3.33.5-bb.5" # -- Flux reconciliation overrides specifically for the ArgoCD Package flux: {} @@ -674,7 +674,7 @@ addons: git: repo: https://repo1.dso.mil/platform-one/big-bang/apps/core/authservice.git path: "./chart" - tag: "0.4.0-bb.24" + tag: "0.4.0-bb.25" # -- Flux reconciliation overrides specifically for the Authservice Package flux: {} @@ -747,7 +747,7 @@ addons: git: repo: https://repo1.dso.mil/platform-one/big-bang/apps/developer-tools/gitlab.git path: "./chart" - tag: "5.8.2-bb.0" + tag: "5.8.2-bb.1" # -- Flux reconciliation overrides specifically for the Gitlab Package flux: {} @@ -830,6 +830,12 @@ addons: # -- Name of AWS IAM profile to use. # -- If using an AWS IAM profile, the accessKey and accessSecret values must be left as empty strings eg: "" iamProfile: "" + + redis: + # -- Redis plain text password to connect to the redis server. If empty (""), the gitlab charts will create the gitlab-redis-secret + # with a random password. + # -- This needs to be set to a non-empty value in order for the Grafana Redis Datasource and Dashboards to be installed. + password: "" # -- Values to passthrough to the gitlab chart: https://repo1.dso.mil/platform-one/big-bang/apps/developer-tools/gitlab.git values: {} @@ -843,7 +849,7 @@ addons: git: repo: https://repo1.dso.mil/platform-one/big-bang/apps/developer-tools/gitlab-runner.git path: "./chart" - tag: "0.37.2-bb.0" + tag: "0.37.2-bb.1" # -- Flux reconciliation overrides specifically for the Gitlab Runner Package flux: {}