X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=kubernetes%2Fsdnc%2Ftemplates%2Fsdnc-statefulset.yaml;h=3b078964623482a7588e21b603da4f72c65be51d;hb=e04b2feb855e5ab20e28c867d2bd7f89f6b8c425;hp=3ba37af197cba1a3751f53327936ba258ed060ce;hpb=4f2797b0a4129d2ddee0d98b3cd3f3c18fb6b28c;p=oom.git diff --git a/kubernetes/sdnc/templates/sdnc-statefulset.yaml b/kubernetes/sdnc/templates/sdnc-statefulset.yaml index 3ba37af197..3b07896462 100644 --- a/kubernetes/sdnc/templates/sdnc-statefulset.yaml +++ b/kubernetes/sdnc/templates/sdnc-statefulset.yaml @@ -1,9 +1,23 @@ +# Copyright © 2017 Amdocs, Bell Canada +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + #{{ if not .Values.disableSdncSdnc }} apiVersion: apps/v1beta1 kind: StatefulSet metadata: name: sdnc - namespace: "{{ .Values.nsPrefix }}-sdnc" + namespace: "{{ .Values.nsPrefix }}" spec: serviceName: "sdnhost-cluster" replicas: {{ .Values.numberOfODLReplicas }} @@ -37,8 +51,8 @@ spec: - bash - "-c" - | - sed -i 's/dbhost/sdnc-dbhost-0.dbhost.onap-sdnc.svc.cluster.local/g' /opt/onap/sdnc/data/properties/svclogic.properties - sed -i 's/^\(org.onap.ccsdk.sli.jdbc.hosts=\).*/\1sdnc-dbhost-0.dbhost.onap-sdnc.svc.cluster.local/' /opt/onap/sdnc/data/properties/dblib.properties + sed -i 's/dbhost/sdnc-dbhost-0.dbhost.{{ .Values.nsPrefix }}.svc.cluster.local/g' /opt/onap/sdnc/data/properties/svclogic.properties + sed -i 's/^\(org.onap.ccsdk.sli.jdbc.hosts=\).*/\1sdnc-dbhost-0.dbhost.{{ .Values.nsPrefix }}.svc.cluster.local/' /opt/onap/sdnc/data/properties/dblib.properties /opt/onap/sdnc/bin/startODL.sh env: - name: MYSQL_ROOT_PASSWORD @@ -56,14 +70,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 +97,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 +107,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 }}