Add chart for redis cluster
[oom.git] / kubernetes / sdnc / templates / sdnc-statefulset.yaml
index 02950ba..3b07896 100644 (file)
@@ -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