Skip to content

Commit 2c7bb46

Browse files
authored
Fixed vault authentication params (#1253)
1 parent b3fca9c commit 2c7bb46

File tree

3 files changed

+9
-12
lines changed

3 files changed

+9
-12
lines changed

charts/sn-platform/templates/_helpers.tpl

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,10 @@ Define function for get authenticaiton environment variable
257257
key: PULSAR_PREFIX_OIDCTokenAudienceID
258258
{{- if and (eq .Component "proxy") .Values.auth.superUsers.proxyRolesEnabled }}
259259
- name: brokerClientAuthenticationParameters
260-
value: "file:///mnt/token/TOKEN"
260+
value: "file:///mnt/vault/PROXY_brokerClientAuthenticationParameters"
261261
{{- else }}
262262
- name: brokerClientAuthenticationParameters
263-
value: "file:///mnt/token/TOKEN"
263+
value: "file:///mnt/vault/brokerClientAuthenticationParameters"
264264
{{- end }}
265265
{{- end }}
266266
{{- if .Values.auth.authentication.jwt.enabled }}
@@ -291,17 +291,14 @@ Define function for get authenticaiton secret
291291
secretName: "{{ .Values.auth.oauth.brokerClientCredentialSecret }}"
292292
{{- end }}
293293
{{- if and .Values.auth.vault.enabled (or .Values.broker.readPublicKeyFromFile .Values.proxy.readPublicKeyFromFile) }}
294-
{{- if and (eq .Component "proxy") .Values.auth.superUsers.proxyRolesEnabled }}
295-
- mountPath: /mnt/token
296-
secretName: {{ .Release.Name }}-token-proxy-admin
297-
{{- else }}
298-
- mountPath: /mnt/token
299-
secretName: {{ .Release.Name }}-token-admin
300-
{{- end }}
301294
- mountPath: {{ default "/pulsar/vault/v1/identity/oidc/.well-known/keys" .Values.broker.publicKeyPath }}
302295
{{ $defaultSecretName := print (include "pulsar.fullname" .) "-" .Values.vault.component "-public-key" }}
303296
secretName: {{ default $defaultSecretName .Values.broker.publicKeySecret }}
304297
{{- end }}
298+
{{- if .Values.auth.vault.enabled }}
299+
- mountPath: /mnt/vault
300+
secretName: {{ template "pulsar.fullname" . }}-vault-secret-env-injection
301+
{{- end }}
305302
{{- if .Values.auth.authentication.jwt.enabled }}
306303
{{- if and (eq .Component "proxy") .Values.auth.superUsers.proxyRolesEnabled }}
307304
- mountPath: /mnt/token

charts/sn-platform/templates/broker/broker-cluster.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ spec:
8484
{{ toYaml . | indent 6 }}
8585
{{- end }}
8686
{{- end }}
87-
{{- if or (and .Values.auth.vault.enabled .Values.broker.readPublicKeyFromFile) (and .Values.broker.offload.gcs.enabled .Values.broker.offload.gcs.secret) .Values.broker.extraSecretRefs .Values.auth.oauth.enabled .Values.auth.authentication.jwt.enabled }}
87+
{{- if or .Values.auth.vault.enabled (and .Values.broker.offload.gcs.enabled .Values.broker.offload.gcs.secret) .Values.broker.extraSecretRefs .Values.auth.oauth.enabled .Values.auth.authentication.jwt.enabled }}
8888
secretRefs:
8989
{{- if .Values.broker.offload.gcs.secret }}
9090
- mountPath: /pulsar/srvaccts/gcs.json
@@ -93,7 +93,7 @@ spec:
9393
{{- with .Values.broker.extraSecretRefs }}
9494
{{ toYaml . | indent 4 }}
9595
{{- end }}
96-
{{- if or .Values.auth.oauth.enabled .Values.auth.authentication.jwt.enabled (and .Values.auth.vault.enabled .Values.broker.readPublicKeyFromFile) }}
96+
{{- if or .Values.auth.oauth.enabled .Values.auth.authentication.jwt.enabled .Values.auth.vault.enabled }}
9797
{{- include "pulsar.authSecret" (dict "Values" .Values "Component" .Values.broker.component "Release" .Release "Chart" .Chart) | indent 4 }}
9898
{{- end }}
9999
{{- end }}

charts/sn-platform/templates/proxy/proxy-cluster.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ spec:
6767
{{ toYaml . | indent 6 }}
6868
{{- end }}
6969
{{- end }}
70-
{{- if or (and .Values.auth.vault.enabled .Values.proxy.readPublicKeyFromFile) .Values.proxy.extraSecretRefs .Values.auth.oauth.enabled .Values.auth.authentication.jwt.enabled }}
70+
{{- if or .Values.auth.vault.enabled .Values.proxy.extraSecretRefs .Values.auth.oauth.enabled .Values.auth.authentication.jwt.enabled }}
7171
secretRefs:
7272
{{- with .Values.proxy.extraSecretRefs }}
7373
{{ toYaml . | indent 4 }}

0 commit comments

Comments
 (0)