apps(customer1): anonymize client name — farrisilk -> customer1
Rename the client-shaped lab replica namespace and its manifests to keep the
client name out of the repo going forward (git history is intentionally not
rewritten).
- apps/base/farrisilk -> apps/base/customer1 (namespace, workloads, PVCs,
HTTPRoutes, backup CronJob, README)
- infrastructure/networking/internal/gateway-farrisilk-{odoo,metabase}.yaml ->
gateway-customer1-{odoo,metabase}.yaml (listener ports unchanged: 8086/8087)
- firewall comment headers updated (rules/ports untouched)
No functional change beyond object names; workloads remain parked at 0.
This commit is contained in:
parent
f9888c63f0
commit
ae22aab330
16 changed files with 80 additions and 80 deletions
143
apps/base/customer1/postgres.yaml
Normal file
143
apps/base/customer1/postgres.yaml
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
# Plain PostgreSQL 16 — deliberately NOT CloudNativePG.
|
||||
#
|
||||
# The client runs Odoo against a plain Postgres on a Proxmox VM. This namespace
|
||||
# is a *lab replica of that shape*, so the database is a bare container with a
|
||||
# single local-path volume, no operator, no replicas, no WAL archive. Do not
|
||||
# "improve" this into a CNPG Cluster: the point is to develop and audit against
|
||||
# the client's actual architecture, not ours.
|
||||
#
|
||||
# Backups: none at the database level — no WAL archive, no replica, no PITR.
|
||||
# The client's practice (a cron-driven `pg_dump` of the DB only) is mirrored by
|
||||
# `backup.yaml` in this directory: nightly logical dumps, 14-day retention, on a
|
||||
# node-local PVC, with the filestore deliberately NOT covered. See README.
|
||||
# Do not "improve" this into a CNPG Cluster: the point is to develop and audit
|
||||
# against the client's actual architecture, not ours.
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: pg-data
|
||||
namespace: customer1
|
||||
spec:
|
||||
accessModes: [ReadWriteOnce]
|
||||
storageClassName: local-path
|
||||
resources:
|
||||
requests:
|
||||
storage: 10Gi
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: pg
|
||||
namespace: customer1
|
||||
spec:
|
||||
# Parked 2026-11-22 (power budget) — see apps/base/customer1/odoo.yaml.
|
||||
# Recreate: the data directory must be released before anything restarts.
|
||||
replicas: 0
|
||||
strategy:
|
||||
type: Recreate
|
||||
selector:
|
||||
matchLabels:
|
||||
app: pg
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: pg
|
||||
app.kubernetes.io/part-of: customer1
|
||||
spec:
|
||||
nodeSelector:
|
||||
kubernetes.io/hostname: siriussec
|
||||
tolerations:
|
||||
- key: dedicated
|
||||
operator: Exists
|
||||
effect: PreferNoSchedule
|
||||
containers:
|
||||
- name: postgres
|
||||
image: postgres:16
|
||||
imagePullPolicy: IfNotPresent
|
||||
args: ["-c", "max_connections=60"]
|
||||
ports:
|
||||
- name: postgres
|
||||
containerPort: 5432
|
||||
env:
|
||||
- name: POSTGRES_USER
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: pg-app
|
||||
key: username
|
||||
- name: POSTGRES_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: pg-app
|
||||
key: password
|
||||
# The bootstrap superuser's own database. `odoo` and `metabase` are
|
||||
# created by the init script below.
|
||||
- name: POSTGRES_DB
|
||||
value: postgres
|
||||
- name: PGDATA
|
||||
value: /var/lib/postgresql/data/pgdata
|
||||
# Consumed only by 01-init-dbs.sh on first start.
|
||||
- name: ODOO_DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: pg-users
|
||||
key: odoo_password
|
||||
- name: METABASE_DB_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: pg-users
|
||||
key: metabase_password
|
||||
- name: METABASE_RO_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: pg-users
|
||||
key: metabase_ro_password
|
||||
- name: TZ
|
||||
value: America/Los_Angeles
|
||||
readinessProbe:
|
||||
exec:
|
||||
command: ["pg_isready", "-U", "postgres", "-d", "postgres"]
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
timeoutSeconds: 3
|
||||
livenessProbe:
|
||||
exec:
|
||||
command: ["pg_isready", "-U", "postgres", "-d", "postgres"]
|
||||
initialDelaySeconds: 60
|
||||
periodSeconds: 20
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 4
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
memory: 1Gi
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: /var/lib/postgresql/data
|
||||
- name: initdb
|
||||
mountPath: /docker-entrypoint-initdb.d
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: data
|
||||
persistentVolumeClaim:
|
||||
claimName: pg-data
|
||||
- name: initdb
|
||||
configMap:
|
||||
name: pg-init
|
||||
defaultMode: 0555
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: pg
|
||||
namespace: customer1
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app: pg
|
||||
ports:
|
||||
- name: postgres
|
||||
port: 5432
|
||||
targetPort: postgres
|
||||
protocol: TCP
|
||||
Loading…
Reference in a new issue