diff options
Diffstat (limited to 'kubernetes/sdnc/templates')
10 files changed, 199 insertions, 26 deletions
diff --git a/kubernetes/sdnc/templates/dgbuilder-deployment.yaml b/kubernetes/sdnc/templates/dgbuilder-deployment.yaml index e0f8b298e9..b9ec155c3f 100644 --- a/kubernetes/sdnc/templates/dgbuilder-deployment.yaml +++ b/kubernetes/sdnc/templates/dgbuilder-deployment.yaml @@ -5,6 +5,7 @@ metadata: name: sdnc-dgbuilder namespace: "{{ .Values.nsPrefix }}-sdnc" spec: + replicas: {{ .Values.dgbuilderReplicas }} selector: matchLabels: app: sdnc-dgbuilder diff --git a/kubernetes/sdnc/templates/dmaap-deployment-configmap.yaml b/kubernetes/sdnc/templates/dmaap-deployment-configmap.yaml new file mode 100644 index 0000000000..efd7d6d2af --- /dev/null +++ b/kubernetes/sdnc/templates/dmaap-deployment-configmap.yaml @@ -0,0 +1,9 @@ +#{{ if not .Values.disableSdncDmaap }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: sdnc-dmaap-configmap + namespace: {{ .Values.nsPrefix }}-sdnc +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 new file mode 100644 index 0000000000..eb6f354abd --- /dev/null +++ b/kubernetes/sdnc/templates/dmaap-deployment.yaml @@ -0,0 +1,62 @@ +#{{ if not .Values.disableSdncDmaap }} +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: dmaap-listener + namespace: "{{ .Values.nsPrefix }}-sdnc" +spec: + replicas: {{ .Values.dmaapReplicas }} + selector: + matchLabels: + app: dmaap-listener + template: + metadata: + labels: + app: dmaap-listener + name: dmaap-listener + spec: + initContainers: + - command: + - /root/ready.py + args: + - --container-name + - sdnc-db-container + - --container-name + - sdnc-controller-container + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: {{ .Values.image.readiness }} + imagePullPolicy: {{ .Values.pullPolicy }} + name: sdnc-dmaap-readiness + containers: + - command: + - /opt/onap/sdnc/dmaap-listener/bin/start-dmaap-listener.sh + env: + - name: PROPERTY_DIR + value: /opt/onap/sdnc/data/properties + - name: SDNC_CONFIG_DIR + value: /opt/onap/sdnc/data/properties + image: {{ .Values.image.dmaaplistener }} + imagePullPolicy: {{ .Values.pullPolicy }} + name: dmaapp-listener-container + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: /opt/onap/sdnc/data/properties/dhcpalert.properties + subPath: dhcpalert.properties + name: dmaap-dhcapalert-config + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: dmaap-dhcapalert-config + configMap: + name: sdnc-dmaap-configmap + imagePullSecrets: + - name: "{{ .Values.nsPrefix }}-docker-registry-key" +#{{ end }} diff --git a/kubernetes/sdnc/templates/nfs-provisoner-deployment.yaml b/kubernetes/sdnc/templates/nfs-provisoner-deployment.yaml index 9d3feeff9c..a283d0f626 100644 --- a/kubernetes/sdnc/templates/nfs-provisoner-deployment.yaml +++ b/kubernetes/sdnc/templates/nfs-provisoner-deployment.yaml @@ -5,7 +5,7 @@ metadata: name: nfs-provisioner namespace: "{{ .Values.nsPrefix }}-sdnc" spec: - replicas: 1 + replicas: {{ .Values.nfsReplicas }} strategy: type: Recreate template: diff --git a/kubernetes/sdnc/templates/sdnc-conf-configmap.yaml b/kubernetes/sdnc/templates/sdnc-conf-configmap.yaml new file mode 100644 index 0000000000..e7cde3b69f --- /dev/null +++ b/kubernetes/sdnc/templates/sdnc-conf-configmap.yaml @@ -0,0 +1,9 @@ +#{{ if not .Values.disableSdncSdnc }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: sdnc-conf-configmap + namespace: {{ .Values.nsPrefix }}-sdnc +data: +{{ tpl (.Files.Glob "resources/config/conf/*").AsConfig . | indent 2 }} +#{{ end }} diff --git a/kubernetes/sdnc/templates/sdnc-log-configmap.yaml b/kubernetes/sdnc/templates/sdnc-log-configmap.yaml new file mode 100644 index 0000000000..d13daacb89 --- /dev/null +++ b/kubernetes/sdnc/templates/sdnc-log-configmap.yaml @@ -0,0 +1,17 @@ +#{{ if not .Values.disableSdncSdnc }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: sdnc-log-configmap + namespace: {{ .Values.nsPrefix }}-sdnc +data: +{{ tpl (.Files.Glob "resources/config/log/filebeat/log4j/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: sdnc-logging-cfg-configmap + namespace: {{ .Values.nsPrefix }}-sdnc +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 3ba37af197..02950ba4c6 100644 --- a/kubernetes/sdnc/templates/sdnc-statefulset.yaml +++ b/kubernetes/sdnc/templates/sdnc-statefulset.yaml @@ -56,14 +56,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 +83,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 +93,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 }} diff --git a/kubernetes/sdnc/templates/ueb-deployment-configmap.yaml b/kubernetes/sdnc/templates/ueb-deployment-configmap.yaml new file mode 100644 index 0000000000..4970de01b6 --- /dev/null +++ b/kubernetes/sdnc/templates/ueb-deployment-configmap.yaml @@ -0,0 +1,9 @@ +#{{ if not .Values.disableSdncUeb }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: sdnc-ueb-configmap + namespace: {{ .Values.nsPrefix }}-sdnc +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 new file mode 100644 index 0000000000..c109acdaef --- /dev/null +++ b/kubernetes/sdnc/templates/ueb-deployment.yaml @@ -0,0 +1,62 @@ +#{{ if not .Values.disableSdncUeb }} +apiVersion: extensions/v1beta1 +kind: Deployment +metadata: + name: ueb-listener + namespace: "{{ .Values.nsPrefix }}-sdnc" +spec: + replicas: {{ .Values.uebReplicas }} + selector: + matchLabels: + app: ueb-listener + template: + metadata: + labels: + app: ueb-listener + name: ueb-listener + spec: + initContainers: + - command: + - /root/ready.py + args: + - --container-name + - sdnc-db-container + - --container-name + - sdnc-controller-container + env: + - name: NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + image: {{ .Values.image.readiness }} + imagePullPolicy: {{ .Values.pullPolicy }} + name: sdnc-ueb-readiness + containers: + - command: + - /opt/onap/sdnc/ueb-listener/bin/start-ueb-listener.sh + env: + - name: PROPERTY_DIR + value: /opt/onap/sdnc/data/properties + - name: SDNC_CONFIG_DIR + value: /opt/onap/sdnc/data/properties + image: {{ .Values.image.ueblistener }} + imagePullPolicy: {{ .Values.pullPolicy }} + name: ueb-listener-container + volumeMounts: + - mountPath: /etc/localtime + name: localtime + readOnly: true + - mountPath: /opt/onap/sdnc/data/properties/ueb-listener.properties + subPath: ueb-listener.properties + name: ueb-config + volumes: + - name: localtime + hostPath: + path: /etc/localtime + - name: ueb-config + configMap: + name: sdnc-ueb-configmap + imagePullSecrets: + - name: "{{ .Values.nsPrefix }}-docker-registry-key" +#{{ end }} diff --git a/kubernetes/sdnc/templates/web-deployment.yaml b/kubernetes/sdnc/templates/web-deployment.yaml index fcd82a40c0..73d8e0a6cb 100644 --- a/kubernetes/sdnc/templates/web-deployment.yaml +++ b/kubernetes/sdnc/templates/web-deployment.yaml @@ -5,6 +5,7 @@ metadata: name: sdnc-portal namespace: "{{ .Values.nsPrefix }}-sdnc" spec: + replicas: {{ .Values.portalReplicas }} selector: matchLabels: app: sdnc-portal @@ -50,10 +51,8 @@ spec: - name: localtime mountPath: /etc/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 + - mountPath: /opt/onap/sdnc/data/properties/ + name: sdnc-conf readinessProbe: tcpSocket: port: 8843 @@ -64,12 +63,9 @@ spec: - name: localtime hostPath: path: /etc/localtime - - 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 imagePullSecrets: - name: "{{ .Values.nsPrefix }}-docker-registry-key" #{{ end }} |