568f48098e
encapi is the new Postgres-backed Puppet ENC replacing Cobbler. Stand it up in
k8s alongside artifactapi so the puppet masters (via encapi-cli classify) and
the enc_direct_facts fact can reach it at encapi.k8s.syd1.au.unkin.net.
- add apps/base/encapi: namespace, deployment (git.unkin.net/unkin/encapi), service,
gateway + httproute (encapi.k8s.syd1.au.unkin.net), configmap, CNPG cluster +
pooler (db encapi), VaultAuth + VaultStaticSecrets (postgres-credentials, environment)
- add apps/overlays/au-syd1/encapi overlay
- register apps/overlays/*/encapi in the platform ApplicationSet
Note: the Vault KV secrets kv/kubernetes/namespace/encapi/default/{postgres-credentials,
environment} must be seeded before first sync; 'environment' carries DBPASS (matching
the CNPG owner password) and ENCAPI_WRITE_TOKEN.
34 lines
720 B
YAML
34 lines
720 B
YAML
---
|
|
apiVersion: postgresql.cnpg.io/v1
|
|
kind: Pooler
|
|
metadata:
|
|
name: postgres-pooler
|
|
namespace: encapi
|
|
spec:
|
|
cluster:
|
|
name: postgres
|
|
instances: 2
|
|
pgbouncer:
|
|
parameters:
|
|
default_pool_size: "100"
|
|
max_client_conn: "400"
|
|
paused: false
|
|
poolMode: session
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: pooler
|
|
spec:
|
|
affinity:
|
|
podAntiAffinity:
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
- labelSelector:
|
|
matchExpressions:
|
|
- key: app
|
|
operator: In
|
|
values:
|
|
- pooler
|
|
topologyKey: kubernetes.io/hostname
|
|
containers: []
|
|
type: rw
|