Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions charts/sn-platform-slim/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,24 @@ Define function for get authenticaiton environment variable
{{- if .Values.auth.authentication.jwt.enabled }}
{{- if and (eq .Component "proxy") .Values.auth.superUsers.proxyRolesEnabled }}
- name: brokerClientAuthenticationParameters
{{- if .Values.auth.authentication.jwt.readTokenFromFile }}
value: "file:///mnt/token/TOKEN"
{{- else }}
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-token-proxy-admin
key: TOKEN
{{- end }}
{{- else }}
- name: brokerClientAuthenticationParameters
{{- if .Values.auth.authentication.jwt.readTokenFromFile }}
value: "file:///mnt/token/TOKEN"
{{- else }}
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-token-admin
key: TOKEN
{{- end }}
{{- end }}
{{- if .Values.auth.authentication.jwt.usingSecretKey }}
- name: tokenSecretKey
Expand All @@ -265,13 +279,15 @@ Define function for get authenticaiton secret
secretName: "{{ .Values.auth.oauth.brokerClientCredentialSecret }}"
{{- end }}
{{- if .Values.auth.authentication.jwt.enabled }}
{{- if .Values.auth.authentication.jwt.readTokenFromFile }}
{{- if and (eq .Component "proxy") .Values.auth.superUsers.proxyRolesEnabled }}
- mountPath: /mnt/token
secretName: {{ .Release.Name }}-token-proxy-admin
{{- else }}
- mountPath: /mnt/token
secretName: {{ .Release.Name }}-token-admin
{{- end }}
{{- end }}
{{- if .Values.auth.authentication.jwt.usingSecretKey }}
- mountPath: /mnt/secrets
secretName: {{ .Release.Name }}-token-symmetric-key
Expand Down
1 change: 1 addition & 0 deletions charts/sn-platform-slim/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ auth:
usingSecretKey: false
# Whether to enable automatic initialization jwt authentication secret
autoInitSecret: false
readTokenFromFile: false
tls:
enabled: false
authorization:
Expand Down
16 changes: 16 additions & 0 deletions charts/sn-platform/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,24 @@ Define function for get authenticaiton environment variable
{{- if .Values.auth.authentication.jwt.enabled }}
{{- if and (eq .Component "proxy") .Values.auth.superUsers.proxyRolesEnabled }}
- name: brokerClientAuthenticationParameters
{{- if .Values.auth.authentication.jwt.readTokenFromFile }}
value: "file:///mnt/token/TOKEN"
{{- else }}
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-token-proxy-admin
key: TOKEN
{{- end }}
{{- else }}
- name: brokerClientAuthenticationParameters
{{- if .Values.auth.authentication.jwt.readTokenFromFile }}
value: "file:///mnt/token/TOKEN"
{{- else }}
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-token-admin
key: TOKEN
{{- end }}
{{- end }}
{{- if .Values.auth.authentication.jwt.usingSecretKey }}
- name: tokenSecretKey
Expand All @@ -291,13 +305,15 @@ Define function for get authenticaiton secret
secretName: "{{ .Values.auth.oauth.brokerClientCredentialSecret }}"
{{- end }}
{{- if and .Values.auth.vault.enabled (or .Values.broker.readPublicKeyFromFile .Values.proxy.readPublicKeyFromFile) }}
{{- if .Values.auth.authentication.jwt.readTokenFromFile }}
{{- if and (eq .Component "proxy") .Values.auth.superUsers.proxyRolesEnabled }}
- mountPath: /mnt/token
secretName: {{ .Release.Name }}-token-proxy-admin
{{- else }}
- mountPath: /mnt/token
secretName: {{ .Release.Name }}-token-admin
{{- end }}
{{- end }}
- mountPath: {{ default "/pulsar/vault/v1/identity/oidc/.well-known/keys" .Values.broker.publicKeyPath }}
{{ $defaultSecretName := print (include "pulsar.fullname" .) "-" .Values.vault.component "-public-key" }}
secretName: {{ default $defaultSecretName .Values.broker.publicKeySecret }}
Expand Down
1 change: 1 addition & 0 deletions charts/sn-platform/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ auth:
usingSecretKey: false
# Whether to enable automatic initialization jwt authentication secret
autoInitSecret: false
readTokenFromFile: false
tls:
enabled: false
authorization:
Expand Down
Loading