From bf992b223d7a1cba17457213f6544c81a85696cf Mon Sep 17 00:00:00 2001 From: 0xflatheadfred <139364021+0xflatheadfred@users.noreply.github.com> Date: Mon, 27 Nov 2023 17:36:34 +0200 Subject: [PATCH] [surveyor helm] add support for nkey in the same way as credentials (#832) Add support for specification of an nkey file for auth. Everything is exactly identical to credentials. --- helm/charts/surveyor/templates/deployment.yaml | 14 ++++++++++++++ helm/charts/surveyor/values.yaml | 5 +++++ 2 files changed, 19 insertions(+) diff --git a/helm/charts/surveyor/templates/deployment.yaml b/helm/charts/surveyor/templates/deployment.yaml index 3d4e0c44..2622bcab 100644 --- a/helm/charts/surveyor/templates/deployment.yaml +++ b/helm/charts/surveyor/templates/deployment.yaml @@ -44,6 +44,10 @@ spec: - --creds=/creds/{{ .secret.key }} {{- end }} + {{- with .nkey }} + - --nkey=/nkey/{{ .secret.key }} + {{- end }} + {{- with .servers }} - -s={{ . }} {{- end }} @@ -86,6 +90,11 @@ spec: mountPath: /creds/ readOnly: true {{- end }} + {{- with .Values.config.nkey }} + - name: nkey + mountPath: /nkey/ + readOnly: true + {{- end }} {{- with .Values.config.tls }} - name: {{ .secret.name }}-volume mountPath: /etc/nats-certs/clients/ @@ -116,6 +125,11 @@ spec: secret: secretName: {{ .secret.name }} {{- end }} + {{- with .Values.config.nkey }} + - name: nkey + secret: + secretName: {{ .secret.name }} + {{- end }} {{- with .Values.config.tls }} - name: {{ .secret.name }}-volume secret: diff --git a/helm/charts/surveyor/values.yaml b/helm/charts/surveyor/values.yaml index 3be40e6c..408063b7 100644 --- a/helm/charts/surveyor/values.yaml +++ b/helm/charts/surveyor/values.yaml @@ -114,6 +114,11 @@ config: # name: nats-sys-creds # key: sys.creds + # nkey: + # secret: + # name: nats-sys-nkey + # key: sys.nkey + # Required for NATS mutual TLS # tls: # secret: