From 554bc6b6d540810be1fd2c4fa1117719c21527de Mon Sep 17 00:00:00 2001 From: Sylvain Desbureaux Date: Thu, 25 Feb 2021 18:13:19 +0100 Subject: [VNFSDK] Automatically retrieve certificates Instead of using hardcoded certificates, let's use certInitializer in order to retrieve them. Issue-ID: OOM-2696 Signed-off-by: Sylvain Desbureaux Change-Id: I6ed12dda660647cd0990c34f51e6c05ed533774a --- kubernetes/vnfsdk/templates/configmap.yaml | 13 +++++++++++++ kubernetes/vnfsdk/templates/deployment.yaml | 12 +++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) (limited to 'kubernetes/vnfsdk/templates') diff --git a/kubernetes/vnfsdk/templates/configmap.yaml b/kubernetes/vnfsdk/templates/configmap.yaml index c41c3ef0d6..d06379331f 100644 --- a/kubernetes/vnfsdk/templates/configmap.yaml +++ b/kubernetes/vnfsdk/templates/configmap.yaml @@ -26,3 +26,16 @@ metadata: heritage: {{ .Release.Service }} data: {{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "common.fullname" . }}-nginx + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ include "common.release" . }} + heritage: {{ .Release.Service }} +data: +{{ tpl (.Files.Glob "resources/nginx/*").AsConfig . | indent 2 }} \ No newline at end of file diff --git a/kubernetes/vnfsdk/templates/deployment.yaml b/kubernetes/vnfsdk/templates/deployment.yaml index 7e4ad5bd92..89eba2f360 100644 --- a/kubernetes/vnfsdk/templates/deployment.yaml +++ b/kubernetes/vnfsdk/templates/deployment.yaml @@ -35,7 +35,7 @@ spec: release: {{ include "common.release" . }} name: {{ include "common.name" . }} spec: - initContainers: + initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }} - command: - sh args: @@ -75,10 +75,13 @@ spec: name: {{ include "common.name" . }} resources: {{ include "common.resources" . | indent 12 }} - volumeMounts: + volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 8 }} - mountPath: /service/webapps/ROOT/WEB-INF/classes/mybatis/configuration/configuration.xml name: init-data subPath: configuration.xml + - mountPath: /etc/nginx/nginx.conf + name: nginx + subPath: nginx.conf readinessProbe: tcpSocket: port: {{ .Values.service.internalPort }} @@ -86,10 +89,13 @@ spec: periodSeconds: {{ .Values.readiness.periodSeconds }} imagePullSecrets: - name: "{{ include "common.namespace" . }}-docker-registry-key" - volumes: + volumes: {{ include "common.certInitializer.volumes" . | nindent 6 }} - name: init-data-input configMap: name: {{ include "common.fullname" . }} + - name: nginx + configMap: + name: {{ include "common.fullname" . }}-nginx - name: init-data emptyDir: medium: Memory -- cgit 1.2.3-korg