diff options
Diffstat (limited to 'kubernetes/sdnc/templates')
-rw-r--r-- | kubernetes/sdnc/templates/configmap.yaml | 40 | ||||
-rw-r--r-- | kubernetes/sdnc/templates/pv.yaml | 14 | ||||
-rw-r--r-- | kubernetes/sdnc/templates/secrets.yaml | 14 | ||||
-rw-r--r-- | kubernetes/sdnc/templates/service.yaml | 22 | ||||
-rw-r--r-- | kubernetes/sdnc/templates/statefulset.yaml | 94 |
5 files changed, 76 insertions, 108 deletions
diff --git a/kubernetes/sdnc/templates/configmap.yaml b/kubernetes/sdnc/templates/configmap.yaml index 54de05cd61..e9498cb8dc 100644 --- a/kubernetes/sdnc/templates/configmap.yaml +++ b/kubernetes/sdnc/templates/configmap.yaml @@ -31,47 +31,15 @@ data: apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "common.fullname" . }}-startodl + name: {{ include "common.fullname" . }}-bin namespace: {{ include "common.namespace" . }} data: -{{ tpl (.Files.Glob "resources/config/bin/startODL.sh").AsConfig . | indent 2 }} +{{ tpl (.Files.Glob "resources/config/bin/*").AsConfig . | indent 2 }} --- apiVersion: v1 kind: ConfigMap metadata: - name: {{ include "common.fullname" . }}-installsdncdb + name: {{ include "common.fullname" . }}-properties namespace: {{ include "common.namespace" . }} data: -{{ tpl (.Files.Glob "resources/config/bin/installSdncDb.sh").AsConfig . | indent 2 }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "common.fullname" . }}-aaiclient-properties - namespace: {{ include "common.namespace" . }} -data: -{{ tpl (.Files.Glob "resources/config/conf/aaiclient.properties").AsConfig . | indent 2 }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "common.fullname" . }}-dblib-properties - namespace: {{ include "common.namespace" . }} -data: -{{ tpl (.Files.Glob "resources/config/conf/dblib.properties").AsConfig . | indent 2 }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "common.fullname" . }}-svclogic-config - namespace: {{ include "common.namespace" . }} -data: -{{ tpl (.Files.Glob "resources/config/conf/svclogic.properties").AsConfig . | indent 2 }} ---- -apiVersion: v1 -kind: ConfigMap -metadata: - name: {{ include "common.fullname" . }}-onap-sdnc-svclogic-config - namespace: {{ include "common.namespace" . }} -data: -{{ tpl (.Files.Glob "resources/config/conf/svclogic.properties").AsConfig . | indent 2 }} +{{ tpl (.Files.Glob "resources/config/conf/*").AsConfig . | indent 2 }} diff --git a/kubernetes/sdnc/templates/pv.yaml b/kubernetes/sdnc/templates/pv.yaml index e20e2818a3..f10d67ad68 100644 --- a/kubernetes/sdnc/templates/pv.yaml +++ b/kubernetes/sdnc/templates/pv.yaml @@ -18,7 +18,7 @@ kind: PersistentVolume apiVersion: v1 metadata: - name: {{ include "common.fullname" . }}-data0 + name: {{ include "common.fullname" . }}-mdsal0 namespace: {{ include "common.namespace" . }} labels: app: {{ include "common.fullname" . }} @@ -31,7 +31,7 @@ spec: storage: {{ .Values.persistence.size}} accessModes: - {{ .Values.persistence.accessMode }} - storageClassName: "{{ include "common.fullname" . }}-data" + storageClassName: "{{ include "common.fullname" . }}-mdsal" persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} hostPath: path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}0 @@ -40,7 +40,7 @@ spec: kind: PersistentVolume apiVersion: v1 metadata: - name: {{ include "common.fullname" . }}-data1 + name: {{ include "common.fullname" . }}-mdsal1 namespace: {{ include "common.namespace" . }} labels: app: {{ include "common.fullname" . }} @@ -53,7 +53,7 @@ spec: storage: {{ .Values.persistence.size}} accessModes: - {{ .Values.persistence.accessMode }} - storageClassName: "{{ include "common.fullname" . }}-data" + storageClassName: "{{ include "common.fullname" . }}-mdsal" persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} hostPath: path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}1 @@ -63,7 +63,7 @@ spec: kind: PersistentVolume apiVersion: v1 metadata: - name: {{ include "common.fullname" . }}-data2 + name: {{ include "common.fullname" . }}-mdsal2 namespace: {{ include "common.namespace" . }} labels: app: {{ include "common.fullname" . }} @@ -76,9 +76,9 @@ spec: storage: {{ .Values.persistence.size}} accessModes: - {{ .Values.persistence.accessMode }} - storageClassName: "{{ include "common.fullname" . }}-data" + storageClassName: "{{ include "common.fullname" . }}-mdsal" persistentVolumeReclaimPolicy: {{ .Values.persistence.volumeReclaimPolicy }} hostPath: path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}2 {{ end }} -{{- end -}}
\ No newline at end of file +{{- end -}} diff --git a/kubernetes/sdnc/templates/secrets.yaml b/kubernetes/sdnc/templates/secrets.yaml index 345c194d96..754f117e38 100644 --- a/kubernetes/sdnc/templates/secrets.yaml +++ b/kubernetes/sdnc/templates/secrets.yaml @@ -11,3 +11,17 @@ metadata: type: Opaque data: db-root-password: {{ .Values.config.dbRootPassword | b64enc | quote }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "common.fullname" . }}-odl + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.fullname" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +type: Opaque +data: + odl-password: {{ .Values.config.odlPassword | b64enc | quote }} diff --git a/kubernetes/sdnc/templates/service.yaml b/kubernetes/sdnc/templates/service.yaml index 586144b6e9..63a85a39aa 100644 --- a/kubernetes/sdnc/templates/service.yaml +++ b/kubernetes/sdnc/templates/service.yaml @@ -50,6 +50,10 @@ spec: targetPort: {{ .Values.service.internalPort3 }} nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort3 }} name: "{{ .Values.service.portName }}-8280" + - port: {{ .Values.service.externalPort4 }} + targetPort: {{ .Values.service.internalPort4 }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort4 }} + name: "{{ .Values.service.portName }}-8443" {{- else -}} - port: {{ .Values.service.externalPort }} targetPort: {{ .Values.service.internalPort }} @@ -80,7 +84,7 @@ spec: sessionAffinity: None type: ClusterIP -{{ if .Values.geoEnabled }} +{{ if .Values.config.geoEnabled }} --- apiVersion: v1 kind: Service @@ -94,16 +98,16 @@ spec: - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort4 }} port: {{ .Values.service.clusterPort2 }} targetPort: {{ .Values.service.internalPort4 }} - nodePort: {{ .Values.nodePortPrefix }}{{ .Values.service.geoNodePort4 }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.geoNodePort4 }} - name: {{ .Values.service.portName }}-0-port-{{ .Values.service.internalPort }} port: {{ .Values.service.clusterPort3 }} targetPort: {{ .Values.service.internalPort }} - nodePort: {{ .Values.nodePortPrefix }}{{ .Values.service.geoNodePort1 }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.geoNodePort1 }} type: NodePort selector: statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-0 {{ end }} -{{ if .Values.geoEnabled }} +{{ if .Values.config.geoEnabled }} --- apiVersion: v1 kind: Service @@ -117,16 +121,16 @@ spec: - name: {{ .Values.service.portName }}-1-port-{{ .Values.service.internalPort4 }} port: {{ .Values.service.clusterPort2 }} targetPort: {{ .Values.service.internalPort4 }} - nodePort: {{ .Values.nodePortPrefix }}{{ .Values.service.geoNodePort5 }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.geoNodePort5 }} - name: {{ .Values.service.portName }}-1-port-{{ .Values.service.internalPort }} port: {{ .Values.service.clusterPort3 }} targetPort: {{ .Values.service.internalPort }} - nodePort: {{ .Values.nodePortPrefix }}{{ .Values.service.geoNodePort2 }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.geoNodePort2 }} type: NodePort selector: statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-1 {{ end }} -{{ if .Values.geoEnabled }} +{{ if .Values.config.geoEnabled }} --- apiVersion: v1 kind: Service @@ -140,11 +144,11 @@ spec: - name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort4 }} port: {{ .Values.service.clusterPort2 }} targetPort: {{ .Values.service.internalPort4 }} - nodePort: {{ .Values.nodePortPrefix }}{{ .Values.service.geoNodePort6 }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.geoNodePort6 }} - name: {{ .Values.service.portName }}-2-port-{{ .Values.service.internalPort }} port: {{ .Values.service.clusterPort3 }} targetPort: {{ .Values.service.internalPort }} - nodePort: {{ .Values.nodePortPrefix }}{{ .Values.service.geoNodePort3 }} + nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.geoNodePort3 }} type: NodePort selector: statefulset.kubernetes.io/pod-name: {{ include "common.fullname" . }}-2 diff --git a/kubernetes/sdnc/templates/statefulset.yaml b/kubernetes/sdnc/templates/statefulset.yaml index c8565f5e89..69816dffb4 100644 --- a/kubernetes/sdnc/templates/statefulset.yaml +++ b/kubernetes/sdnc/templates/statefulset.yaml @@ -69,14 +69,27 @@ spec: secretKeyRef: name: {{ template "common.fullname" . }} key: db-root-password + - name: ODL_ADMIN_PASSWORD + valueFrom: + secretKeyRef: + name: {{ template "common.fullname" . }}-odl + key: odl-password - name: SDNC_CONFIG_DIR value: "{{ .Values.config.configDir }}" - name: ENABLE_ODL_CLUSTER value: "{{ .Values.config.enableClustering }}" + - name: MY_ODL_CLUSTER + value: "{{ .Values.config.myODLCluster }}" + - name: PEER_ODL_CLUSTER + value: "{{ .Values.config.peerODLCluster }}" + - name: IS_PRIMARY_CLUSTER + value: "{{ .Values.config.isPrimaryCluster }}" + - name: GEO_ENABLED + value: "{{ .Values.config.geoEnabled}}" - name: SDNC_REPLICAS value: "{{ .Values.replicaCount }}" - name: MYSQL_HOST - value: "{{.Values.mysql.service.name}}.{{.Release.Namespace}}" + value: "{{.Release.Name}}-{{.Values.mysql.nameOverride}}-0.{{.Values.mysql.service.name}}.{{.Release.Namespace}}" volumeMounts: - mountPath: /etc/localtime name: localtime @@ -84,26 +97,29 @@ spec: - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg name: sdnc-logging-cfg-config subPath: org.ops4j.pax.logging.cfg - - mountPath: /opt/onap/sdnc/bin/startODL.sh - name: startodl + - mountPath: {{ .Values.config.binDir }}/startODL.sh + name: bin subPath: startODL.sh - - mountPath: /opt/onap/sdnc/bin/installSdncDb.sh - name: installsdncdb + - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh + name: bin subPath: installSdncDb.sh - - mountPath: /opt/onap/sdnc/data/properties/aaiclient.properties - name: aaiclient-conf + - mountPath: {{ .Values.config.configDir }}/aaiclient.properties + name: properties subPath: aaiclient.properties - - mountPath: /opt/onap/sdnc/data/properties/dblib.properties - name: sdnc-dblib-properties + - mountPath: {{ .Values.config.configDir }}/dblib.properties + name: properties subPath: dblib.properties - - mountPath: /opt/onap/sdnc/data/properties/svclogic.properties - name: sdnc-svclogic-config + - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties + name: properties + subPath: lcm-dg.properties + - mountPath: {{ .Values.config.configDir }}/svclogic.properties + name: properties subPath: svclogic.properties - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties - name: onap-sdnc-svclogic-config + name: properties subPath: svclogic.properties - mountPath: {{ .Values.persistence.mdsalPath }} - name: {{ include "common.fullname" . }}-data + name: {{ include "common.fullname" . }}-mdsal - mountPath: /var/log/onap name: logs resources: @@ -145,60 +161,26 @@ spec: - name: sdnc-logging-cfg-config configMap: name: {{ include "common.fullname" . }}-log-configmap - - name: startodl - configMap: - name: {{ include "common.fullname" . }}-startodl - items: - - key: startODL.sh - path: startODL.sh - mode: 0755 - - name: installsdncdb - configMap: - name: {{ include "common.fullname" . }}-installsdncdb - items: - - key: installSdncDb.sh - path: installSdncDb.sh - mode: 0755 - - name: aaiclient-conf - configMap: - name: {{ include "common.fullname" . }}-aaiclient-properties - items: - - key: aaiclient.properties - path: aaiclient.properties - mode: 0644 - - name: sdnc-dblib-properties - configMap: - name: {{ include "common.fullname" . }}-dblib-properties - items: - - key: dblib.properties - path: dblib.properties - mode: 0644 - - name: sdnc-svclogic-config + - name: bin configMap: - name: {{ include "common.fullname" . }}-svclogic-config - items: - - key: svclogic.properties - path: svclogic.properties - mode: 0644 - - name: onap-sdnc-svclogic-config + name: {{ include "common.fullname" . }}-bin + defaultMode: 0755 + - name: properties configMap: - name: {{ include "common.fullname" . }}-onap-sdnc-svclogic-config - items: - - key: svclogic.properties - path: svclogic.properties - mode: 0644 + name: {{ include "common.fullname" . }}-properties + defaultMode: 0644 {{ if not .Values.persistence.enabled }} - - name: {{ include "common.fullname" . }}-data + - name: {{ include "common.fullname" . }}-mdsal emptyDir: {} {{ else }} volumeClaimTemplates: - metadata: - name: {{ include "common.fullname" . }}-data + name: {{ include "common.fullname" . }}-mdsal labels: name: {{ include "common.fullname" . }} spec: accessModes: [ {{ .Values.persistence.accessMode }} ] - storageClassName: {{ include "common.fullname" . }}-data + storageClassName: {{ include "common.fullname" . }}-mdsal resources: requests: storage: {{ .Values.persistence.size }} |