diff options
Diffstat (limited to 'kubernetes/clamp/templates')
-rw-r--r-- | kubernetes/clamp/templates/all-services.yaml | 15 | ||||
-rw-r--r-- | kubernetes/clamp/templates/clamp-deployment.yaml | 7 | ||||
-rw-r--r-- | kubernetes/clamp/templates/clamp-mariadb-configmap.yaml | 33 | ||||
-rw-r--r-- | kubernetes/clamp/templates/clamp-mariadb-deployment.yaml | 29 | ||||
-rw-r--r-- | kubernetes/clamp/templates/clamp-pv-pvc.yaml | 14 |
5 files changed, 77 insertions, 21 deletions
diff --git a/kubernetes/clamp/templates/all-services.yaml b/kubernetes/clamp/templates/all-services.yaml index 163ed58aa9..c9f4f5ed5f 100644 --- a/kubernetes/clamp/templates/all-services.yaml +++ b/kubernetes/clamp/templates/all-services.yaml @@ -3,7 +3,7 @@ apiVersion: v1 kind: Service metadata: name: clamp-mariadb - namespace: "{{ .Values.nsPrefix }}-clamp" + namespace: "{{ .Values.nsPrefix }}" labels: app: clamp-mariadb spec: @@ -20,7 +20,18 @@ apiVersion: v1 kind: Service metadata: name: clamp - namespace: "{{ .Values.nsPrefix }}-clamp" + namespace: "{{ .Values.nsPrefix }}" + annotations: + msb.onap.org/service-info: '[ + { + "serviceName": "clamp", + "version": "v1", + "url": "/restservices/clds/v1", + "protocol": "REST", + "port": "8080", + "visualRange":"1" + } + ]' spec: ports: - name: clamp diff --git a/kubernetes/clamp/templates/clamp-deployment.yaml b/kubernetes/clamp/templates/clamp-deployment.yaml index de9adaca81..2c2e13f994 100644 --- a/kubernetes/clamp/templates/clamp-deployment.yaml +++ b/kubernetes/clamp/templates/clamp-deployment.yaml @@ -5,8 +5,9 @@ metadata: labels: app: clamp name: clamp - namespace: "{{ .Values.nsPrefix }}-clamp" + namespace: "{{ .Values.nsPrefix }}" spec: + replicas: {{ .Values.clampReplicas }} selector: matchLabels: app: clamp @@ -35,8 +36,8 @@ spec: - env: - name: SPRING_APPLICATION_JSON value: '{ - "spring.datasource.camunda.url": "jdbc:mariadb:sequential://clamp-mariadb.{{ .Values.nsPrefix }}-clamp:3306/camundabpm?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true&retriesAllDown=2147483647&failoverLoopRetries=2147483647", - "spring.datasource.cldsdb.url": "jdbc:mariadb:sequential://clamp-mariadb.{{ .Values.nsPrefix }}-clamp:3306/cldsdb4?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true&retriesAllDown=2147483647&failoverLoopRetries=2147483647" + "spring.datasource.camunda.url": "jdbc:mariadb:sequential://clamp-mariadb.{{ .Values.nsPrefix }}:3306/camundabpm?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true&retriesAllDown=2147483647&failoverLoopRetries=2147483647", + "spring.datasource.cldsdb.url": "jdbc:mariadb:sequential://clamp-mariadb.{{ .Values.nsPrefix }}:3306/cldsdb4?verifyServerCertificate=false&useSSL=false&requireSSL=false&autoReconnect=true&retriesAllDown=2147483647&failoverLoopRetries=2147483647" }' image: {{ .Values.image.clampImage }}:{{ .Values.image.clampVersion }} imagePullPolicy: {{ .Values.pullPolicy }} diff --git a/kubernetes/clamp/templates/clamp-mariadb-configmap.yaml b/kubernetes/clamp/templates/clamp-mariadb-configmap.yaml new file mode 100644 index 0000000000..9a5fd8f284 --- /dev/null +++ b/kubernetes/clamp/templates/clamp-mariadb-configmap.yaml @@ -0,0 +1,33 @@ +#{{ if not .Values.disableClampClampMariadb }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: clamp-entrypoint-initdb-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: clamp-entrypoint-drop-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/drop/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: clamp-entrypoint-bulkload-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/mariadb/docker-entrypoint-initdb.d/bulkload/*").AsConfig . | indent 2 }} +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: clamp-mariadb-conf-configmap + namespace: {{ .Values.nsPrefix }} +data: +{{ tpl (.Files.Glob "resources/config/mariadb/conf.d/conf1/*").AsConfig . | indent 2 }} +#{{ end }} diff --git a/kubernetes/clamp/templates/clamp-mariadb-deployment.yaml b/kubernetes/clamp/templates/clamp-mariadb-deployment.yaml index 46a6433b7e..a12489ef63 100644 --- a/kubernetes/clamp/templates/clamp-mariadb-deployment.yaml +++ b/kubernetes/clamp/templates/clamp-mariadb-deployment.yaml @@ -3,9 +3,9 @@ apiVersion: extensions/v1beta1 kind: Deployment metadata: name: clamp-mariadb - namespace: "{{ .Values.nsPrefix }}-clamp" + namespace: "{{ .Values.nsPrefix }}" spec: - replicas: 1 + replicas: {{ .Values.clampMariaDbReplicas }} selector: matchLabels: app: clamp-mariadb @@ -25,9 +25,14 @@ spec: - name: MYSQL_ROOT_PASSWORD value: {{ .Values.mysqlPassword }} volumeMounts: - - mountPath: /docker-entrypoint-initdb.d + - mountPath: /docker-entrypoint-initdb.d/load-sql-files-tests-automation.sh name: docker-entrypoint-initdb - - mountPath: /etc/mysql/conf.d + subPath: load-sql-files-tests-automation.sh + - mountPath: /docker-entrypoint-initdb.d/drop/ + name: docker-entrypoint-clds-drop + - mountPath: /docker-entrypoint-initdb.d/bulkload/ + name: docker-entrypoint-bulkload + - mountPath: /etc/mysql/conf.d/conf1/ name: clamp-mariadb-conf - mountPath: /var/lib/mysql name: clamp-mariadb-data @@ -38,14 +43,20 @@ spec: periodSeconds: 10 volumes: - name: docker-entrypoint-initdb - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/clamp/mariadb/docker-entrypoint-initdb.d + configMap: + name: clamp-entrypoint-initdb-configmap + - name: docker-entrypoint-clds-drop + configMap: + name: clamp-entrypoint-drop-configmap + - name: docker-entrypoint-bulkload + configMap: + name: clamp-entrypoint-bulkload-configmap - name: clamp-mariadb-conf - hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/clamp/mariadb/conf.d + configMap: + name: clamp-mariadb-conf-configmap - name: clamp-mariadb-data persistentVolumeClaim: claimName: clamp-db imagePullSecrets: - name: {{ .Values.nsPrefix }}-docker-registry-key -#{{ end }}
\ No newline at end of file +#{{ end }} diff --git a/kubernetes/clamp/templates/clamp-pv-pvc.yaml b/kubernetes/clamp/templates/clamp-pv-pvc.yaml index 0d36141b6c..c542de6026 100644 --- a/kubernetes/clamp/templates/clamp-pv-pvc.yaml +++ b/kubernetes/clamp/templates/clamp-pv-pvc.yaml @@ -2,10 +2,10 @@ apiVersion: v1 kind: PersistentVolume metadata: - name: "{{ .Values.nsPrefix }}-clamp-db" - namespace: "{{ .Values.nsPrefix }}-clamp" + name: "{{ .Values.nsPrefix }}-clamp" + namespace: "{{ .Values.nsPrefix }}" labels: - name: "{{ .Values.nsPrefix }}-clamp-db" + name: "{{ .Values.nsPrefix }}-clamp" spec: capacity: storage: 2Gi @@ -13,13 +13,13 @@ spec: - ReadWriteMany persistentVolumeReclaimPolicy: Retain hostPath: - path: /dockerdata-nfs/{{ .Values.nsPrefix }}/clamp/mariadb/data + path: {{ .Values.dataRootDir }}/{{ .Values.nsPrefix }}/clamp/mariadb/data --- kind: PersistentVolumeClaim apiVersion: v1 metadata: name: clamp-db - namespace: "{{ .Values.nsPrefix }}-clamp" + namespace: "{{ .Values.nsPrefix }}" spec: accessModes: - ReadWriteMany @@ -28,5 +28,5 @@ spec: storage: 2Gi selector: matchLabels: - name: "{{ .Values.nsPrefix }}-clamp-db" -#{{ end }}
\ No newline at end of file + name: "{{ .Values.nsPrefix }}-clamp" +#{{ end }} |