From 46bec904421416cf78a6907d23e4ce40fcff51e5 Mon Sep 17 00:00:00 2001 From: Pramod Date: Wed, 17 Jan 2018 12:36:06 +0000 Subject: config seg vid deployment Issue-ID: OOM-559 Change-Id: I215f471b6711c8491d9381257c1b91ca3d21b8ed Signed-off-by: Pramod --- .../vid/templates/vid-lfconfig-configmap.yaml | 9 +++++++++ kubernetes/vid/templates/vid-log-configmap.yaml | 17 ++++++++++++++++ .../vid/templates/vid-mariadb-deployment.yaml | 23 +++++++++++++--------- .../vid/templates/vid-server-deployment.yaml | 12 ++++++----- 4 files changed, 47 insertions(+), 14 deletions(-) create mode 100644 kubernetes/vid/templates/vid-lfconfig-configmap.yaml create mode 100644 kubernetes/vid/templates/vid-log-configmap.yaml (limited to 'kubernetes/vid/templates') diff --git a/kubernetes/vid/templates/vid-lfconfig-configmap.yaml b/kubernetes/vid/templates/vid-lfconfig-configmap.yaml new file mode 100644 index 0000000000..1cc3f218b9 --- /dev/null +++ b/kubernetes/vid/templates/vid-lfconfig-configmap.yaml @@ -0,0 +1,9 @@ +#{{ if not .Values.disableVidVidMariadb }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: vid-lfconfig-configmap + namespace: {{ .Values.nsPrefix }}-vid +data: +{{ tpl (.Files.Glob "resources/config/lf_config/*").AsConfig . | indent 2 }} +#{{ end }} diff --git a/kubernetes/vid/templates/vid-log-configmap.yaml b/kubernetes/vid/templates/vid-log-configmap.yaml new file mode 100644 index 0000000000..00481d259e --- /dev/null +++ b/kubernetes/vid/templates/vid-log-configmap.yaml @@ -0,0 +1,17 @@ +#{{ if not .Values.disableVidVidServer }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: vid-log-configmap + namespace: {{ .Values.nsPrefix }}-vid +data: +{{ tpl (.Files.Glob "resources/config/log/vid/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: vid-filebeat-configmap + namespace: {{ .Values.nsPrefix }}-vid +data: +{{ tpl (.Files.Glob "resources/config/log/filebeat/*").AsConfig . | indent 2 }} +#{{ end }} diff --git a/kubernetes/vid/templates/vid-mariadb-deployment.yaml b/kubernetes/vid/templates/vid-mariadb-deployment.yaml index 55ef5da872..758ee578f0 100644 --- a/kubernetes/vid/templates/vid-mariadb-deployment.yaml +++ b/kubernetes/vid/templates/vid-mariadb-deployment.yaml @@ -36,9 +36,11 @@ spec: - mountPath: /var/lib/mysql name: vid-mariadb-data - mountPath: /docker-entrypoint-initdb.d/vid-pre-init.sql - name: vid-pre-init + name: vid-lfconfig + subPath: vid-pre-init.sql - mountPath: /etc/mysql/my.cnf - name: my-cnf + name: vid-lfconfig + subPath: my.cnf ports: - containerPort: 3306 readinessProbe: @@ -53,12 +55,15 @@ spec: - name: vid-mariadb-data persistentVolumeClaim: claimName: vid-db - - name: vid-pre-init - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/vid/vid/lf_config/vid-pre-init.sql - - name: my-cnf - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/vid/vid/lf_config/vid-my.cnf + - name: vid-lfconfig + configMap: + name: vid-lfconfig-configmap + defaultMode: 0755 + items: + - key: vid-my.cnf + path: my.cnf + - key: vid-pre-init.sql + path: vid-pre-init.sql imagePullSecrets: - name: "{{ .Values.nsPrefix }}-docker-registry-key" -#{{ end }} \ No newline at end of file +#{{ end }} diff --git a/kubernetes/vid/templates/vid-server-deployment.yaml b/kubernetes/vid/templates/vid-server-deployment.yaml index 832fdeb93c..c979845fe1 100644 --- a/kubernetes/vid/templates/vid-server-deployment.yaml +++ b/kubernetes/vid/templates/vid-server-deployment.yaml @@ -73,7 +73,7 @@ spec: value: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U - name: VID_MYSQL_MAXCONNECTIONS value: "5" - image: {{ .Values.image.vid }} + image: {{ .Values.image.vid }} imagePullPolicy: {{ .Values.pullPolicy }} name: vid-server lifecycle: @@ -90,6 +90,7 @@ spec: name: vid-logs - mountPath: /tmp/logback.xml name: vid-logback + subPath: logback.xml readinessProbe: tcpSocket: port: 8080 @@ -101,6 +102,7 @@ spec: volumeMounts: - mountPath: /usr/share/filebeat/filebeat.yml name: filebeat-conf + subPath: filebeat.yml - mountPath: /var/log/onap name: vid-logs - mountPath: /usr/share/filebeat/data @@ -110,15 +112,15 @@ spec: hostPath: path: /etc/localtime - name: filebeat-conf - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml + configMap: + name: vid-filebeat-configmap - name: vid-logs emptyDir: {} - name: vid-data-filebeat emptyDir: {} - name: vid-logback - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/vid/logback.xml + configMap: + name: vid-log-configmap imagePullSecrets: - name: "{{ .Values.nsPrefix }}-docker-registry-key" #{{ end }} -- cgit 1.2.3-korg