aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/sdnc/templates
diff options
context:
space:
mode:
authorBorislavG <Borislav.Glozman@amdocs.com>2018-02-27 15:04:26 +0000
committerAlexis de Talhouƫt <alexis.de_talhouet@bell.ca>2018-03-01 18:10:31 +0000
commit8bfc6cf8c3d338c84c48201f7a4f274958e721a9 (patch)
tree2e0e1a969afc6ae38f0a2f62cc1a36e184cb48e1 /kubernetes/sdnc/templates
parentf0a34e22011b4323bbd6a51ad313d6e547808101 (diff)
Run all components in one namespace
Change-Id: I5fcd4d577c1fda4de27842807c7cf7a5d372756e Issue-ID: OOM-722 Signed-off-by: BorislavG <Borislav.Glozman@amdocs.com>
Diffstat (limited to 'kubernetes/sdnc/templates')
-rw-r--r--kubernetes/sdnc/templates/all-services.yaml18
-rw-r--r--kubernetes/sdnc/templates/db-statefulset.yaml14
-rw-r--r--kubernetes/sdnc/templates/dgbuilder-deployment.yaml2
-rw-r--r--kubernetes/sdnc/templates/dmaap-deployment-configmap.yaml2
-rw-r--r--kubernetes/sdnc/templates/dmaap-deployment.yaml6
-rw-r--r--kubernetes/sdnc/templates/mysql-configmap.yaml4
-rw-r--r--kubernetes/sdnc/templates/nfs-provisoner-deployment.yaml7
-rw-r--r--kubernetes/sdnc/templates/sdnc-conf-configmap.yaml2
-rw-r--r--kubernetes/sdnc/templates/sdnc-data-storageclass.yaml4
-rw-r--r--kubernetes/sdnc/templates/sdnc-log-configmap.yaml4
-rw-r--r--kubernetes/sdnc/templates/sdnc-statefulset.yaml6
-rw-r--r--kubernetes/sdnc/templates/ueb-deployment-configmap.yaml2
-rw-r--r--kubernetes/sdnc/templates/ueb-deployment.yaml6
-rw-r--r--kubernetes/sdnc/templates/web-deployment.yaml2
14 files changed, 45 insertions, 34 deletions
diff --git a/kubernetes/sdnc/templates/all-services.yaml b/kubernetes/sdnc/templates/all-services.yaml
index 9425ef4b80..c309f48fb1 100644
--- a/kubernetes/sdnc/templates/all-services.yaml
+++ b/kubernetes/sdnc/templates/all-services.yaml
@@ -3,7 +3,7 @@ apiVersion: v1
kind: Service
metadata:
name: dbhost
- namespace: "{{ .Values.nsPrefix }}-sdnc"
+ namespace: "{{ .Values.nsPrefix }}"
labels:
app: sdnc-dbhost
spec:
@@ -19,7 +19,7 @@ apiVersion: v1
kind: Service
metadata:
name: dbhost-read
- namespace: "{{ .Values.nsPrefix }}-sdnc"
+ namespace: "{{ .Values.nsPrefix }}"
labels:
app: sdnc-dbhost
spec:
@@ -33,7 +33,7 @@ apiVersion: v1
kind: Service
metadata:
name: sdnctldb01
- namespace: "{{ .Values.nsPrefix }}-sdnc"
+ namespace: "{{ .Values.nsPrefix }}"
labels:
app: sdnc-dbhost
spec:
@@ -47,7 +47,7 @@ apiVersion: v1
kind: Service
metadata:
name: sdnctldb02
- namespace: "{{ .Values.nsPrefix }}-sdnc"
+ namespace: "{{ .Values.nsPrefix }}"
labels:
app: sdnc-dbhost
spec:
@@ -63,7 +63,7 @@ apiVersion: v1
kind: Service
metadata:
name: sdnc-dgbuilder
- namespace: "{{ .Values.nsPrefix }}-sdnc"
+ namespace: "{{ .Values.nsPrefix }}"
labels:
app: sdnc-dgbuilder
spec:
@@ -80,7 +80,7 @@ apiVersion: v1
kind: Service
metadata:
name: sdnhost
- namespace: "{{ .Values.nsPrefix }}-sdnc"
+ namespace: "{{ .Values.nsPrefix }}"
labels:
app: sdnc
annotations:
@@ -117,7 +117,7 @@ kind: Service
apiVersion: v1
metadata:
name: nfs-provisioner
- namespace: "{{ .Values.nsPrefix }}-sdnc"
+ namespace: "{{ .Values.nsPrefix }}"
labels:
app: nfs-provisioner
spec:
@@ -140,7 +140,7 @@ apiVersion: v1
kind: Service
metadata:
name: sdnc-portal
- namespace: "{{ .Values.nsPrefix }}-sdnc"
+ namespace: "{{ .Values.nsPrefix }}"
labels:
app: sdnc-portal
annotations:
@@ -169,7 +169,7 @@ apiVersion: v1
kind: Service
metadata:
name: sdnhost-cluster
- namespace: "{{ .Values.nsPrefix }}-sdnc"
+ namespace: "{{ .Values.nsPrefix }}"
labels:
app: sdnc
annotations:
diff --git a/kubernetes/sdnc/templates/db-statefulset.yaml b/kubernetes/sdnc/templates/db-statefulset.yaml
index f2e079d76e..399eb42239 100644
--- a/kubernetes/sdnc/templates/db-statefulset.yaml
+++ b/kubernetes/sdnc/templates/db-statefulset.yaml
@@ -3,7 +3,7 @@ apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: sdnc-dbhost
- namespace: "{{ .Values.nsPrefix }}-sdnc"
+ namespace: "{{ .Values.nsPrefix }}"
spec:
serviceName: "dbhost"
replicas: {{ .Values.numberOfDbReplicas }}
@@ -61,7 +61,7 @@ spec:
echo ${BASH_REMATCH}
[[ $ordinal -eq 0 ]] && exit 0
# Clone data from previous peer.
- ncat --recv-only sdnc-dbhost-$(($ordinal-1)).dbhost.{{ .Values.nsPrefix }}-sdnc 3307 | xbstream -x -C /var/lib/mysql
+ ncat --recv-only sdnc-dbhost-$(($ordinal-1)).dbhost.{{ .Values.nsPrefix }} 3307 | xbstream -x -C /var/lib/mysql
# Prepare the backup.
xtrabackup --user=root --password=$MYSQL_ROOT_PASSWORD --prepare --target-dir=/var/lib/mysql
ls -l /var/lib/mysql
@@ -150,7 +150,7 @@ spec:
mv change_master_to.sql.in change_master_to.sql.orig
mysql --user=root --password=$MYSQL_ROOT_PASSWORD -h 127.0.0.1 <<EOF
$(<change_master_to.sql.orig),
- MASTER_HOST="sdnc-dbhost-0.dbhost.{{ .Values.nsPrefix }}-sdnc",
+ MASTER_HOST="sdnc-dbhost-0.dbhost.{{ .Values.nsPrefix }}",
MASTER_USER="root",
MASTER_PASSWORD="$MYSQL_ROOT_PASSWORD",
MASTER_CONNECT_RETRY=10;
@@ -176,10 +176,15 @@ spec:
emptyDir: {}
- name: config-map
configMap:
- name: mysql
+ name: sdnc-mysql
- name: localtime
hostPath:
path: /etc/localtime
+#{{ if .Values.disableNfsProvisioner }}
+ - name: sdnc-data
+ hostPath:
+ path: /dockerdata-nfs/{{ .Values.nsPrefix }}/sdnc/data
+#{{ else }}
volumeClaimTemplates:
- metadata:
name: sdnc-data
@@ -191,3 +196,4 @@ spec:
requests:
storage: 1Gi
#{{ end }}
+#{{ end }}
diff --git a/kubernetes/sdnc/templates/dgbuilder-deployment.yaml b/kubernetes/sdnc/templates/dgbuilder-deployment.yaml
index b9ec155c3f..78e20dab23 100644
--- a/kubernetes/sdnc/templates/dgbuilder-deployment.yaml
+++ b/kubernetes/sdnc/templates/dgbuilder-deployment.yaml
@@ -3,7 +3,7 @@ apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: sdnc-dgbuilder
- namespace: "{{ .Values.nsPrefix }}-sdnc"
+ namespace: "{{ .Values.nsPrefix }}"
spec:
replicas: {{ .Values.dgbuilderReplicas }}
selector:
diff --git a/kubernetes/sdnc/templates/dmaap-deployment-configmap.yaml b/kubernetes/sdnc/templates/dmaap-deployment-configmap.yaml
index efd7d6d2af..c27ae72930 100644
--- a/kubernetes/sdnc/templates/dmaap-deployment-configmap.yaml
+++ b/kubernetes/sdnc/templates/dmaap-deployment-configmap.yaml
@@ -3,7 +3,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: sdnc-dmaap-configmap
- namespace: {{ .Values.nsPrefix }}-sdnc
+ namespace: {{ .Values.nsPrefix }}
data:
{{ tpl (.Files.Glob "resources/config/dmaap/*").AsConfig . | indent 2 }}
#{{ end }}
diff --git a/kubernetes/sdnc/templates/dmaap-deployment.yaml b/kubernetes/sdnc/templates/dmaap-deployment.yaml
index eb6f354abd..97dc7738e2 100644
--- a/kubernetes/sdnc/templates/dmaap-deployment.yaml
+++ b/kubernetes/sdnc/templates/dmaap-deployment.yaml
@@ -2,8 +2,8 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
- name: dmaap-listener
- namespace: "{{ .Values.nsPrefix }}-sdnc"
+ name: sdnc-dmaap-listener
+ namespace: "{{ .Values.nsPrefix }}"
spec:
replicas: {{ .Values.dmaapReplicas }}
selector:
@@ -13,7 +13,7 @@ spec:
metadata:
labels:
app: dmaap-listener
- name: dmaap-listener
+ name: sdnc-dmaap-listener
spec:
initContainers:
- command:
diff --git a/kubernetes/sdnc/templates/mysql-configmap.yaml b/kubernetes/sdnc/templates/mysql-configmap.yaml
index deaa997f02..6b4cdcbf9c 100644
--- a/kubernetes/sdnc/templates/mysql-configmap.yaml
+++ b/kubernetes/sdnc/templates/mysql-configmap.yaml
@@ -1,8 +1,8 @@
apiVersion: v1
kind: ConfigMap
metadata:
- name: mysql
- namespace: "{{ .Values.nsPrefix }}-sdnc"
+ name: sdnc-mysql
+ namespace: "{{ .Values.nsPrefix }}"
labels:
app: mysql
data:
diff --git a/kubernetes/sdnc/templates/nfs-provisoner-deployment.yaml b/kubernetes/sdnc/templates/nfs-provisoner-deployment.yaml
index 9e78bf3838..bd161d54a1 100644
--- a/kubernetes/sdnc/templates/nfs-provisoner-deployment.yaml
+++ b/kubernetes/sdnc/templates/nfs-provisoner-deployment.yaml
@@ -1,9 +1,10 @@
#{{ if not .Values.disableSdncSdncDbhost }}
+#{{ if not .Values.disableNfsProvisioner }}
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
- name: nfs-provisioner
- namespace: "{{ .Values.nsPrefix }}-sdnc"
+ name: sdnc-nfs-provisioner
+ namespace: "{{ .Values.nsPrefix }}"
spec:
replicas: {{ .Values.nfsReplicas }}
strategy:
@@ -12,6 +13,7 @@ spec:
metadata:
labels:
app: nfs-provisioner
+ name: sdnc-nfs-provisioner
spec:
containers:
- name: nfs-provisioner
@@ -53,3 +55,4 @@ spec:
hostPath:
path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/sdnc/data
#{{ end }}
+#{{ end }}
diff --git a/kubernetes/sdnc/templates/sdnc-conf-configmap.yaml b/kubernetes/sdnc/templates/sdnc-conf-configmap.yaml
index e7cde3b69f..d60cae7a3a 100644
--- a/kubernetes/sdnc/templates/sdnc-conf-configmap.yaml
+++ b/kubernetes/sdnc/templates/sdnc-conf-configmap.yaml
@@ -3,7 +3,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: sdnc-conf-configmap
- namespace: {{ .Values.nsPrefix }}-sdnc
+ namespace: {{ .Values.nsPrefix }}
data:
{{ tpl (.Files.Glob "resources/config/conf/*").AsConfig . | indent 2 }}
#{{ end }}
diff --git a/kubernetes/sdnc/templates/sdnc-data-storageclass.yaml b/kubernetes/sdnc/templates/sdnc-data-storageclass.yaml
index 7c46cf4a68..d6d4eae30d 100644
--- a/kubernetes/sdnc/templates/sdnc-data-storageclass.yaml
+++ b/kubernetes/sdnc/templates/sdnc-data-storageclass.yaml
@@ -1,8 +1,10 @@
#{{ if not .Values.disableSdncSdncDbhost }}
+#{{ if not .Values.disableNfsProvisioner }}
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: "{{ .Values.nsPrefix }}-sdnc-data"
- namespace: "{{ .Values.nsPrefix }}-sdnc"
+ namespace: "{{ .Values.nsPrefix }}"
provisioner: sdnc/nfs
#{{ end }}
+#{{ end }}
diff --git a/kubernetes/sdnc/templates/sdnc-log-configmap.yaml b/kubernetes/sdnc/templates/sdnc-log-configmap.yaml
index d13daacb89..a7cada8c81 100644
--- a/kubernetes/sdnc/templates/sdnc-log-configmap.yaml
+++ b/kubernetes/sdnc/templates/sdnc-log-configmap.yaml
@@ -3,7 +3,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: sdnc-log-configmap
- namespace: {{ .Values.nsPrefix }}-sdnc
+ namespace: {{ .Values.nsPrefix }}
data:
{{ tpl (.Files.Glob "resources/config/log/filebeat/log4j/*").AsConfig . | indent 2 }}
---
@@ -11,7 +11,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: sdnc-logging-cfg-configmap
- namespace: {{ .Values.nsPrefix }}-sdnc
+ namespace: {{ .Values.nsPrefix }}
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 02950ba4c6..1f020377bd 100644
--- a/kubernetes/sdnc/templates/sdnc-statefulset.yaml
+++ b/kubernetes/sdnc/templates/sdnc-statefulset.yaml
@@ -3,7 +3,7 @@ apiVersion: apps/v1beta1
kind: StatefulSet
metadata:
name: sdnc
- namespace: "{{ .Values.nsPrefix }}-sdnc"
+ namespace: "{{ .Values.nsPrefix }}"
spec:
serviceName: "sdnhost-cluster"
replicas: {{ .Values.numberOfODLReplicas }}
@@ -37,8 +37,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
diff --git a/kubernetes/sdnc/templates/ueb-deployment-configmap.yaml b/kubernetes/sdnc/templates/ueb-deployment-configmap.yaml
index 4970de01b6..6aeaa9f4c9 100644
--- a/kubernetes/sdnc/templates/ueb-deployment-configmap.yaml
+++ b/kubernetes/sdnc/templates/ueb-deployment-configmap.yaml
@@ -3,7 +3,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: sdnc-ueb-configmap
- namespace: {{ .Values.nsPrefix }}-sdnc
+ namespace: {{ .Values.nsPrefix }}
data:
{{ tpl (.Files.Glob "resources/config/ueb/*").AsConfig . | indent 2 }}
#{{ end }}
diff --git a/kubernetes/sdnc/templates/ueb-deployment.yaml b/kubernetes/sdnc/templates/ueb-deployment.yaml
index c109acdaef..b869ca9b83 100644
--- a/kubernetes/sdnc/templates/ueb-deployment.yaml
+++ b/kubernetes/sdnc/templates/ueb-deployment.yaml
@@ -2,8 +2,8 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
- name: ueb-listener
- namespace: "{{ .Values.nsPrefix }}-sdnc"
+ name: sdnc-ueb-listener
+ namespace: "{{ .Values.nsPrefix }}"
spec:
replicas: {{ .Values.uebReplicas }}
selector:
@@ -13,7 +13,7 @@ spec:
metadata:
labels:
app: ueb-listener
- name: ueb-listener
+ name: sdnc-ueb-listener
spec:
initContainers:
- command:
diff --git a/kubernetes/sdnc/templates/web-deployment.yaml b/kubernetes/sdnc/templates/web-deployment.yaml
index 73d8e0a6cb..968ec8d443 100644
--- a/kubernetes/sdnc/templates/web-deployment.yaml
+++ b/kubernetes/sdnc/templates/web-deployment.yaml
@@ -3,7 +3,7 @@ apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: sdnc-portal
- namespace: "{{ .Values.nsPrefix }}-sdnc"
+ namespace: "{{ .Values.nsPrefix }}"
spec:
replicas: {{ .Values.portalReplicas }}
selector: