initial commit

This commit is contained in:
allard
2025-11-23 18:58:51 +01:00
commit 376a944abc
1553 changed files with 314731 additions and 0 deletions

18
lp/postgres13/README.md Normal file
View File

@@ -0,0 +1,18 @@
#corrupte WAL-archive
#postgres starten zonder database te starten door volgende toe te voegen in yaml::
command: ["sh"]
args: ["-c", "while true; do echo $(date -u) >> /tmp/run.log; sleep 5; done"]
#dan inloggen in draaiende container
kubectl exec -it postgres14-0 -n postgres -- sh
#Switchen naar user POSTGRES
su postgres
#WAL-arhive resetten:
pg_resetwal /var/lib/postgresql/data -f

View File

@@ -0,0 +1,11 @@
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: lp-postgres13
title: Postgres13 (lp)
spec:
type: service
lifecycle: production
owner: platform-team
partOf:
- ../catalog-info.yaml

90
lp/postgres13/postgres13lp.yaml Executable file
View File

@@ -0,0 +1,90 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: postgres13
namespace: postgres
spec:
serviceName: postgres13
replicas: 1
selector:
matchLabels:
app: postgres13
template:
metadata:
labels:
app: postgres13
spec:
containers:
- name: postgres13
image: postgres:13
# command: ["sh"]
# args: ["-c", "while true; do echo $(date -u) >> /tmp/run.log; sleep 5; done"]
resources:
limits:
memory: 500Mi
cpu: 1
requests:
memory: 200Mi
cpu: 500m
ports:
- containerPort: 5432
env:
- name: POSTGRES_DB
value: quay
- name: POSTGRES_USER
value: quay
- name: POSTGRES_PASSWORD
value: quay
volumeMounts:
- mountPath: /var/lib/postgresql/data
name: postgres
volumes:
- name: postgres
persistentVolumeClaim:
claimName: postgres13-pvc
---
apiVersion: v1
kind: Service
metadata:
name: postgres13
labels:
name: postgres13
namespace: postgres
spec:
type: ClusterIP
ports:
- port: 5432
name: postgres
selector:
app: postgres13
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: postgres13-pv
spec:
storageClassName: ""
capacity:
storage: 2Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
volumeMode: Filesystem
hostPath:
path: /mnt/nfs_share/postgres13lp
type: Directory
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: postgres13-pvc
namespace: postgres
spec:
storageClassName: ""
volumeName: postgres13-pv
accessModes:
- ReadWriteMany
volumeMode: Filesystem
resources:
requests:
storage: 2Gi