Skip to content

Commit 779cd53

Browse files
committed
feat(charts/authentik): add blueprints-sidecar to collect from cluster
1 parent c3ef453 commit 779cd53

File tree

3 files changed

+65
-0
lines changed

3 files changed

+65
-0
lines changed

charts/authentik/templates/deployment.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ spec:
9494
- name: geoip-db
9595
mountPath: /geoip
9696
{{- end }}
97+
{{- if $.Values.sidecar.blueprints.enabled }}
98+
- name: sidecar-blueprints
99+
mountPath: /blueprints/sidecar
100+
{{- end }}
97101
{{- with $.Values.volumeMounts }}
98102
{{- toYaml . | nindent 12 }}
99103
{{- end }}
@@ -151,6 +155,26 @@ spec:
151155
- name: geoip-db
152156
mountPath: /usr/share/GeoIP
153157
{{- end }}
158+
{{- with $.Values.sidecar.blueprints }}
159+
{{- if .enabled }}
160+
- name: sidecar-blueprints
161+
image: "{{ .image.repository }}:{{ .image.tag }}"
162+
env:
163+
- name: "FOLDER"
164+
value: "/blueprints/sidecar"
165+
- name: "LABEL"
166+
value: "goauthentik_blueprint"
167+
- name: "LABEL_VALUE"
168+
value: "1"
169+
{{- with .namespace }}
170+
- name: "NAMESPACE"
171+
value: "{{ . }}"
172+
{{- end }}
173+
volumeMounts:
174+
- name: sidecar-blueprints
175+
mountPath: /blueprints/sidecar
176+
{{- end }}
177+
{{- end }}
154178
{{- with $.Values.additionalContainers }}
155179
{{- $additionalContainers := list }}
156180
{{- range $name, $container := . }}
@@ -166,6 +190,10 @@ spec:
166190
- name: geoip-db
167191
emptyDir: {}
168192
{{- end }}
193+
{{- if $.Values.sidecar.blueprints.enabled }}
194+
- name: sidecar-blueprints
195+
emptyDir: {}
196+
{{- end }}
169197
{{- with $.Values.volumes }}
170198
{{- toYaml . | nindent 8 }}
171199
{{- end }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{{- if .Values.serviceAccount.create }}
2+
3+
{{ include "common.serviceAccount" . }}
4+
5+
{{- if .Values.sidecar.blueprints.enabled }}
6+
---
7+
apiVersion: rbac.authorization.k8s.io/v1
8+
kind: ClusterRole
9+
metadata:
10+
name: {{ include "common.names.fullname" . }}
11+
rules:
12+
- apiGroups: [""]
13+
resources: ["configmaps", "secrets"]
14+
verbs: ["get", "watch", "list"]
15+
---
16+
kind: ClusterRoleBinding
17+
apiVersion: rbac.authorization.k8s.io/v1
18+
metadata:
19+
name: {{ include "common.names.fullname" . }}
20+
roleRef:
21+
kind: ClusterRole
22+
name: {{ include "common.names.fullname" . }}
23+
apiGroup: rbac.authorization.k8s.io
24+
subjects:
25+
- kind: ServiceAccount
26+
name: {{ include "common.names.fullname" . }}
27+
namespace: {{ .Release.Namespace }}
28+
{{- end }}
29+
{{- end }}

charts/authentik/values.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,14 @@ prometheus:
182182
# -- labels additional on PrometheusRule
183183
labels: {}
184184

185+
sidecar:
186+
blueprints:
187+
enabled: false
188+
image:
189+
repository: "ghcr.io/kiwigrid/k8s-sidecar"
190+
tag: "1.23.0"
191+
namespace: ""
192+
185193
geoip:
186194
# -- optional GeoIP, deploys a cronjob to download the maxmind database
187195
enabled: false

0 commit comments

Comments
 (0)