From 7aa3997ea19d870cdf6415185314605caa7e1167 Mon Sep 17 00:00:00 2001 From: Kranium Gikos Mendoza Date: Tue, 26 Sep 2023 21:19:33 +1000 Subject: [PATCH] feat(agent): new API_KEY_SALT env Signed-off-by: Kranium Gikos Mendoza --- infrastructure/charts/agent/templates/deployment.yaml | 6 ++++++ .../templates/stringsecret-agent-api-key-salt.yaml | 11 +++++++++++ 2 files changed, 17 insertions(+) create mode 100644 infrastructure/charts/agent/templates/stringsecret-agent-api-key-salt.yaml diff --git a/infrastructure/charts/agent/templates/deployment.yaml b/infrastructure/charts/agent/templates/deployment.yaml index e7190b7fed..28d217fcec 100644 --- a/infrastructure/charts/agent/templates/deployment.yaml +++ b/infrastructure/charts/agent/templates/deployment.yaml @@ -38,6 +38,12 @@ spec: name: agent-admin-token key: token optional: false + - name: API_KEY_SALT + valueFrom: + secretKeyRef: + name: agent-api-key-salt + key: salt + optional: false - name: CASTOR_DB_HOST value: "{{ .Values.database.postgres.managingTeam }}-prism-agent-postgres-cluster.{{.Release.Namespace}}" - name: CASTOR_DB_PORT diff --git a/infrastructure/charts/agent/templates/stringsecret-agent-api-key-salt.yaml b/infrastructure/charts/agent/templates/stringsecret-agent-api-key-salt.yaml new file mode 100644 index 0000000000..d6ad64ad8b --- /dev/null +++ b/infrastructure/charts/agent/templates/stringsecret-agent-api-key-salt.yaml @@ -0,0 +1,11 @@ +apiVersion: "secretgenerator.mittwald.de/v1alpha1" +kind: StringSecret +metadata: + name: "agent-api-key-salt" + namespace: {{ .Release.Namespace }} +spec: + forceRegenerate: false + fields: + - fieldName: "salt" + encoding: "base64" + length: "16"