diff options
Diffstat (limited to 'kubernetes/sdnc')
-rw-r--r-- | kubernetes/sdnc/requirements.yaml | 3 | ||||
-rwxr-xr-x | kubernetes/sdnc/resources/config/bin/startODL.sh | 6 | ||||
-rw-r--r-- | kubernetes/sdnc/templates/pv.yaml | 32 | ||||
-rw-r--r-- | kubernetes/sdnc/templates/pvc.yaml | 32 | ||||
-rw-r--r-- | kubernetes/sdnc/templates/statefulset.yaml | 11 | ||||
-rw-r--r-- | kubernetes/sdnc/values.yaml | 19 |
6 files changed, 101 insertions, 2 deletions
diff --git a/kubernetes/sdnc/requirements.yaml b/kubernetes/sdnc/requirements.yaml index d144d76f93..56e20672f7 100644 --- a/kubernetes/sdnc/requirements.yaml +++ b/kubernetes/sdnc/requirements.yaml @@ -16,9 +16,10 @@ dependencies: - name: common version: ~4.x-0 repository: '@local' - - name: controller-blueprints + - name: cds version: ~4.x-0 repository: '@local' + condition: cds.enabled - name: mysql version: ~4.x-0 repository: '@local' diff --git a/kubernetes/sdnc/resources/config/bin/startODL.sh b/kubernetes/sdnc/resources/config/bin/startODL.sh index d1b0c995d5..6718aaf128 100755 --- a/kubernetes/sdnc/resources/config/bin/startODL.sh +++ b/kubernetes/sdnc/resources/config/bin/startODL.sh @@ -80,6 +80,7 @@ function enable_odl_cluster(){ ODL_HOME=${ODL_HOME:-/opt/opendaylight/current} ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD:-Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U} SDNC_HOME=${SDNC_HOME:-/opt/onap/sdnc} +SDNC_BIN=${SDNC_BIN:-/opt/onap/sdnc/bin} CCSDK_HOME=${CCSDK_HOME:-/opt/onap/ccsdk} SLEEP_TIME=${SLEEP_TIME:-120} MYSQL_PASSWD=${MYSQL_PASSWD:-{{.Values.config.dbRootPassword}}} @@ -131,5 +132,10 @@ then echo "Installed at `date`" > ${SDNC_HOME}/.installed fi +cp /opt/opendaylight/current/certs/* /tmp + +nohup python ${SDNC_BIN}/installCerts.py & + + exec ${ODL_HOME}/bin/karaf server diff --git a/kubernetes/sdnc/templates/pv.yaml b/kubernetes/sdnc/templates/pv.yaml index f10d67ad68..5a6566a80b 100644 --- a/kubernetes/sdnc/templates/pv.yaml +++ b/kubernetes/sdnc/templates/pv.yaml @@ -82,3 +82,35 @@ spec: path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ .Release.Name }}/{{ .Values.persistence.mountSubPath }}2 {{ end }} {{- end -}} +{{ if .Values.certpersistence.enabled }} +--- +kind: PersistentVolume +apiVersion: v1 +metadata: + name: {{ include "common.fullname" . }}-pv-certs + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }}-pv-certs + chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" + name: {{ include "common.fullname" . }}-certs +spec: + capacity: + storage: {{ .Values.certpersistence.size }} + accessModes: + - {{ .Values.certpersistence.accessMode }} +{{- if .Values.certpersistence.storageClass }} +{{- if (eq "-" .Values.certpersistence.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.certpersistence.storageClass }}" +{{- end }} +{{- end }} + persistentVolumeReclaimPolicy: {{ .Values.certpersistence.volumeReclaimPolicy }} + hostPath: + path: {{ .Values.global.persistence.mountPath | default .Values.certpersistence.mountPath }}/{{ .Values.certpersistence.mountSubPath }} +{{ end }} + + + diff --git a/kubernetes/sdnc/templates/pvc.yaml b/kubernetes/sdnc/templates/pvc.yaml new file mode 100644 index 0000000000..aa9515b6b5 --- /dev/null +++ b/kubernetes/sdnc/templates/pvc.yaml @@ -0,0 +1,32 @@ +{{- if and .Values.certpersistence.enabled (not .Values.certpersistence.existingClaim) -}} +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: {{ include "common.fullname" .}}-pvc-certs + namespace: {{ include "common.namespace" . }} + labels: + app: {{ include "common.name" . }}-pvc-certs + chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" + release: "{{ .Release.Name }}" + heritage: "{{ .Release.Service }}" +{{- if .Values.certpersistence.annotations }} + annotations: +{{ toYaml .Values.certpersistence.annotations | indent 4 }} +{{- end }} +spec: + selector: + matchLabels: + app: {{ include "common.name" . }}-pv-certs + accessModes: + - {{ .Values.certpersistence.accessMode }} + resources: + requests: + storage: {{ .Values.certpersistence.size }} +{{- if .Values.certpersistence.storageClass }} +{{- if (eq "-" .Values.certpersistence.storageClass) }} + storageClassName: "" +{{- else }} + storageClassName: "{{ .Values.certpersistence.storageClass }}" +{{- end }} +{{- end }} +{{- end -}}
\ No newline at end of file diff --git a/kubernetes/sdnc/templates/statefulset.yaml b/kubernetes/sdnc/templates/statefulset.yaml index 70713cc311..24ca832d24 100644 --- a/kubernetes/sdnc/templates/statefulset.yaml +++ b/kubernetes/sdnc/templates/statefulset.yaml @@ -135,6 +135,8 @@ spec: name: {{ include "common.fullname" . }}-mdsal - mountPath: /var/log/onap name: logs + - mountPath: {{ .Values.certpersistence.certPath }} + name: {{ include "common.fullname" . }}-certs resources: {{ include "common.resources" . | indent 12 }} {{- if .Values.nodeSelector }} @@ -182,6 +184,13 @@ spec: configMap: name: {{ include "common.fullname" . }}-properties defaultMode: 0644 + - name: {{ include "common.fullname" . }}-certs + {{ if .Values.certpersistence.enabled }} + persistentVolumeClaim: + claimName: {{ include "common.fullname" . }}-pvc-certs + {{ else }} + emptyDir: {} + {{ end }} {{ if not .Values.persistence.enabled }} - name: {{ include "common.fullname" . }}-mdsal emptyDir: {} @@ -200,4 +209,4 @@ spec: selector: matchLabels: name: {{ include "common.fullname" . }} - {{ end }} + {{ end }}
\ No newline at end of file diff --git a/kubernetes/sdnc/values.yaml b/kubernetes/sdnc/values.yaml index 20f20af3ec..95bc31a96b 100644 --- a/kubernetes/sdnc/values.yaml +++ b/kubernetes/sdnc/values.yaml @@ -60,6 +60,9 @@ config: javaHome: /usr/lib/jvm/java-1.8-openjdk # dependency / sub-chart configuration +cds: + enabled: true + dmaap-listener: nameOverride: sdnc-dmaap-listener config: @@ -195,6 +198,22 @@ persistence: mountSubPath: sdnc/mdsal mdsalPath: /opt/opendaylight/current/daexim +certpersistence: + enabled: true + + ## A manually managed Persistent Volume and Claim + ## Requires persistence.enabled: true + ## If defined, PVC must be created manually before volume will be bound + # existingClaim: + + volumeReclaimPolicy: Retain + accessMode: ReadWriteOnce + size: 50Mi + mountPath: /dockerdata-nfs + mountSubPath: sdnc/certs + certPath: /opt/opendaylight/current/certs + ##storageClass: "manual" + ingress: enabled: false |