From 2bdeee4863a08475349ef9de8605b788b1619050 Mon Sep 17 00:00:00 2001 From: Bailin He <15058035+bailinhe@users.noreply.github.com> Date: Mon, 7 Oct 2024 16:21:24 -0400 Subject: [PATCH] Update helm chart (#325) * update helm chart Signed-off-by: Bailin He * fix things * add tokenSecretName * fixed unclosed if's Signed-off-by: Bailin He --------- Signed-off-by: Bailin He --- chart/identity-api/templates/deployment.yaml | 17 +++++++++++++++++ chart/identity-api/values.yaml | 19 +++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/chart/identity-api/templates/deployment.yaml b/chart/identity-api/templates/deployment.yaml index 0cfce552..1955f2f7 100644 --- a/chart/identity-api/templates/deployment.yaml +++ b/chart/identity-api/templates/deployment.yaml @@ -94,6 +94,14 @@ spec: {{- end }} containers: - name: {{ include "common.names.name" . }} + {{- if .Values.config.events.nats.tokenSecretName }} + env: + - name: IDENTITYAPI_EVENTS_NATS_TOKEN + valueFrom: + secretKeyRef: + name: "{{ .Values.config.events.nats.tokenSecretName }}" + key: token + {{- end }} envFrom: - secretRef: name: "{{ .Values.config.oauth.secretName }}" @@ -113,6 +121,10 @@ spec: - name: crdb-ca mountPath: "{{ .Values.config.storage.crdb.certMountPath }}" {{- end }} + {{- if .Values.config.events.nats.credsSecretName }} + - name: nats-creds + mountPath: /nats + {{- end }} {{- if .Values.config.audit.enabled }} - name: audit-logs mountPath: /app-audit @@ -167,6 +179,11 @@ spec: secret: secretName: "{{ . }}" {{- end }} + {{- with .Values.config.events.nats.credsSecretName}} + - name: nats-creds + secret: + secretName: "{{ . }}" + {{- end }} {{- if .Values.config.audit.enabled }} - name: audit-logs emptyDir: {} diff --git a/chart/identity-api/values.yaml b/chart/identity-api/values.yaml index 077a8857..ee223494 100644 --- a/chart/identity-api/values.yaml +++ b/chart/identity-api/values.yaml @@ -31,6 +31,25 @@ config: # - "1.2.3.4/32" # - "1.2.3.0/24" + events: + nats: + # url is the event server connection url + url: "" + # source defines the source of the events (defaults to application name) + source: "" + # publishPrefix is the prefix to add to all published events + publishPrefix: "" + # connectTimeout is event connection timeout + connectTimeout: "10s" + # shutdownTimeout is the shutdown grace period + shutdownTimeout: "5s" + # tokenSecretName is the secret to load the auth token + tokenSecretName: "" + # credsSecretName is the secret to load the creds auth file from + credsSecretName: "" + # credsFile is the location to read the creds file from + credsFile: "/nats/creds" + otel: enabled: false provider: stdout