summaryrefslogtreecommitdiffstats
path: root/kubernetes/common/network-name-gen
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/common/network-name-gen')
-rw-r--r--kubernetes/common/network-name-gen/templates/deployment.yaml13
-rw-r--r--kubernetes/common/network-name-gen/templates/secrets.yaml20
-rw-r--r--kubernetes/common/network-name-gen/templates/service.yaml4
-rw-r--r--kubernetes/common/network-name-gen/values.yaml11
4 files changed, 22 insertions, 26 deletions
diff --git a/kubernetes/common/network-name-gen/templates/deployment.yaml b/kubernetes/common/network-name-gen/templates/deployment.yaml
index dac4e0d4ce..2f9cd6a158 100644
--- a/kubernetes/common/network-name-gen/templates/deployment.yaml
+++ b/kubernetes/common/network-name-gen/templates/deployment.yaml
@@ -20,7 +20,7 @@ metadata:
labels:
app: {{ include "common.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
+ release: {{ include "common.release" . }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
@@ -28,7 +28,7 @@ spec:
metadata:
labels:
app: {{ include "common.name" . }}
- release: {{ .Release.Name }}
+ release: {{ include "common.release" . }}
spec:
initContainers:
- command:
@@ -53,12 +53,9 @@ spec:
- name: SPRING_PROFILE
value: "{{ .Values.config.springProfile }}"
- name: NENG_DB_USER
- value: {{ index .Values "mariadb-galera" "config" "userName" }}
+ {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-user-creds" "key" "login") | indent 10}}
- name: NENG_DB_PASS
- valueFrom:
- secretKeyRef:
- name: {{ template "common.fullname" . }}
- key: db-root-password
+ {{- include "common.secret.envFromSecret" (dict "global" . "uid" "db-user-creds" "key" "password") | indent 10}}
- name: NENG_DB_URL
value: {{ .Values.config.dbUrl }}
- name: POL_CLIENT_AUTH
@@ -97,6 +94,6 @@ spec:
volumes:
- name: certs
secret:
- secretName: {{ .Release.Name}}-aai-keystore
+ secretName: {{ include "common.release" . }}-aai-keystore
imagePullSecrets:
- name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/common/network-name-gen/templates/secrets.yaml b/kubernetes/common/network-name-gen/templates/secrets.yaml
index c8630a2535..d5bdce3e04 100644
--- a/kubernetes/common/network-name-gen/templates/secrets.yaml
+++ b/kubernetes/common/network-name-gen/templates/secrets.yaml
@@ -12,30 +12,18 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-apiVersion: v1
-kind: Secret
-metadata:
- name: {{ include "common.fullname" . }}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.fullname" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-type: Opaque
-data:
- db-root-password: {{ index .Values "mariadb-galera" "config" "mariadbRootPassword" | b64enc | quote }}
+{{ include "common.secret" . }}
---
apiVersion: v1
data:
{{ tpl (.Files.Glob "resources/config/aai_keystore").AsSecrets . | indent 2 }}
metadata:
- name: {{ .Release.Name}}-aai-keystore
+ name: {{ include "common.release" . }}-aai-keystore
namespace: {{ include "common.namespace" . }}
labels:
app: {{ include "common.fullname" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
+ release: {{ include "common.release" . }}
heritage: {{ .Release.Service }}
kind: Secret
-type: Opaque \ No newline at end of file
+type: Opaque
diff --git a/kubernetes/common/network-name-gen/templates/service.yaml b/kubernetes/common/network-name-gen/templates/service.yaml
index 0321be9f28..a4c5b05012 100644
--- a/kubernetes/common/network-name-gen/templates/service.yaml
+++ b/kubernetes/common/network-name-gen/templates/service.yaml
@@ -19,7 +19,7 @@ metadata:
labels:
app: {{ include "common.name" . }}
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
+ release: {{ include "common.release" . }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.service.type }}
@@ -36,4 +36,4 @@ spec:
{{- end}}
selector:
app: {{ include "common.name" . }}
- release: {{ .Release.Name }}
+ release: {{ include "common.release" . }}
diff --git a/kubernetes/common/network-name-gen/values.yaml b/kubernetes/common/network-name-gen/values.yaml
index b8a5dad170..d5897013c4 100644
--- a/kubernetes/common/network-name-gen/values.yaml
+++ b/kubernetes/common/network-name-gen/values.yaml
@@ -32,6 +32,17 @@ global:
# image pull policy
pullPolicy: IfNotPresent
+#################################################################
+# Secrets metaconfig
+#################################################################
+secrets:
+ - uid: "db-user-creds"
+ externalSecret: '{{- include "common.mariadb.secret.userCredentialsSecretName" (dict "dot" . "chartName" (index .Values "mariadb-galera" "nameOverride")) }}'
+ type: basicAuth
+ - uid: "db-root-pass"
+ externalSecret: '{{- include "common.mariadb.secret.rootPassSecretName" (dict "dot" . "chartName" (index .Values "mariadb-galera" "nameOverride")) }}'
+ type: password
+
# sub-chart config
mariadb-galera:
config: