[stable/phpmyadmin] Allow disabling default annotations (#20869)

* [stable/phpmyadmin] Allow disabling default annotations

Signed-off-by: juan131 <juan@bitnami.com>

* Fix README.md

Signed-off-by: juan131 <juan@bitnami.com>

* Fix annotation

Signed-off-by: juan131 <juan@bitnami.com>
This commit is contained in:
Juan Ariza Toledano
2020-02-19 02:06:25 -08:00
committed by GitHub
parent 25e25b311f
commit fd006eb5ac
5 changed files with 33 additions and 13 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: phpmyadmin
version: 4.2.12
version: 4.3.0
appVersion: 5.0.1
description: phpMyAdmin is an mysql administration frontend
keywords:
+2 -1
View File
@@ -69,7 +69,8 @@ The following table lists the configurable parameters of the phpMyAdmin chart an
| `db.ssl.verify` | Enable SSL certificate validation | `true` |
| `ingress.enabled` | Enable ingress controller resource | `false` |
| `ingress.certManager` | Add annotations for cert-manager | `false` |
| `ingress.annotations` | Ingress annotations | `{ingress.kubernetes.io/rewrite-target: /, nginx.ingress.kubernetes.io/rewrite-target: /}` |
| `ingress.rewriteTarget` | Add annotations to redirect traffic to `/` | `true` |
| `ingress.annotations` | Ingress annotations | `{}` |
| `ingress.hosts[0].name` | Hostname to your PHPMyAdmin installation | `phpmyadmin.local` |
| `ingress.hosts[0].path` | Path within the url structure | `/` |
| `ingress.hosts[0].tls` | Utilize TLS backend in ingress | `false` |
+12
View File
@@ -128,6 +128,18 @@ imagePullSecrets:
{{- end -}}
{{- end -}}
{{/*
Renders a value that contains template.
Usage:
{{ include "phpmyadmin.tplValue" ( dict "value" .Values.path.to.the.Value "context" $) }}
*/}}
{{- define "phpmyadmin.tplValue" -}}
{{- if typeIs "string" .value }}
{{- tpl .value .context }}
{{- else }}
{{- tpl (.value | toYaml) .context }}
{{- end }}
{{- end -}}
{{/*
Compile all warnings into a single message, and call fail.
+6 -2
View File
@@ -12,8 +12,12 @@ metadata:
{{- if .Values.ingress.certManager }}
kubernetes.io/tls-acme: "true"
{{- end }}
{{- range $key, $value := .Values.ingress.annotations }}
{{ $key }}: {{ $value | quote }}
{{- if .Values.ingress.rewriteTarget }}
ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/rewrite-target: /
{{- end }}
{{- if .Values.ingress.annotations }}
{{- include "phpmyadmin.tplValue" (dict "value" .Values.ingress.annotations "context" $) | nindent 4 }}
{{- end }}
spec:
rules:
+12 -9
View File
@@ -79,22 +79,25 @@ db:
verify: true
ingress:
## Set to true to enable ingress record generation
## Set this to true to enable ingress record generation
##
enabled: false
## Set this to true in order to add the corresponding annotations for cert-manager
##
certManager: false
## Ingress annotations done as key:value pairs
## If certManager is set to true, annotation kubernetes.io/tls-acme: "true" will automatically be set
## ref: https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/annotations.md
## Set this to true in order to add the corresponding annotations to redirect traffic to /
##
annotations:
ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/rewrite-target: /
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
rewriteTarget: true
## Additional Ingress annotations done as key:value pairs
## Example:
## annotations:
## kubernetes.io/ingress.class: nginx
## kubernetes.io/tls-acme: "true"
##
# annotations
## The list of hostnames to be covered with this ingress record.
## Most likely this will be just one host, but in the event more hosts are needed, this is an array