From 1a381d1539b8fba7c9037b5eb6afcfa68ae3c162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20H=C3=B6sler?= Date: Tue, 13 Mar 2018 13:35:09 +0100 Subject: [PATCH] [stable/mariadb] use credentials in exec probes (#3811) * use credentials for health check * refactor app label to meet best practices * exec probes within bash to access valueFrom env vars --- stable/mariadb/Chart.yaml | 2 +- stable/mariadb/templates/configmap.yaml | 2 +- stable/mariadb/templates/deployment.yaml | 14 ++++++++------ stable/mariadb/templates/pvc.yaml | 2 +- stable/mariadb/templates/secrets.yaml | 2 +- stable/mariadb/templates/svc.yaml | 4 ++-- 6 files changed, 14 insertions(+), 12 deletions(-) diff --git a/stable/mariadb/Chart.yaml b/stable/mariadb/Chart.yaml index ca415b38c7..dd6502e0d2 100644 --- a/stable/mariadb/Chart.yaml +++ b/stable/mariadb/Chart.yaml @@ -1,5 +1,5 @@ name: mariadb -version: 2.1.8 +version: 2.1.9 appVersion: 10.1.31 description: Fast, reliable, scalable, and easy to use open-source relational database system. MariaDB Server is intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. keywords: diff --git a/stable/mariadb/templates/configmap.yaml b/stable/mariadb/templates/configmap.yaml index 00a6c8cd5c..e374ef2b5a 100644 --- a/stable/mariadb/templates/configmap.yaml +++ b/stable/mariadb/templates/configmap.yaml @@ -3,7 +3,7 @@ kind: ConfigMap metadata: name: {{ template "mariadb.fullname" . }} labels: - app: {{ template "mariadb.fullname" . }} + app: {{ template "mariadb.name" . }} chart: {{ template "mariadb.chart" . }} release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" diff --git a/stable/mariadb/templates/deployment.yaml b/stable/mariadb/templates/deployment.yaml index 6d9bcaf240..342ac1645b 100644 --- a/stable/mariadb/templates/deployment.yaml +++ b/stable/mariadb/templates/deployment.yaml @@ -3,7 +3,7 @@ kind: Deployment metadata: name: {{ template "mariadb.fullname" . }} labels: - app: {{ template "mariadb.fullname" . }} + app: {{ template "mariadb.name" . }} chart: {{ template "mariadb.chart" . }} release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" @@ -11,7 +11,7 @@ spec: template: metadata: labels: - app: {{ template "mariadb.fullname" . }} + app: {{ template "mariadb.name" . }} spec: securityContext: runAsUser: 1001 @@ -58,15 +58,17 @@ spec: livenessProbe: exec: command: - - mysqladmin - - ping + - bash + - -c + - mysqladmin ping{{ if .Values.usePassword }} -uroot -p$MARIADB_ROOT_PASSWORD{{ end }} initialDelaySeconds: 30 timeoutSeconds: 5 readinessProbe: exec: command: - - mysqladmin - - ping + - bash + - -c + - mysqladmin ping{{ if .Values.usePassword }} -uroot -p$MARIADB_ROOT_PASSWORD{{ end }} initialDelaySeconds: 5 timeoutSeconds: 1 resources: diff --git a/stable/mariadb/templates/pvc.yaml b/stable/mariadb/templates/pvc.yaml index 68ca5fcf65..d46717f965 100644 --- a/stable/mariadb/templates/pvc.yaml +++ b/stable/mariadb/templates/pvc.yaml @@ -4,7 +4,7 @@ apiVersion: v1 metadata: name: {{ template "mariadb.fullname" . }} labels: - app: {{ template "mariadb.fullname" . }} + app: {{ template "mariadb.name" . }} chart: {{ template "mariadb.chart" . }} release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" diff --git a/stable/mariadb/templates/secrets.yaml b/stable/mariadb/templates/secrets.yaml index bf89386769..ecb5b715b7 100644 --- a/stable/mariadb/templates/secrets.yaml +++ b/stable/mariadb/templates/secrets.yaml @@ -4,7 +4,7 @@ kind: Secret metadata: name: {{ template "mariadb.fullname" . }} labels: - app: {{ template "mariadb.fullname" . }} + app: {{ template "mariadb.name" . }} chart: {{ template "mariadb.chart" . }} release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" diff --git a/stable/mariadb/templates/svc.yaml b/stable/mariadb/templates/svc.yaml index 9cb7196f48..111608c104 100644 --- a/stable/mariadb/templates/svc.yaml +++ b/stable/mariadb/templates/svc.yaml @@ -3,7 +3,7 @@ kind: Service metadata: name: {{ template "mariadb.fullname" . }} labels: - app: {{ template "mariadb.fullname" . }} + app: {{ template "mariadb.name" . }} chart: {{ template "mariadb.chart" . }} release: "{{ .Release.Name }}" heritage: "{{ .Release.Service }}" @@ -29,4 +29,4 @@ spec: targetPort: metrics {{- end }} selector: - app: {{ template "mariadb.fullname" . }} + app: {{ template "mariadb.name" . }}