diff --git a/chart/templates/haproxy/gitrepository.yaml b/chart/templates/haproxy/gitrepository.yaml index cd713d70f883e490d5f32f3441d59249a6f22723..9b42c6ffdb329d07f2ad20ba69135a088b64a14c 100644 --- a/chart/templates/haproxy/gitrepository.yaml +++ b/chart/templates/haproxy/gitrepository.yaml @@ -1,4 +1,5 @@ -{{- if and .Values.istio.enabled .Values.monitoring.sso.enabled }} +{{- $monitoringInjection := dig "istio" "injection" "enabled" .Values.monitoring }} +{{- if and .Values.istio.enabled .Values.monitoring.sso.enabled (eq $monitoringInjection "disabled") }} apiVersion: source.toolkit.fluxcd.io/v1beta1 kind: GitRepository metadata: @@ -15,4 +16,4 @@ spec: {{- include "validRef" .Values.addons.haproxy.git | nindent 4 }} {{ include "gitIgnore" . }} {{- include "gitCreds" . | nindent 2 }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/chart/templates/haproxy/haproxy-authservice.yaml b/chart/templates/haproxy/haproxy-authservice.yaml index 8b6cb7ec718e9ae2b42a811986ba4e41443585f5..68fa6a2e860d6b53096a764403376fc103a5d7cf 100644 --- a/chart/templates/haproxy/haproxy-authservice.yaml +++ b/chart/templates/haproxy/haproxy-authservice.yaml @@ -1,5 +1,6 @@ {{- $fluxSettingsHaProxy := merge .Values.addons.haproxy.flux .Values.flux -}} -{{- if and .Values.istio.enabled .Values.monitoring.sso.enabled }} +{{- $monitoringInjection := dig "istio" "injection" "enabled" .Values.monitoring }} +{{- if and .Values.istio.enabled .Values.monitoring.sso.enabled (eq $monitoringInjection "disabled") }} apiVersion: helm.toolkit.fluxcd.io/v2beta1 kind: HelmRelease metadata: @@ -46,4 +47,4 @@ spec: namespace: {{ .Release.Namespace }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} diff --git a/chart/templates/haproxy/values.yaml b/chart/templates/haproxy/values.yaml index e2bc9efa7438e530ef2ea4c6bb6d21dcbbad8f9b..eb8d0e6896ac69b667651db61e366df0f163a9c1 100644 --- a/chart/templates/haproxy/values.yaml +++ b/chart/templates/haproxy/values.yaml @@ -1,4 +1,5 @@ -{{- if and .Values.istio.enabled .Values.monitoring.sso.enabled }} +{{- $monitoringInjection := dig "istio" "injection" "enabled" .Values.monitoring }} +{{- if and .Values.istio.enabled .Values.monitoring.sso.enabled (eq $monitoringInjection "disabled") }} {{- include "values-secret" (dict "root" $ "package" .Values.addons.haproxy "name" "haproxy-sso" "defaults" (include "bigbang.defaults.haproxy-sso" .)) }} {{- end }} diff --git a/chart/templates/monitoring/monitoring-helmrelease.yaml b/chart/templates/monitoring/monitoring-helmrelease.yaml index 707b100c6823e3ad2adc4cd1d8a7283950646944..2f2095d727a64d8e24ea3919f4e441f47afe45c4 100644 --- a/chart/templates/monitoring/monitoring-helmrelease.yaml +++ b/chart/templates/monitoring/monitoring-helmrelease.yaml @@ -38,7 +38,7 @@ spec: valuesKey: "overlays" # TODO: DRY this up - {{- if or .Values.gatekeeper.enabled .Values.istio.enabled }} + {{- if or .Values.gatekeeper.enabled .Values.istio.enabled .Values.monitoring.sso.enabled }} dependsOn: {{- if .Values.istio.enabled }} - name: istio @@ -48,5 +48,9 @@ spec: - name: gatekeeper namespace: {{ .Release.Namespace }} {{- end }} + {{- if .Values.monitoring.sso.enabled }} + - name: authservice + namespace: {{ .Release.Namespace }} + {{- end }} {{- end }} {{- end }} diff --git a/chart/templates/monitoring/namespace.yaml b/chart/templates/monitoring/namespace.yaml index 2f7400efeec4ada554e562aa03632d11b49350d6..3a92ada6fd34bacc4850e92be14b826aa42fcc3c 100644 --- a/chart/templates/monitoring/namespace.yaml +++ b/chart/templates/monitoring/namespace.yaml @@ -7,5 +7,5 @@ metadata: app.kubernetes.io/name: monitoring app.kubernetes.io/component: "core" {{- include "commonLabels" . | nindent 4}} - istio-injection: disabled -{{- end }} \ No newline at end of file + istio-injection: {{ dig "istio" "injection" "enabled" .Values.monitoring }} +{{- end }} diff --git a/chart/templates/monitoring/values.yaml b/chart/templates/monitoring/values.yaml index b5d9fd7e1539214ccb1238e4acdf39bc0c872e6f..f6c3a351b9e3b421afbc294be5795324aa7dfe66 100644 --- a/chart/templates/monitoring/values.yaml +++ b/chart/templates/monitoring/values.yaml @@ -22,10 +22,11 @@ minioOperator: enabled: {{ .Values.addons.minioOperator.enabled }} istio: + {{- $monitoringInjection := dig "istio" "injection" "enabled" .Values.monitoring }} enabled: {{ .Values.istio.enabled }} prometheus: enabled: true - {{- if .Values.monitoring.sso.enabled }} + {{- if and .Values.monitoring.sso.enabled (eq $monitoringInjection "disabled") }} service: authservice-haproxy-sso port: 8080 namespace: authservice @@ -34,7 +35,7 @@ istio: - istio-system/{{ default "public" .Values.monitoring.ingress.gateway }} alertmanager: enabled: true - {{- if .Values.monitoring.sso.enabled }} + {{- if and .Values.monitoring.sso.enabled (eq $monitoringInjection "disabled") }} service: authservice-haproxy-sso port: 8080 namespace: authservice @@ -45,10 +46,31 @@ istio: enabled: true gateways: - istio-system/{{ default "public" .Values.monitoring.ingress.gateway }} + injection: {{ dig "istio" "injection" "enabled" .Values.monitoring }} + +{{- if .Values.monitoring.sso.enabled }} +alertmanager: + alertmanagerSpec: + {{- $alertmanagerAuthserviceKey := (dig "selector" "key" "protect" .Values.addons.authservice.values) }} + {{- $alertmanagerAuthserviceValue := (dig "selector" "value" "keycloak" .Values.addons.authservice.values) }} + podMetadata: + labels: + {{ $alertmanagerAuthserviceKey }}: {{ $alertmanagerAuthserviceValue }} +prometheus: + prometheusSpec: + {{- $prometheusAuthserviceKey := (dig "selector" "key" "protect" .Values.addons.authservice.values) }} + {{- $prometheusAuthserviceValue := (dig "selector" "value" "keycloak" .Values.addons.authservice.values) }} + podMetadata: + labels: + {{ $prometheusAuthserviceKey }}: {{ $prometheusAuthserviceValue }} +{{- end }} anchore: enabled: {{ .Values.addons.anchore.enabled }} +kiali: + enabled: {{ .Values.kiali.enabled }} + global: imagePullSecrets: - name: private-registry diff --git a/chart/values.yaml b/chart/values.yaml index 09c7c14f842544880424de06b2d660ccfb11dc4e..35ae75907645061bab92e92af7b716c3dd7c0a7c 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -398,7 +398,7 @@ monitoring: git: repo: https://repo1.dso.mil/platform-one/big-bang/apps/core/monitoring.git path: "./chart" - tag: "14.0.0-bb.11" + tag: "14.0.0-bb.17" # -- Flux reconciliation overrides specifically for the Monitoring Package flux: