Chart rewrite for the 2.x single-server architecture: one stateless server deployment (frontend embedded, /api served by the same process), no PVC, single service and ingress path, optional guacd sidecar (disabled by default), 2.x env vocabulary (TRUST_PROXY, readonly role), probes send the public hostname as Host header. Fixes #29: all three reported spots (PVC storageClass guard, RWX assets PVC, frontend nginx 'backend' hostname) are removed by this rewrite.
200 lines
4.2 KiB
YAML
200 lines
4.2 KiB
YAML
# Fixtures for the patchmon install-test: throwaway postgres + redis, a dex
|
|
# OIDC provider, and the secrets the 1Password operator would otherwise
|
|
# materialize (release name: ci). The 2.x server is a single stateless
|
|
# container, so no PV/StorageClass fixtures and no service aliases are needed.
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: ci-patchmon-postgres-secret
|
|
stringData:
|
|
database-url: postgresql://ci:ci@postgres:5432/patchmon
|
|
---
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: ci-patchmon-redis-secret
|
|
stringData:
|
|
host: redis
|
|
port: "6379"
|
|
username: default
|
|
password: cipass
|
|
db: "0"
|
|
---
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: ci-patchmon-patchmon-secret
|
|
stringData:
|
|
jwt-secret: patchmon-ci-jwt-secret-0123456789abcdef0123456789abcdef
|
|
encryption-key: 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
|
|
session-secret: patchmon-ci-session-secret-0123456789abcdef0123456789abcdef
|
|
---
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: ci-patchmon-oidc-secret
|
|
stringData:
|
|
issuer-url: http://dex.default.svc.cluster.local:5556/dex
|
|
client-id: ci-client
|
|
client-secret: ci-client-secret
|
|
redirect-uri: https://patchmon.ci.local/auth/callback
|
|
requested-scopes: openid profile email
|
|
button-text: CI SSO
|
|
user-group-name: users
|
|
admin-group-name: admins
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: postgres
|
|
labels:
|
|
app: postgres
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: postgres
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: postgres
|
|
spec:
|
|
containers:
|
|
- name: postgres
|
|
image: public.ecr.aws/docker/library/postgres:16-alpine
|
|
env:
|
|
- name: POSTGRES_USER
|
|
value: ci
|
|
- name: POSTGRES_PASSWORD
|
|
value: ci
|
|
- name: POSTGRES_DB
|
|
value: patchmon
|
|
ports:
|
|
- containerPort: 5432
|
|
readinessProbe:
|
|
exec:
|
|
command: ["pg_isready", "-U", "ci"]
|
|
periodSeconds: 5
|
|
volumeMounts:
|
|
- name: data
|
|
mountPath: /var/lib/postgresql/data
|
|
volumes:
|
|
- name: data
|
|
emptyDir: {}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: postgres
|
|
spec:
|
|
selector:
|
|
app: postgres
|
|
ports:
|
|
- port: 5432
|
|
targetPort: 5432
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: redis
|
|
labels:
|
|
app: redis
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: redis
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: redis
|
|
spec:
|
|
containers:
|
|
- name: redis
|
|
image: public.ecr.aws/docker/library/redis:7-alpine
|
|
args: ["redis-server", "--requirepass", "cipass"]
|
|
ports:
|
|
- containerPort: 6379
|
|
readinessProbe:
|
|
tcpSocket:
|
|
port: 6379
|
|
periodSeconds: 5
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: redis
|
|
spec:
|
|
selector:
|
|
app: redis
|
|
ports:
|
|
- port: 6379
|
|
targetPort: 6379
|
|
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: dex-config
|
|
data:
|
|
config.yaml: |
|
|
issuer: http://dex.default.svc.cluster.local:5556/dex
|
|
storage:
|
|
type: memory
|
|
web:
|
|
http: 0.0.0.0:5556
|
|
oauth2:
|
|
skipApprovalScreen: true
|
|
staticClients:
|
|
- id: ci-client
|
|
secret: ci-client-secret
|
|
name: CI Client
|
|
redirectURIs:
|
|
- https://patchmon.ci.local/auth/callback
|
|
enablePasswordDB: true
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: dex
|
|
labels:
|
|
app: dex
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: dex
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: dex
|
|
spec:
|
|
containers:
|
|
- name: dex
|
|
image: ghcr.io/dexidp/dex:v2.41.1
|
|
command: ["dex", "serve", "/etc/dex/cfg/config.yaml"]
|
|
ports:
|
|
- containerPort: 5556
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /dex/healthz
|
|
port: 5556
|
|
periodSeconds: 5
|
|
volumeMounts:
|
|
- name: config
|
|
mountPath: /etc/dex/cfg
|
|
volumes:
|
|
- name: config
|
|
configMap:
|
|
name: dex-config
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: dex
|
|
spec:
|
|
selector:
|
|
app: dex
|
|
ports:
|
|
- port: 5556
|
|
targetPort: 5556
|