From 5bb00dc24e9e09381b9901506e36608357404962 Mon Sep 17 00:00:00 2001 From: suyiiyii Date: Sun, 25 Aug 2024 11:11:18 +0800 Subject: [PATCH] feat: add secret.yaml template for storing sensitive data This commit adds a new file, secret.yaml, which is a template for storing sensitive data such as database credentials and JWT secret. The template includes placeholders for the values, which will be populated during deployment. --- templates/secret.yaml | 12 ++++++++++++ values.yaml | 11 +++++++++++ 2 files changed, 23 insertions(+) create mode 100644 templates/secret.yaml diff --git a/templates/secret.yaml b/templates/secret.yaml new file mode 100644 index 0000000..dbc3d9f --- /dev/null +++ b/templates/secret.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +data: + spring.datasource.url: {{ .Values.spring.datasource.url | b64enc | quote }} + spring.datasource.username: {{ .Values.spring.datasource.username | b64enc | quote }} + spring.datasource.password: {{ .Values.spring.datasource.password | b64enc | quote }} + spring.datasource.driver-class-name: {{ .Values.spring.datasource.driver-class-name | b64enc | quote }} + jwt.secret: {{ .Values.jwt.secret | b64enc | quote }} + +kind: Secret +metadata: + creationTimestamp: null + name: secret diff --git a/values.yaml b/values.yaml index 8b44797..8f08f33 100644 --- a/values.yaml +++ b/values.yaml @@ -2,6 +2,17 @@ # This is a YAML-formatted file. # Declare variables to be passed into your templates. +spring: + datasource: + url: + username: + password: + driver-class-name: + +jwt: + secret: + + replicaCount: 1 image: