Skip to content

Commit 5d34581

Browse files
authored
feat: added keycloak client secret (#366)
* feat: added keycloak client secret On-behalf-of: SAP [email protected] * fix: removed password arg On-behalf-of: SAP [email protected] * version bump On-behalf-of: SAP [email protected]
1 parent c51b2b3 commit 5d34581

File tree

5 files changed

+24
-6
lines changed

5 files changed

+24
-6
lines changed

charts/security-operator/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: security-operator
33
description: A Helm chart for security-operator
44
type: application
5-
version: 0.18.21
5+
version: 0.18.22
66
appVersion: "v0.9.20"
77
dependencies:
88
- name: security-operator-crds

charts/security-operator/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ A Helm chart for security-operator
2424
| image.name | string | `"ghcr.io/platform-mesh/security-operator"` | |
2525
| initializer.extraArgs | list | `[]` | |
2626
| initializer.kubeconfigSecret | string | `""` | The kubeconfig secret for the initializer |
27+
| keycloak.client.secret.key | string | `"attribute.client_secret"` | |
28+
| keycloak.client.secret.name | string | `"security-operator-client-secret"` | |
2729
| keycloakSecret | string | `"keycloak-admin"` | |
2830
| kubeconfigSecret | string | `""` | The kubeconfig secret for operator and generator |
2931
| logLevel | string | `"info"` | |

charts/security-operator/templates/deployment.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ spec:
2525
{{- include "common.PortsMetricsHealth" . | nindent 10 }}
2626
args:
2727
- fga
28-
{{- with .Values.keycloakSecret }}
29-
- --invite-keycloak-password-file=/keycloak-credentials/secret
30-
{{- end }}
3128
{{- with .Values.fga.inviteKeycloakBaseUrl }}
3229
- --invite-keycloak-base-url={{ . }}
3330
{{- end }}
@@ -46,6 +43,11 @@ spec:
4643
- name: KCP_KUBECONFIG
4744
value: /api-kubeconfig/kubeconfig
4845
{{- end }}
46+
- name: INVITE_KEYCLOAK_CLIENT_SECRET
47+
valueFrom:
48+
secretKeyRef:
49+
name: {{ .Values.keycloak.client.secret.name }}
50+
key: {{ .Values.keycloak.client.secret.key }}
4951
volumeMounts:
5052
{{- if .Values.kubeconfigSecret }}
5153
- name: external-api-server

charts/security-operator/tests/__snapshot__/deployment_test.yaml.snap

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ operator match the snapshot:
162162
containers:
163163
- args:
164164
- fga
165-
- --invite-keycloak-password-file=/keycloak-credentials/secret
166165
- --leader-elect
167166
- --metrics-bind-address=:9090
168167
- --health-probe-bind-address=:8090
@@ -178,6 +177,11 @@ operator match the snapshot:
178177
value: openfga.platform-mesh-system.svc.cluster.local:8081
179178
- name: KCP_KUBECONFIG
180179
value: /api-kubeconfig/kubeconfig
180+
- name: INVITE_KEYCLOAK_CLIENT_SECRET
181+
valueFrom:
182+
secretKeyRef:
183+
key: attribute.client_secret
184+
name: security-operator-client-secret
181185
image: ghcr.io/platform-mesh/security-operator:1.0.0
182186
imagePullPolicy: IfNotPresent
183187
livenessProbe:
@@ -593,7 +597,6 @@ operator match the snapshot w. sentry:
593597
containers:
594598
- args:
595599
- fga
596-
- --invite-keycloak-password-file=/keycloak-credentials/secret
597600
- --leader-elect
598601
- --metrics-bind-address=:9090
599602
- --health-probe-bind-address=:8090
@@ -614,6 +617,11 @@ operator match the snapshot w. sentry:
614617
value: test
615618
- name: FGA_TARGET
616619
value: openfga.platform-mesh-system.svc.cluster.local:8081
620+
- name: INVITE_KEYCLOAK_CLIENT_SECRET
621+
valueFrom:
622+
secretKeyRef:
623+
key: attribute.client_secret
624+
name: security-operator-client-secret
617625
image: ghcr.io/platform-mesh/security-operator:1.0.0
618626
imagePullPolicy: IfNotPresent
619627
livenessProbe:

charts/security-operator/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ caSecret: ""
2929

3030
baseDomain: ""
3131

32+
keycloak:
33+
client:
34+
secret:
35+
name: security-operator-client-secret
36+
key: attribute.client_secret
37+
3238
initializer:
3339
# -- The kubeconfig secret for the initializer
3440
kubeconfigSecret: ""

0 commit comments

Comments
 (0)