summaryrefslogtreecommitdiffstats
path: root/kubernetes/so/charts/mariadb/templates/deployment.yaml
diff options
context:
space:
mode:
authorMike Elliott <mike.elliott@amdocs.com>2018-02-12 15:54:03 -0500
committerMike Elliott <mike.elliott@amdocs.com>2018-02-23 15:09:17 -0500
commitd32d36e3219cc0f17e2fe81e6ac50866e4025140 (patch)
treee30ef0e7c453a1b5e6a4d0c4b0f6eca9fa5a31fe /kubernetes/so/charts/mariadb/templates/deployment.yaml
parenta70775c54d244fe769293ea3bba1d99881416e6e (diff)
Add standardized helm chart for so
This is a standardization (based on helm community best practices) of a Helm chart for the Service Orchestrator (so) in ONAP. How to deploy the so chart (outside of the parent onap chart) from the local oom/kubernetes codebase. ** need to create/update dependencies defined in the chart's ** requirements.yaml helm dep update so/ ** deploy the so helm chart with the "release" name of 'onap' helm install so/ -n onap Change-Id: I22471eb9fe0dec32941e14dc63857222c80ebe20 Issue-ID: OOM-727 Signed-off-by: Mike Elliott <mike.elliott@amdocs.com>
Diffstat (limited to 'kubernetes/so/charts/mariadb/templates/deployment.yaml')
-rw-r--r--kubernetes/so/charts/mariadb/templates/deployment.yaml118
1 files changed, 118 insertions, 0 deletions
diff --git a/kubernetes/so/charts/mariadb/templates/deployment.yaml b/kubernetes/so/charts/mariadb/templates/deployment.yaml
new file mode 100644
index 0000000000..14654dc24a
--- /dev/null
+++ b/kubernetes/so/charts/mariadb/templates/deployment.yaml
@@ -0,0 +1,118 @@
+apiVersion: extensions/v1beta1
+kind: Deployment
+metadata:
+ name: {{ include "common.fullname" . }}
+ namespace: {{ include "common.namespace" . }}
+ labels:
+ app: {{ include "common.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ replicas: {{ .Values.replicaCount }}
+ template:
+ metadata:
+ labels:
+ app: {{ include "common.name" . }}
+ release: {{ .Release.Name }}
+ spec:
+ hostname: mariadb
+ containers:
+ - name: {{ .Chart.Name }}
+ image: {{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ ports:
+ - containerPort: {{ .Values.service.internalPort }}
+ # disable liveness probe when breakpoints set in debugger
+ # so K8s doesn't restart unresponsive container
+ {{- if eq .Values.liveness.enabled true }}
+ livenessProbe:
+ tcpSocket:
+ port: {{ .Values.service.internalPort }}
+ initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.liveness.periodSeconds }}
+ {{end -}}
+ readinessProbe:
+ tcpSocket:
+ port: {{ .Values.service.internalPort }}
+ initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.readiness.periodSeconds }}
+ env:
+ - name: MYSQL_ROOT_PASSWORD
+ valueFrom:
+ secretKeyRef:
+ name: {{ template "common.fullname" . }}
+ key: db-root-password
+ volumeMounts:
+ - mountPath: /var/lib/mysql
+ name: mariadb-data
+ - mountPath: /etc/localtime
+ name: localtime
+ readOnly: true
+ - mountPath: /etc/mysql/conf.d
+ name: mariadb-conf
+ - mountPath: /docker-entrypoint-initdb.d/02-load-additional-changes.sh
+ name: mariadb-docker-entrypoint-initdb
+ subPath: 02-load-additional-changes.sh
+ - mountPath: /docker-entrypoint-initdb.d/01-load-default-sql-files.sh
+ name: mariadb-docker-entrypoint-initdb
+ subPath: 01-load-default-sql-files.sh
+ - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/automated-tests
+ name: mariadb-docker-entrypoint-automated-tests
+ - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/default
+ name: mariadb-docker-entrypoint-bulkload-default
+ - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/demo-dns
+ name: mariadb-docker-entrypoint-demo-dns
+ - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/bulkload-files/demo-vfw
+ name: mariadb-docker-entrypoint-demo-vfw
+ - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/camunda
+ name: mariadb-docker-entrypoint-camunda
+ - mountPath: /docker-entrypoint-initdb.d/db-sql-scripts/main-schemas
+ name: mariadb-docker-entrypoint-main-schemas
+ resources:
+{{ toYaml .Values.resources | indent 12 }}
+ {{- if .Values.nodeSelector }}
+ nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 10 }}
+ {{- end -}}
+ {{- if .Values.affinity }}
+ affinity:
+{{ toYaml .Values.affinity | indent 10 }}
+ {{- end }}
+ volumes:
+ {{- if .Values.persistence.enabled }}
+ - name: mariadb-data
+ persistentVolumeClaim:
+ claimName: {{ include "common.fullname" . }}
+ {{- else }}
+ emptyDir: {}
+ {{- end }}
+ - name: mariadb-conf
+ configMap:
+ name: confd-configmap
+ - name: mariadb-docker-entrypoint-initdb
+ configMap:
+ name: docker-entry-initd-configmap
+ - name: mariadb-docker-entrypoint-automated-tests
+ configMap:
+ name: automated-tests-configmap
+ - name: mariadb-docker-entrypoint-bulkload-default
+ configMap:
+ name: bulkload-default-configmap
+ - name: mariadb-docker-entrypoint-demo-dns
+ configMap:
+ name: demo-dns-configmap
+ - name: mariadb-docker-entrypoint-demo-vfw
+ configMap:
+ name: demo-vfw-configmap
+ - name: mariadb-docker-entrypoint-camunda
+ configMap:
+ name: scripts-camunda-configmap
+ - name: mariadb-docker-entrypoint-main-schemas
+ configMap:
+ name: main-schemas-configmap
+ - name: localtime
+ hostPath:
+ path: /etc/localtime
+ imagePullSecrets:
+ - name: "{{ include "common.name" . }}-docker-registry-key"