Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 0ad8576
Author: Alexandre Nuttinck <[email protected]>
Date:   Fri Aug 30 10:45:49 2019 +0200

    feature mount servers.json #4
  • Loading branch information
alexnuttinck committed Aug 30, 2019
1 parent 572fe03 commit 22b8dec
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: pgadmin
version: 0.1.8
appVersion: 4.11.0
version: 0.1.9
appVersion: 4.12.0
description: pgAdmin is a web based administration tool for the PostgreSQL database.
keywords:
- pgadmin
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,13 @@ The following table lists the configurable parameters of the pgAdmin chart and t
| `ingress.path` | Path to access frontend | `/` |
| `ingress.hosts` | Ingress hosts | `[]` |
| `ingress.tls` | Ingress TLS configuration | `[]` |
| **Servers** |
| `servers.enabled` | Enable the servers configuration. If enabled, server definitions found in `servers.config` will be loaded at launch time.| `true` |
| `servers.config` | Server definitions | `See the values.yaml` |
| **ReadinessProbe** |
| `readinessProbe` | Rediness Probe settings | `nil` |
| `readinessProbe` | Rediness Probe settings | `nil` |
| **LivenessProbe** |
| `livenessProbe` | Liveness Probe settings | `nil`|
| `livenessProbe` | Liveness Probe settings | `nil` |
| **Resources** |
| `resources` | CPU/Memory resource requests/limits | `{}` |

Expand Down
15 changes: 15 additions & 0 deletions templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
{{- if .Values.servers.enabled }}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ template "pgadmin.fullname" . }}
labels:
app: {{ template "pgadmin.name" . }}
chart: {{ template "pgadmin.chart" . }}
release: {{ .Release.Name | quote }}
heritage: {{ .Release.Service | quote }}
data:
servers.json: |-
{{ toJson .Values.servers.config | indent 4 }}
{{- end }}
16 changes: 15 additions & 1 deletion templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
Expand Down Expand Up @@ -48,13 +49,18 @@ spec:
- name: pgadmin-data
mountPath: /var/lib/pgadmin
{{- if .Values.pgadmin.tls }}
- namegedit : tls-cert
- name: tls-cert
mountPath: /certs/server.cert
subPath: server.cert
- name: tls-private-key
mountPath: /certs/server.key
subPath: server.key
{{- end }}
{{- if .Values.servers.enabled }}
- name: servers-config
mountPath: /pgadmin4/servers.json
subPath: servers.json
{{- end}}
resources:
{{ toYaml .Values.resources | indent 12 }}
livenessProbe:
Expand Down Expand Up @@ -83,6 +89,14 @@ spec:
- key: server.cert
path: server.cert
{{- end }}
{{- if .Values.servers.enabled }}
- name: servers-config
configMap:
name: {{ template "pgadmin.fullname" . }}
items:
- key: servers.json
path: servers.json
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
Expand Down
17 changes: 16 additions & 1 deletion values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
##
image:
repository: dpage/pgadmin4
tag: 4.11
tag: 4.12
pullPolicy: IfNotPresent

pgadmin:
Expand Down Expand Up @@ -71,6 +71,21 @@ ingress:
hosts: []
tls: []

## Configure servers.json: https://www.pgadmin.org/docs/pgadmin4/latest/import_export_servers.html
##
servers:
enabled: false
config:
Servers:
1:
Name: "Test"
Group: "Server Group 1"
Port: 5432
Username: "postgres"
Host: "postgres"
SSLMode: "prefer"
MaintenanceDB: "postgres"

## Configure liveness and readiness probes
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/
##
Expand Down

0 comments on commit 22b8dec

Please sign in to comment.