From c05a4645510208d65efe880c11343c85a2ec2050 Mon Sep 17 00:00:00 2001 From: Romain Griffiths Date: Mon, 9 Nov 2020 10:00:44 +0100 Subject: [PATCH] feat: added plugin configuration support (#4) * Update README.md * feat: added plugin configuration support Co-authored-by: Alexandre Nuttinck --- Chart.yaml | 2 +- README.md | 6 ++++-- templates/deployment.yaml | 32 +++++++++++++++++++++++--------- values.yaml | 23 +++++++++++++++++++++++ 4 files changed, 51 insertions(+), 12 deletions(-) diff --git a/Chart.yaml b/Chart.yaml index a06016b..3759167 100644 --- a/Chart.yaml +++ b/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: adminer appVersion: 4.7.7 -version: 0.1.5 +version: 0.1.6 description: Adminer is a full-featured database management tool written in PHP. Conversely to phpMyAdmin, it consist of a single file ready to deploy to the target server. Adminer is available for MySQL, MariaDB, PostgreSQL, SQLite, MS SQL, Oracle, Firebird, SimpleDB, Elasticsearch and MongoDB home: https://www.adminer.org icon: https://raw.githubusercontent.com/Kong/docker-official-docs/master/adminer/logo.png diff --git a/README.md b/README.md index c23ca05..25eef82 100644 --- a/README.md +++ b/README.md @@ -85,9 +85,11 @@ The following table lists the configurable parameters of the Adminer chart and t | **Affinity** | | `affinity` | node/pod affinities | `{}` | | **LivenessProbe** | -| `livenessProbe` | Liveness probe settings | `nil` | +| `livenessProbe` | Liveness probe settings | `nil` | | **ReadnessProbe** | -| `readinessProbe` | Readiness probe settings | `nil` | +| `readinessProbe` | Readiness probe settings | `nil` | +| `volumeMounts` | Add volumeMount to the adminer container | `nil` | +| `volumes` | Add volumes to the pod | `nil` | ## Credits diff --git a/templates/deployment.yaml b/templates/deployment.yaml index 4ded448..7b1db5f 100644 --- a/templates/deployment.yaml +++ b/templates/deployment.yaml @@ -34,18 +34,32 @@ spec: containerPort: 8080 protocol: TCP env: - - name: ADMINER_PLUGINS - value: {{ .Values.config.plugins }} - - name: ADMINER_DESIGN - value: {{ .Values.config.design }} - - name: ADMINER_DEFAULT_SERVER - value: {{ .Values.config.externalserver }} + - name: ADMINER_PLUGINS + value: {{ .Values.config.plugins }} + - name: ADMINER_DESIGN + value: {{ .Values.config.design }} + - name: ADMINER_DEFAULT_SERVER + value: {{ .Values.config.externalserver }} + {{- with .Values.resources }} resources: - {{- toYaml .Values.resources | nindent 12 }} + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.volumeMounts }} + volumeMounts: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.livenessProbe }} livenessProbe: -{{ toYaml .Values.livenessProbe | indent 12 }} + {{ toYaml . | indent 12 }} + {{- end }} + {{- with .Values.readinessProbe }} readinessProbe: -{{ toYaml .Values.readinessProbe | indent 12 }} + {{ toYaml . | indent 12 }} + {{- end }} + {{- with .Values.volumes }} + volumes: + {{- toYaml . | nindent 8 }} + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/values.yaml b/values.yaml index 6943cfe..e5af99a 100644 --- a/values.yaml +++ b/values.yaml @@ -43,6 +43,29 @@ ingress: hosts: [] path: / +# kubectl create secret generic ca --from-file=ca.pem +# cat > login-ssl.php << EOF +# "/secrets/ca.pem")); +# EOF +# kubectl create configmap plugins-enabled --from-file=login-ssl.php +# volumeMounts: +# - name: ca +# mountPath: "/secrets/" +# readOnly: true +# - name: plugins-enabled +# mountPath: "/var/www/html/plugins-enabled/" +# readOnly: true + +# volumes: +# - name: ca +# secret: +# secretName: ca +# - name: plugins-enabled +# configMap: +# name: plugins-enabled + resources: {} # We usually recommend not to specify default resources and to leave this as a conscious # choice for the user. This also increases chances charts run on environments with little