Skip to content

Commit 0c3a784

Browse files
fix: Azure aks scanner (#14)
1 parent 6b9d535 commit 0c3a784

File tree

6 files changed

+30
-1
lines changed

6 files changed

+30
-1
lines changed

charts/ctrlplane/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: ctrlplane
33
description: Ctrlplane Helm chart for Kubernetes
44
type: application
5-
version: 0.3.6
5+
version: 0.3.7
66
appVersion: "1.16.0"
77

88
maintainers:

charts/ctrlplane/charts/event-worker/templates/deployment.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,16 @@ spec:
7878
- name: GITHUB_BOT_NAME
7979
value: {{ .name }}
8080
{{- end }}
81+
{{- with (include "ctrlplane.azureApp" . | fromYaml) }}
82+
- name: AZURE_APP_CLIENT_ID
83+
value: {{ .clientId | quote }}
84+
- name: AZURE_APP_CLIENT_SECRET
85+
valueFrom:
86+
secretKeyRef:
87+
name: {{ .secretRef }}
88+
key: AZURE_APP_CLIENT_SECRET
89+
optional: true
90+
{{- end }}
8191
{{- include "ctrlplane.extraEnv" . | nindent 12 }}
8292
{{- include "ctrlplane.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }}
8393
resources:

charts/ctrlplane/charts/webservice/templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,10 @@ spec:
115115
# - name: OTEL_EXPORTER_OTLP_ENDPOINT
116116
# value: http://{{ $.Release.Name }}-otel:4318
117117
{{- end }}
118+
{{- with (include "ctrlplane.azureApp" . | fromYaml) }}
119+
- name: AZURE_APP_CLIENT_ID
120+
value: {{ .clientId | quote }}
121+
{{- end }}
118122
{{- include "ctrlplane.extraEnv" . | nindent 12 }}
119123
{{- include "ctrlplane.extraEnvFrom" (dict "root" $ "local" .) | nindent 12 }}
120124
livenessProbe:
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{{/*
2+
Azure app configuration
3+
*/}}
4+
{{- define "ctrlplane.azureApp" -}}
5+
{{- if .Values.global.integrations.azure }}
6+
clientId: {{ .Values.global.integrations.azure.appClientId }}
7+
secretRef: {{ .Release.Name }}-connections
8+
{{- end -}}
9+
{{- end -}}

charts/ctrlplane/templates/secrets.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ data:
1818
{{- if .Values.global.integrations.github.bot.webhookSecret }}
1919
GITHUB_WEBHOOK_SECRET: {{ .Values.global.integrations.github.bot.webhookSecret | b64enc }}
2020
{{- end }}
21+
{{- if .Values.global.integrations.azure.appClientSecret }}
22+
AZURE_APP_CLIENT_SECRET: {{ .Values.global.integrations.azure.appClientSecret | b64enc }}
23+
{{- end }}
2124
---
2225
{{- $secretName := (printf "%s-encryption-key" .Release.Name) }}
2326
{{- $secret := (lookup "v1" "Secret" .Release.Namespace $secretName) }}

charts/ctrlplane/values.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ global:
3939
clientSecret: ""
4040
privateKey: ""
4141
webhookSecret: ""
42+
azure:
43+
appClientId: ""
44+
appClientSecret: ""
4245

4346
webservice:
4447
install: true

0 commit comments

Comments
 (0)