add pg
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Simple_Not 2023-12-14 21:06:50 +10:00
parent bb5a517f34
commit f7e57cbd30

View File

@ -14,14 +14,14 @@ spec:
labels:
app: pgadmin
spec:
initContainers:
# костыль взят отсюда https://devpress.csdn.net/k8s/62fd568b7e66823466191f32.html
- name: pgadmin-data-permission-fix
image: busybox
command: ["/bin/chown", "-R", "5050:5050", "/var/lib/pgadmin"]
volumeMounts:
- name: pgadmin
mountPath: /var/lib/pgadmin
# # initContainers:
# # # костыль взят отсюда https://devpress.csdn.net/k8s/62fd568b7e66823466191f32.html
# # - name: pgadmin-data-permission-fix
# # image: busybox
# # command: ["/bin/chown", "-R", "5050:5050", "/var/lib/pgadmin"]
# # volumeMounts:
# # - name: pgadmin
# # mountPath: /var/lib/pgadmin
containers:
- name: pgadmin4
image: dpage/pgadmin4
@ -41,49 +41,49 @@ spec:
name: pgadminport
volumeMounts:
- mountPath: /var/lib/pgadmin
name: pgadmin
# - mountPath: /var/lib/pgadmin
# name: pgadmin
- name: pgadmin-config
mountPath: /pgadmin4/servers.json
subPath: servers.json
readOnly: true
volumes:
- name: pgadmin
persistentVolumeClaim:
claimName: pgadmin-pv-claim
# - name: pgadmin
# persistentVolumeClaim:
# claimName: pgadmin-pv-claim
- name: pgadmin-config
configMap:
name: pgadmin-config
---
kind: PersistentVolume
apiVersion: v1
metadata:
namespace: pg
name: pgadmin-pv-volume
labels:
type: local
app: pgadmin
spec:
storageClassName: longhorn
capacity:
storage: 1Gi
accessModes:
- ReadWriteMany
hostPath:
path: "/mnt/data"
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
namespace: pg
name: pgadmin-pv-claim
labels:
app: pgadmin
spec:
storageClassName: longhorn
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
# ---
# kind: PersistentVolume
# apiVersion: v1
# metadata:
# namespace: pg
# name: pgadmin-pv-volume
# labels:
# type: local
# app: pgadmin
# spec:
# storageClassName: longhorn
# capacity:
# storage: 1Gi
# accessModes:
# - ReadWriteMany
# hostPath:
# path: "/mnt/data"
# ---
# kind: PersistentVolumeClaim
# apiVersion: v1
# metadata:
# namespace: pg
# name: pgadmin-pv-claim
# labels:
# app: pgadmin
# spec:
# storageClassName: longhorn
# accessModes:
# - ReadWriteMany
# resources:
# requests:
# storage: 1Gi