From 8bfc6cf8c3d338c84c48201f7a4f274958e721a9 Mon Sep 17 00:00:00 2001 From: BorislavG Date: Tue, 27 Feb 2018 15:04:26 +0000 Subject: Run all components in one namespace Change-Id: I5fcd4d577c1fda4de27842807c7cf7a5d372756e Issue-ID: OOM-722 Signed-off-by: BorislavG --- kubernetes/mso/templates/all-services.yaml | 18 +++++++++--------- kubernetes/mso/templates/db-deployment-configmap.yaml | 16 ++++++++-------- kubernetes/mso/templates/db-deployment.yaml | 16 ++++++++-------- kubernetes/mso/templates/mso-deployment-configmap.yaml | 12 ++++++++++-- kubernetes/mso/templates/mso-deployment.yaml | 10 ++++++++-- kubernetes/mso/templates/mso-log-configmap.yaml | 4 ++-- kubernetes/mso/templates/mso-pv-pvc.yaml | 10 +++++----- 7 files changed, 50 insertions(+), 36 deletions(-) (limited to 'kubernetes/mso/templates') diff --git a/kubernetes/mso/templates/all-services.yaml b/kubernetes/mso/templates/all-services.yaml index 44e47c10fc..6eefe65cff 100644 --- a/kubernetes/mso/templates/all-services.yaml +++ b/kubernetes/mso/templates/all-services.yaml @@ -2,17 +2,17 @@ apiVersion: v1 kind: Service metadata: - name: mariadb - namespace: "{{ .Values.nsPrefix }}-mso" + name: mso-mariadb + namespace: "{{ .Values.nsPrefix }}" labels: - app: mariadb + app: mso-mariadb spec: ports: - - port: 3306 - nodePort: {{ .Values.nodePortPrefix }}52 + - port: 3306 + name: mso-mariadb-3306 selector: - app: mariadb - type: NodePort + app: mso-mariadb + clusterIP: None #{{ end }} #{{ if not .Values.disableMsoMso }} --- @@ -20,7 +20,7 @@ apiVersion: v1 kind: Service metadata: name: mso - namespace: "{{ .Values.nsPrefix }}-mso" + namespace: "{{ .Values.nsPrefix }}" labels: app: mso annotations: @@ -63,4 +63,4 @@ spec: port: 8787 nodePort: {{ .Values.nodePortPrefix }}50 type: NodePort -#{{ end }} \ No newline at end of file +#{{ end }} diff --git a/kubernetes/mso/templates/db-deployment-configmap.yaml b/kubernetes/mso/templates/db-deployment-configmap.yaml index ac3c3bf591..51c106cc78 100644 --- a/kubernetes/mso/templates/db-deployment-configmap.yaml +++ b/kubernetes/mso/templates/db-deployment-configmap.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: mso-confd-configmap - namespace: {{ .Values.nsPrefix }}-mso + namespace: {{ .Values.nsPrefix }} data: {{ tpl (.Files.Glob "resources/config/mariadb/conf.d/*").AsConfig . | indent 2 }} --- @@ -11,7 +11,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: mso-docker-entry-initd-configmap - namespace: {{ .Values.nsPrefix }}-mso + namespace: {{ .Values.nsPrefix }} data: {{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/*").AsConfig . | indent 2 }} --- @@ -19,7 +19,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: mso-automated-tests-configmap - namespace: {{ .Values.nsPrefix }}-mso + namespace: {{ .Values.nsPrefix }} data: {{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/automated-tests/*").AsConfig . | indent 2 }} --- @@ -27,7 +27,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: mso-bulkload-default-configmap - namespace: {{ .Values.nsPrefix }}-mso + namespace: {{ .Values.nsPrefix }} data: {{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/default/*").AsConfig . | indent 2 }} --- @@ -35,7 +35,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: mso-demo-dns-configmap - namespace: {{ .Values.nsPrefix }}-mso + namespace: {{ .Values.nsPrefix }} data: {{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/demo-dns/*").AsConfig . | indent 2 }} --- @@ -43,7 +43,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: mso-demo-vfw-configmap - namespace: {{ .Values.nsPrefix }}-mso + namespace: {{ .Values.nsPrefix }} data: {{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/demo-vfw/*").AsConfig . | indent 2 }} --- @@ -51,7 +51,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: mso-scripts-camunda-configmap - namespace: {{ .Values.nsPrefix }}-mso + namespace: {{ .Values.nsPrefix }} data: {{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/*").AsConfig . | indent 2 }} --- @@ -59,7 +59,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: mso-main-schemas-configmap - namespace: {{ .Values.nsPrefix }}-mso + namespace: {{ .Values.nsPrefix }} data: {{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/main-schemas/*").AsConfig . | indent 2 }} #{{ end }} diff --git a/kubernetes/mso/templates/db-deployment.yaml b/kubernetes/mso/templates/db-deployment.yaml index cc4c656a04..a906c1c413 100644 --- a/kubernetes/mso/templates/db-deployment.yaml +++ b/kubernetes/mso/templates/db-deployment.yaml @@ -2,25 +2,25 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: - name: mariadb - namespace: "{{ .Values.nsPrefix }}-mso" + name: mso-mariadb + namespace: "{{ .Values.nsPrefix }}" spec: replicas: {{ .Values.dbReplicas }} selector: matchLabels: - app: mariadb + app: mso-mariadb template: metadata: labels: - app: mariadb - name: mariadb + app: mso-mariadb + name: mso-mariadb spec: - hostname: mariadb + hostname: mso-mariadb containers: - args: image: {{ .Values.image.mariadb }} imagePullPolicy: {{ .Values.pullPolicy }} - name: "mariadb" + name: "mso-mariadb" env: - name: MYSQL_ROOT_PASSWORD value: password @@ -52,7 +52,7 @@ spec: name: mso-mariadb-data ports: - containerPort: 3306 - name: mariadb + name: mso-mariadb readinessProbe: tcpSocket: port: 3306 diff --git a/kubernetes/mso/templates/mso-deployment-configmap.yaml b/kubernetes/mso/templates/mso-deployment-configmap.yaml index 55b9f8165f..15c6141baf 100644 --- a/kubernetes/mso/templates/mso-deployment-configmap.yaml +++ b/kubernetes/mso/templates/mso-deployment-configmap.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: mso-config-mso-configmap - namespace: {{ .Values.nsPrefix }}-mso + namespace: {{ .Values.nsPrefix }} data: {{ tpl (.Files.Glob "resources/config/mso/*").AsConfig . | indent 2 }} --- @@ -11,7 +11,15 @@ apiVersion: v1 kind: ConfigMap metadata: name: mso-docker-file-configmap - namespace: {{ .Values.nsPrefix }}-mso + namespace: {{ .Values.nsPrefix }} data: {{ tpl (.Files.Glob "resources/config/docker-files/scripts/start-jboss-server.sh").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: mso-jboss-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/mso/jboss/standalone-full-ha-mso.xml").AsConfig . | indent 2 }} #{{ end }} diff --git a/kubernetes/mso/templates/mso-deployment.yaml b/kubernetes/mso/templates/mso-deployment.yaml index b4146401c4..2e5497c22c 100644 --- a/kubernetes/mso/templates/mso-deployment.yaml +++ b/kubernetes/mso/templates/mso-deployment.yaml @@ -3,7 +3,7 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: name: mso - namespace: "{{ .Values.nsPrefix }}-mso" + namespace: "{{ .Values.nsPrefix }}" spec: replicas: {{ .Values.msoReplicas }} selector: @@ -20,7 +20,7 @@ spec: - /root/ready.py args: - --container-name - - mariadb + - mso-mariadb env: - name: NAMESPACE valueFrom: @@ -45,6 +45,9 @@ spec: - mountPath: /tmp/start-jboss-server.sh name: mso-docker-files subPath: start-jboss-server.sh + - mountPath: /opt/jboss/standalone/configuration/standalone-full-ha-mso.xml + name: mso-jboss-config + subPath: standalone-full-ha-mso.xml - mountPath: /var/log/onap name: mso-logs - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-po-adapter-config/logback.network.xml @@ -139,6 +142,9 @@ spec: - key: start-jboss-server.sh path: start-jboss-server.sh mode: 0755 + - name: mso-jboss-config + configMap: + name: mso-jboss-configmap imagePullSecrets: - name: "{{ .Values.nsPrefix }}-docker-registry-key" #{{ end }} diff --git a/kubernetes/mso/templates/mso-log-configmap.yaml b/kubernetes/mso/templates/mso-log-configmap.yaml index 3bf84128fc..273c22f533 100644 --- a/kubernetes/mso/templates/mso-log-configmap.yaml +++ b/kubernetes/mso/templates/mso-log-configmap.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: mso-log-configmap - namespace: {{ .Values.nsPrefix }}-mso + namespace: {{ .Values.nsPrefix }} data: {{ tpl (.Files.Glob "resources/config/log/*").AsConfig . | indent 2 }} --- @@ -11,7 +11,7 @@ apiVersion: v1 kind: ConfigMap metadata: name: mso-filebeat-configmap - namespace: {{ .Values.nsPrefix }}-mso + namespace: {{ .Values.nsPrefix }} data: {{ tpl (.Files.Glob "resources/config/log/filebeat/*").AsConfig . | indent 2 }} #{{ end }} diff --git a/kubernetes/mso/templates/mso-pv-pvc.yaml b/kubernetes/mso/templates/mso-pv-pvc.yaml index af42c013bc..04f5c60832 100644 --- a/kubernetes/mso/templates/mso-pv-pvc.yaml +++ b/kubernetes/mso/templates/mso-pv-pvc.yaml @@ -2,10 +2,10 @@ apiVersion: v1 kind: PersistentVolume metadata: - name: "{{ .Values.nsPrefix }}-mso-db" - namespace: "{{ .Values.nsPrefix }}-mso" + name: "{{ .Values.nsPrefix }}-mso" + namespace: "{{ .Values.nsPrefix }}" labels: - name: "{{ .Values.nsPrefix }}-mso-db" + name: "{{ .Values.nsPrefix }}-mso" spec: capacity: storage: 2Gi @@ -19,7 +19,7 @@ kind: PersistentVolumeClaim apiVersion: v1 metadata: name: mso-db - namespace: "{{ .Values.nsPrefix }}-mso" + namespace: "{{ .Values.nsPrefix }}" spec: accessModes: - ReadWriteMany @@ -28,5 +28,5 @@ spec: storage: 2Gi selector: matchLabels: - name: "{{ .Values.nsPrefix }}-mso-db" + name: "{{ .Values.nsPrefix }}-mso" #{{ end }} -- cgit 1.2.3-korg