From eea1d3ec1680d1ef203840986962f6535736ae38 Mon Sep 17 00:00:00 2001 From: mayankg2703 Date: Tue, 16 Jan 2018 05:27:01 +0000 Subject: sdnc stateful config seg Issue-ID: OOM-551 Change-Id: I5f0929f09b52cba4f8d4c0d1aabaa555349933a1 Signed-off-by: mayankg2703 --- kubernetes/sdnc/templates/sdnc-conf-configmap.yaml | 9 +++++ kubernetes/sdnc/templates/sdnc-log-configmap.yaml | 17 ++++++++++ kubernetes/sdnc/templates/sdnc-statefulset.yaml | 38 +++++++++++++--------- 3 files changed, 49 insertions(+), 15 deletions(-) create mode 100644 kubernetes/sdnc/templates/sdnc-conf-configmap.yaml create mode 100644 kubernetes/sdnc/templates/sdnc-log-configmap.yaml (limited to 'kubernetes/sdnc/templates') diff --git a/kubernetes/sdnc/templates/sdnc-conf-configmap.yaml b/kubernetes/sdnc/templates/sdnc-conf-configmap.yaml new file mode 100644 index 0000000000..e7cde3b69f --- /dev/null +++ b/kubernetes/sdnc/templates/sdnc-conf-configmap.yaml @@ -0,0 +1,9 @@ +#{{ if not .Values.disableSdncSdnc }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: sdnc-conf-configmap + namespace: {{ .Values.nsPrefix }}-sdnc +data: +{{ tpl (.Files.Glob "resources/config/conf/*").AsConfig . | indent 2 }} +#{{ end }} diff --git a/kubernetes/sdnc/templates/sdnc-log-configmap.yaml b/kubernetes/sdnc/templates/sdnc-log-configmap.yaml new file mode 100644 index 0000000000..d13daacb89 --- /dev/null +++ b/kubernetes/sdnc/templates/sdnc-log-configmap.yaml @@ -0,0 +1,17 @@ +#{{ if not .Values.disableSdncSdnc }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: sdnc-log-configmap + namespace: {{ .Values.nsPrefix }}-sdnc +data: +{{ tpl (.Files.Glob "resources/config/log/filebeat/log4j/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: sdnc-logging-cfg-configmap + namespace: {{ .Values.nsPrefix }}-sdnc +data: +{{ tpl (.Files.Glob "resources/config/log/*").AsConfig . | indent 2 }} +#{{ end }} diff --git a/kubernetes/sdnc/templates/sdnc-statefulset.yaml b/kubernetes/sdnc/templates/sdnc-statefulset.yaml index 3ba37af197..02950ba4c6 100644 --- a/kubernetes/sdnc/templates/sdnc-statefulset.yaml +++ b/kubernetes/sdnc/templates/sdnc-statefulset.yaml @@ -56,14 +56,17 @@ spec: - mountPath: /etc/localtime name: localtime readOnly: true - - mountPath: /opt/onap/sdnc/data/properties/aaiclient.properties - name: sdnc-aaiclient-properties - mountPath: /opt/onap/sdnc/data/properties/admportal.json - name: sdnc-admportal-json + name: sdnc-conf + subPath: admportal.json + - mountPath: /opt/onap/sdnc/data/properties/aaiclient.properties + name: sdnc-conf + subPath: aaiclient.properties - mountPath: /var/log/onap name: sdnc-logs - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg - name: sdnc-log-config + name: sdnc-logging-cfg-config + subPath: org.ops4j.pax.logging.cfg ports: - containerPort: 8181 - containerPort: 8101 @@ -80,6 +83,7 @@ spec: volumeMounts: - mountPath: /usr/share/filebeat/filebeat.yml name: filebeat-conf + subPath: filebeat.yml - mountPath: /var/log/onap name: sdnc-logs - mountPath: /usr/share/filebeat/data @@ -89,21 +93,25 @@ spec: hostPath: path: /etc/localtime - name: filebeat-conf - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/log4j/filebeat.yml - - name: sdnc-log-config - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/sdnc/org.ops4j.pax.logging.cfg + configMap: + name: sdnc-log-configmap + - name: sdnc-logging-cfg-config + configMap: + name: sdnc-logging-cfg-configmap - name: sdnc-logs emptyDir: {} - name: sdnc-data-filebeat emptyDir: {} - - name: sdnc-aaiclient-properties - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdnc/conf/aaiclient.properties - - name: sdnc-admportal-json - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdnc/conf/admportal.json + - name: sdnc-conf + configMap: + name: sdnc-conf-configmap + items: + - key: admportal.json + path: admportal.json + mode: 0755 + - key: aaiclient.properties + path: aaiclient.properties + mode: 0755 imagePullSecrets: - name: "{{ .Values.nsPrefix }}-docker-registry-key" #{{ end }} -- cgit 1.2.3-korg