summaryrefslogtreecommitdiffstats
path: root/kubernetes/mso/templates
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/mso/templates')
-rw-r--r--kubernetes/mso/templates/all-services.yaml18
-rw-r--r--kubernetes/mso/templates/db-deployment-configmap.yaml65
-rw-r--r--kubernetes/mso/templates/db-deployment.yaml67
-rw-r--r--kubernetes/mso/templates/mso-deployment-configmap.yaml25
-rw-r--r--kubernetes/mso/templates/mso-deployment.yaml115
-rw-r--r--kubernetes/mso/templates/mso-log-configmap.yaml17
-rw-r--r--kubernetes/mso/templates/mso-pv-pvc.yaml14
7 files changed, 233 insertions, 88 deletions
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
new file mode 100644
index 0000000000..51c106cc78
--- /dev/null
+++ b/kubernetes/mso/templates/db-deployment-configmap.yaml
@@ -0,0 +1,65 @@
+#{{ if not .Values.disableMsoMariadb }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: mso-confd-configmap
+ namespace: {{ .Values.nsPrefix }}
+data:
+{{ tpl (.Files.Glob "resources/config/mariadb/conf.d/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: mso-docker-entry-initd-configmap
+ namespace: {{ .Values.nsPrefix }}
+data:
+{{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: mso-automated-tests-configmap
+ namespace: {{ .Values.nsPrefix }}
+data:
+{{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/automated-tests/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: mso-bulkload-default-configmap
+ namespace: {{ .Values.nsPrefix }}
+data:
+{{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/default/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: mso-demo-dns-configmap
+ namespace: {{ .Values.nsPrefix }}
+data:
+{{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/demo-dns/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: mso-demo-vfw-configmap
+ namespace: {{ .Values.nsPrefix }}
+data:
+{{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/demo-vfw/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: mso-scripts-camunda-configmap
+ namespace: {{ .Values.nsPrefix }}
+data:
+{{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/db-sql-scripts/camunda/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: mso-main-schemas-configmap
+ 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 820d7e2239..a906c1c413 100644
--- a/kubernetes/mso/templates/db-deployment.yaml
+++ b/kubernetes/mso/templates/db-deployment.yaml
@@ -2,24 +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
@@ -29,31 +30,65 @@ spec:
readOnly: true
- mountPath: /etc/mysql/conf.d
name: mso-mariadb-conf
- - mountPath: /docker-entrypoint-initdb.d
+ - mountPath: /docker-entrypoint-initdb.d/02-load-additional-changes.sh
name: mso-mariadb-docker-entrypoint-initdb
+ subPath: 02-load-additional-changes.sh
+ - mountPath: /docker-entrypoint-initdb.d/01-load-default-sql-files.sh
+ name: mso-mariadb-docker-entrypoint-initdb
+ subPath: 01-load-default-sql-files.sh
+ - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/automated-tests
+ name: mso-mariadb-docker-entrypoint-automated-tests
+ - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/default
+ name: mso-mariadb-docker-entrypoint-bulkload-default
+ - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/demo-dns
+ name: mso-mariadb-docker-entrypoint-demo-dns
+ - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/demo-vfw
+ name: mso-mariadb-docker-entrypoint-demo-vfw
+ - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/camunda
+ name: mso-mariadb-docker-entrypoint-camunda
+ - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/main-schemas
+ name: mso-mariadb-docker-entrypoint-main-schemas
- mountPath: /var/lib/mysql
name: mso-mariadb-data
ports:
- containerPort: 3306
- name: mariadb
+ name: mso-mariadb
readinessProbe:
tcpSocket:
port: 3306
initialDelaySeconds: 5
periodSeconds: 10
volumes:
- - name: localtime
- hostPath:
- path: /etc/localtime
- name: mso-mariadb-conf
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/mso/mariadb/conf.d
+ configMap:
+ name: mso-confd-configmap
- name: mso-mariadb-docker-entrypoint-initdb
+ configMap:
+ name: mso-docker-entry-initd-configmap
+ - name: mso-mariadb-docker-entrypoint-automated-tests
+ configMap:
+ name: mso-automated-tests-configmap
+ - name: mso-mariadb-docker-entrypoint-bulkload-default
+ configMap:
+ name: mso-bulkload-default-configmap
+ - name: mso-mariadb-docker-entrypoint-demo-dns
+ configMap:
+ name: mso-demo-dns-configmap
+ - name: mso-mariadb-docker-entrypoint-demo-vfw
+ configMap:
+ name: mso-demo-vfw-configmap
+ - name: mso-mariadb-docker-entrypoint-camunda
+ configMap:
+ name: mso-scripts-camunda-configmap
+ - name: mso-mariadb-docker-entrypoint-main-schemas
+ configMap:
+ name: mso-main-schemas-configmap
+ - name: localtime
hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/mso/mariadb/docker-entrypoint-initdb.d
+ path: /etc/localtime
- name: mso-mariadb-data
persistentVolumeClaim:
claimName: mso-db
imagePullSecrets:
- name: "{{ .Values.nsPrefix }}-docker-registry-key"
-#{{ end }} \ No newline at end of file
+#{{ end }}
diff --git a/kubernetes/mso/templates/mso-deployment-configmap.yaml b/kubernetes/mso/templates/mso-deployment-configmap.yaml
new file mode 100644
index 0000000000..15c6141baf
--- /dev/null
+++ b/kubernetes/mso/templates/mso-deployment-configmap.yaml
@@ -0,0 +1,25 @@
+#{{ if not .Values.disableMsoMso }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: mso-config-mso-configmap
+ namespace: {{ .Values.nsPrefix }}
+data:
+{{ tpl (.Files.Glob "resources/config/mso/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: mso-docker-file-configmap
+ 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 2abb29091f..2e5497c22c 100644
--- a/kubernetes/mso/templates/mso-deployment.yaml
+++ b/kubernetes/mso/templates/mso-deployment.yaml
@@ -3,9 +3,9 @@ apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: mso
- namespace: "{{ .Values.nsPrefix }}-mso"
+ namespace: "{{ .Values.nsPrefix }}"
spec:
- replicas: 1
+ replicas: {{ .Values.msoReplicas }}
selector:
matchLabels:
app: mso
@@ -20,7 +20,7 @@ spec:
- /root/ready.py
args:
- --container-name
- - mariadb
+ - mso-mariadb
env:
- name: NAMESPACE
valueFrom:
@@ -40,34 +40,49 @@ spec:
- mountPath: /etc/localtime
name: localtime
readOnly: true
- - mountPath: /shared
+ - mountPath: /shared/
name: mso
- 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-api-handler-infra-config/logback.apihandler-infra.xml
- name: logback-apihandler-infra
- mountPath: /var/berks-cookbooks/mso-config/files/default/mso-po-adapter-config/logback.network.xml
- name: logback-network
+ name: mso-logback
+ subPath: logback.network.xml
- mountPath: /var/berks-cookbooks/mso-config/files/default/mso-po-adapter-config/logback.tenant.xml
- name: logback-tenant
+ name: mso-logback
+ subPath: logback.tenant.xml
- mountPath: /var/berks-cookbooks/mso-config/files/default/mso-po-adapter-config/logback.vnf.xml
- name: logback-vnf
+ name: mso-logback
+ subPath: logback.vnf.xml
- mountPath: /var/berks-cookbooks/mso-config/files/default/mso-po-adapter-config/logback.vfc.xml
- name: logback-vfc
+ name: mso-logback
+ subPath: logback.vfc.xml
+ - mountPath: /var/berks-cookbooks/mso-config/files/default/mso-api-handler-infra-config/logback.apihandler-infra.xml
+ name: mso-logback
+ subPath: logback.apihandler-infra.xml
- mountPath: /var/berks-cookbooks/mso-config/files/default/mso-appc-adapter-config/logback.appc.xml
- name: logback-appc
+ name: mso-logback
+ subPath: logback.appc.xml
- mountPath: /var/berks-cookbooks/mso-config/files/default/mso-requests-db-adapter-config/logback.msorequestsdbadapter.xml
- name: logback-msorequestsdbadapter
+ name: mso-logback
+ subPath: logback.msorequestsdbadapter.xml
- mountPath: /var/berks-cookbooks/mso-config/files/default/mso-asdc-controller-config/logback.asdc.xml
- name: logback-asdc
+ name: mso-logback
+ subPath: logback.asdc.xml
- mountPath: /var/berks-cookbooks/mso-config/files/default/mso-sdnc-adapter-config/logback.sdnc.xml
- name: logback-sdnc
+ name: mso-logback
+ subPath: logback.sdnc.xml
- mountPath: /var/berks-cookbooks/mso-config/files/default/mso-bpmn-config/logback.bpmn.xml
- name: logback-bpmn
+ name: mso-logback
+ subPath: logback.bpmn.xml
- mountPath: /var/berks-cookbooks/mso-config/files/default/mso-workflow-message-adapter-config/logback.workflow-message-adapter.xml
- name: logback-workflow-message-adapter
+ name: mso-logback
+ subPath: logback.workflow-message-adapter.xml
env:
- name: JBOSS_DEBUG
value: "false"
@@ -88,6 +103,7 @@ spec:
volumeMounts:
- mountPath: /usr/share/filebeat/filebeat.yml
name: filebeat-conf
+ subPath: filebeat.yml
- mountPath: /var/log/onap
name: mso-logs
- mountPath: /usr/share/filebeat/data
@@ -96,52 +112,39 @@ spec:
- name: localtime
hostPath:
path: /etc/localtime
- - name: logback-apihandler-infra
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/mso/logback.apihandler-infra.xml
- - name: logback-network
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/mso/logback.network.xml
- - name: logback-tenant
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/mso/logback.tenant.xml
- - name: logback-vnf
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/mso/logback.vnf.xml
- - name: logback-vfc
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/mso/logback.vfc.xml
- - name: logback-appc
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/mso/logback.appc.xml
- - name: logback-msorequestsdbadapter
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/mso/logback.msorequestsdbadapter.xml
- - name: logback-asdc
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/mso/logback.asdc.xml
- - name: logback-sdnc
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/mso/logback.sdnc.xml
- - name: logback-bpmn
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/mso/logback.bpmn.xml
- - name: logback-workflow-message-adapter
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/mso/logback.workflow-message-adapter.xml
- - name: mso
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/mso/mso
+ - name: mso-logback
+ configMap:
+ name: mso-log-configmap
- name: filebeat-conf
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/log/filebeat/logback/filebeat.yml
+ configMap:
+ name: mso-filebeat-configmap
+ - name: mso
+ configMap:
+ name: mso-config-mso-configmap
+ items:
+ - key: mso-docker.json
+ path: mso-docker.json
+ mode: 0755
+ - key: aai.crt
+ path: aai.crt
+ mode: 0755
+ - key: encryption.key
+ path: encryption.key
+ mode: 0644
- name: mso-logs
emptyDir: {}
- name: mso-data-filebeat
emptyDir: {}
- name: mso-docker-files
- hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/mso/docker-files/scripts/start-jboss-server.sh
+ configMap:
+ name: mso-docker-file-configmap
+ items:
+ - 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
new file mode 100644
index 0000000000..273c22f533
--- /dev/null
+++ b/kubernetes/mso/templates/mso-log-configmap.yaml
@@ -0,0 +1,17 @@
+#{{ if not .Values.disableMsoMso }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: mso-log-configmap
+ namespace: {{ .Values.nsPrefix }}
+data:
+{{ tpl (.Files.Glob "resources/config/log/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: mso-filebeat-configmap
+ 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 07b5a03f61..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
@@ -13,13 +13,13 @@ spec:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
hostPath:
- path: /dockerdata-nfs/{{ .Values.nsPrefix }}/mso/mariadb/data
+ path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/mso/mariadb/data
---
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"
-#{{ end }} \ No newline at end of file
+ name: "{{ .Values.nsPrefix }}-mso"
+#{{ end }}