diff --git a/stable/phpmyadmin/Chart.yaml b/stable/phpmyadmin/Chart.yaml index b8d5c4cd00..c3677d3374 100644 --- a/stable/phpmyadmin/Chart.yaml +++ b/stable/phpmyadmin/Chart.yaml @@ -1,5 +1,5 @@ name: phpmyadmin -version: 1.3.0 +version: 2.0.0 appVersion: 4.8.3 description: phpMyAdmin is an mysql administration frontend keywords: diff --git a/stable/phpmyadmin/README.md b/stable/phpmyadmin/README.md index 9ad79f093c..ecd0915650 100644 --- a/stable/phpmyadmin/README.md +++ b/stable/phpmyadmin/README.md @@ -57,6 +57,7 @@ The following table lists the configurable parameters of the phpMyAdmin chart an | `db.port` | Database port to use to connect | `3306` | | `db.chartName` | Database suffix if included in the same release | `nil` | | `db.host` | Database host to connect to | `nil` | +| `db.bundleTestDB` | Deploy a MariaDB instance for testing purposes | `false` | | `ingress.enabled` | Ingress resource to be added | `false` | | `ingress.annotations` | Ingress annotations | `{ingress.kubernetes.io/rewrite-target: /, nginx.ingress.kubernetes.io/rewrite-target: /}` | | `ingress.path` | Path to access frontend | `/` | diff --git a/stable/phpmyadmin/requirements.lock b/stable/phpmyadmin/requirements.lock new file mode 100644 index 0000000000..46ad4889d6 --- /dev/null +++ b/stable/phpmyadmin/requirements.lock @@ -0,0 +1,6 @@ +dependencies: +- name: mariadb + repository: https://kubernetes-charts.storage.googleapis.com/ + version: 5.2.3 +digest: sha256:527badbbb783f27ccfe621bc74311f1a845cbfded31c24671c45490abd4a4fad +generated: 2018-11-30T15:35:33.209640399+01:00 diff --git a/stable/phpmyadmin/requirements.yaml b/stable/phpmyadmin/requirements.yaml new file mode 100644 index 0000000000..a9aad755a0 --- /dev/null +++ b/stable/phpmyadmin/requirements.yaml @@ -0,0 +1,7 @@ +dependencies: +- name: mariadb + version: 5.x.x + repository: https://kubernetes-charts.storage.googleapis.com/ + condition: db.bundleTestDB + tags: + - phpmyadmin-database diff --git a/stable/phpmyadmin/templates/NOTES.txt b/stable/phpmyadmin/templates/NOTES.txt index dff97d82b2..c7af942f6a 100644 --- a/stable/phpmyadmin/templates/NOTES.txt +++ b/stable/phpmyadmin/templates/NOTES.txt @@ -35,6 +35,12 @@ phpMyAdmin has been configured to connect to a database in {{ if .Values.db.chartName}}{{template "phpmyadmin.dbfullname" .}}{{ else }}{{.Values.db.host}}{{end}} {{if .Values.db.port}}with port {{.Values.db.port}} {{end }} Please login using a database username and password. +{{ else if .Values.db.bundleTestDB }} +For testing purposes, phpMyAdmin has been configured to point to a test MariaDB +instance. Please login using the following credentials: + + Username: root + Password : $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "mariadb.fullname" . }} -o jsonpath="{.data.mariadb-root-password}" | base64 --decode) {{ else }} phpMyAdmin has not been configure to point to a specific database. Please provide the db host, diff --git a/stable/phpmyadmin/templates/_helpers.tpl b/stable/phpmyadmin/templates/_helpers.tpl index 514e5b15e2..0d776554e1 100644 --- a/stable/phpmyadmin/templates/_helpers.tpl +++ b/stable/phpmyadmin/templates/_helpers.tpl @@ -24,6 +24,14 @@ If release name contains chart name it will be used as a full name. {{- end -}} {{- end -}} +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "mariadb.fullname" -}} +{{- printf "%s-%s" .Release.Name "mariadb" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + {{/* Create chart name and version as used by the chart label. */}} diff --git a/stable/phpmyadmin/templates/deployment.yaml b/stable/phpmyadmin/templates/deployment.yaml index dd79273f9f..b1999f9c0f 100644 --- a/stable/phpmyadmin/templates/deployment.yaml +++ b/stable/phpmyadmin/templates/deployment.yaml @@ -49,6 +49,9 @@ spec: {{- if .Values.db.chartName }} - name: DATABASE_HOST value: "{{ template "phpmyadmin.dbfullname" . }}" + {{- else if .Values.db.bundleTestDB }} + - name: DATABASE_HOST + value: "{{ template "mariadb.fullname" . }}" {{- else }} - name: DATABASE_HOST value: "{{ .Values.db.host }}" diff --git a/stable/phpmyadmin/values.yaml b/stable/phpmyadmin/values.yaml index dfe6faf5ae..8c5ebe371d 100644 --- a/stable/phpmyadmin/values.yaml +++ b/stable/phpmyadmin/values.yaml @@ -35,6 +35,9 @@ db: ## please note that this setting precedes dbHost # chartName: mariadb # host: foo + ## If you want to test phpMyAdmin, you can set it to bundle a MariaDB + ## instance + bundleTestDB: false ingress: enabled: false