@@ -67,17 +67,12 @@ releases:
6767 kind: Service
6868 name: {{ $teamId }}-tekton-dashboard
6969 port: 9097
70- filters:
71- - type: RequestHeaderModifier
72- requestHeaderModifier:
73- remove:
74- - authorization
7570 matches:
7671 - path:
7772 type: PathPrefix
7873 value: /
7974 {{- $httpRoute .authRules | toYaml | nindent 16 }}
80- - {{ tpl (readFile " ../helmfile.d/snippets/authpolicy.gotmpl" ) (dict " prefix" (print " tekton-" $teamId ) " gatewayName" $gatewayName " host" $tektonHostname ) | nindent 12 }}
75+ - {{ tpl (readFile " ../helmfile.d/snippets/authpolicy-oauth2-ext .gotmpl" ) (dict " prefix" (print " tekton-" $teamId ) " gatewayName" $gatewayName " host" $tektonHostname ) | nindent 12 }}
8176 - {{ tpl (readFile " ../helmfile.d/snippets/serviceentry.gotmpl" ) (dict " name" (print " tekton-" $teamId ) " host" $tektonHostname ) | nindent 12 }}
8277 - name: prometheus-{{ $teamId }}
8378 installed: {{ or ($teamSettings | get " managedMonitoring.grafana" false) ($teamSettings | get " managedMonitoring.alertmanager" false) }}
@@ -97,13 +92,11 @@ releases:
9792 namespaceOverride: null
9893 alertmanagerSpec:
9994 externalUrl: " https://{{ $alertmanagerHostname }}"
100- podMetadata:
101- annotations:
102- sidecar.istio.io /inject: " true"
103- labels:
104- prometheus: system
10595 resources:
10696 {{- $teamApps .alertmanager.resources | toYaml | nindent 14 }}
97+ podMetadata:
98+ labels:
99+ otomi.io /auth-policy: monitoring-{{ $teamId }}
107100 # to do: load slackTpl and opsgenieTpl only if alerts.receicers = true
108101 config: {{- tpl (readFile " ../helmfile.d/snippets/alertmanager-teams.gotmpl" ) (dict " instance" $teamSettings " root" $v " slackTpl" $slackTpl " opsgenieTpl" $opsgenieTpl ) | nindent 12 }}
109102 route:
@@ -169,8 +162,11 @@ releases:
169162 basicAuthUser: {{ $teamId }}
170163 secureJsonData:
171164 basicAuthPassword: {{ $teamSettings .password | quote }}
165+ podLabels:
166+ otomi.io /auth-policy: monitoring-{{ $teamId }}
172167 extraManifests:
173- - {{ tpl (readFile " ../helmfile.d/snippets/authpolicy.gotmpl" ) (dict " prefix" (print " monitoring-" $teamId ) " gatewayName" $gatewayName " hosts" (list $alertmanagerHostname $grafanaHostname )) | nindent 12 }}
168+ - {{ tpl (readFile " ../helmfile.d/snippets/authpolicy-oauth2-ext.gotmpl" ) (dict " prefix" (print " monitoring-" $teamId ) " gatewayName" $gatewayName " hosts" (list $alertmanagerHostname $grafanaHostname )) | nindent 12 }}
169+ - {{ tpl (readFile " ../helmfile.d/snippets/authpolicy-jwt.gotmpl" ) (dict " name" (print " monitoring-" $teamId ) " excludeNamespace" (print " team-" $teamId ) " excludeAccount" " monitoring/po-prometheus" ) | nindent 12 }}
174170 - {{ tpl (readFile " ../helmfile.d/snippets/serviceentry.gotmpl" ) (dict " name" (print " monitoring-" $teamId ) " hosts" (list $alertmanagerHostname $grafanaHostname )) | nindent 12 }}
175171 {{- if has " msteams" ($teamSettings | get " alerts.receivers" list) }}
176172 - name: prometheus-msteams-{{ $teamId }}
0 commit comments