Add pgadmin

This commit is contained in:
dvirlabs 2025-09-21 01:52:34 +03:00
parent 4339fae5ab
commit 8156c3315d
6 changed files with 94 additions and 1 deletions

View File

@ -0,0 +1,6 @@
apiVersion: v2
name: pgadmin
description: Simple pgAdmin 4
type: application
version: 0.1.0
appVersion: "8"

View File

@ -0,0 +1,30 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ .Release.Name }}
spec:
replicas: 1
selector:
matchLabels:
app: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ .Release.Name }}
spec:
containers:
- name: pgadmin
image: {{ .Values.image }}
ports:
- containerPort: 80
env:
- name: PGADMIN_DEFAULT_EMAIL
value: {{ .Values.pgadmin.email | quote }}
- name: PGADMIN_DEFAULT_PASSWORD
value: {{ .Values.pgadmin.password | quote }}
# optional: set a fixed base path if you ever host behind subpath
# env:
# - name: SCRIPT_NAME
# value: /pgadmin
# - name: PGADMIN_CONFIG_SERVER_MODE
# value: "True"

View File

@ -0,0 +1,26 @@
{{- if .Values.ingress.enabled }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ .Release.Name }}
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | nindent 4 }}
{{- end }}
spec:
ingressClassName: {{ .Values.ingress.className }}
rules:
- host: {{ (index .Values.ingress.hosts 0).host }}
http:
paths:
- path: {{ (index .Values.ingress.hosts 0).path }}
pathType: {{ (index .Values.ingress.hosts 0).pathType }}
backend:
service:
name: {{ .Release.Name }}
port:
number: {{ $.Values.service.port }}
tls:
- hosts:
- {{ (index .Values.ingress.hosts 0).host }}
{{- end }}

View File

@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Release.Name }}
spec:
type: {{ .Values.service.type }}
selector:
app: {{ .Release.Name }}
ports:
- port: {{ .Values.service.port }}
targetPort: 80

View File

@ -0,0 +1,20 @@
image: dpage/pgadmin4:latest
pgadmin:
email: admin@dvirlabs.com
password: supersecret # change me
service:
type: ClusterIP
port: 80
ingress:
enabled: true
className: traefik
annotations:
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.tls: "true"
hosts:
- host: pgadmin.dvirlabs.com
path: /
pathType: Prefix

View File

@ -1,7 +1,7 @@
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: {{ .Release.Name }} name: {{ .Release.Name }}-db
spec: spec:
replicas: 1 replicas: 1
selector: selector: