add pg
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Simple_Not 2023-12-14 20:20:16 +10:00
parent c781e4e94e
commit b970f3f79d
4 changed files with 78 additions and 1 deletions

View File

@ -29,3 +29,12 @@ metadata:
namespace: pg
data:
postgres-dbname: mainbase
---
apiVersion: v1
kind: Secret
metadata:
name: pgadmin-secret
namespace: pg
type: Opaque
data:
pgadmin-default-password: YWRtb24=

View File

@ -0,0 +1,32 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: pgadmin
namespace: pg
spec:
selector:
matchLabels:
app: pgadmin
replicas: 1
template:
metadata:
labels:
app: pgadmin
spec:
containers:
- name: pgadmin4
image: dpage/pgadmin4
env:
- name: PGADMIN_DEFAULT_EMAIL
value: "un359@mail.ru"
- name: PGADMIN_DEFAULT_PASSWORD
valueFrom:
secretKeyRef:
name: pgadmin-secret
key: pgadmin-default-password
- name: PGADMIN_PORT
value: "80"
ports:
- containerPort: 80
name: pgadminport

View File

@ -0,0 +1,16 @@
---
apiVersion: v1
kind: Service
metadata:
name: pgadmin
labels:
app: pgadmin
namespace: pg
spec:
selector:
app: pgadmin
ports:
- port: 80
name: pgadmin
targetport: 80

View File

@ -0,0 +1,20 @@
---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: HTTPRoute
metadata:
name: http-pgadmin
namespace: default
spec:
hostnames:
- pgadmin.guaranteedstruggle.host
parentRefs:
- name: my-gateway
namespace: default
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: pgadmin
port: 80