# Live-state delta for the CloudNativePG operator, kept deliberate. # # Everything below is a hand-applied change that exists on the running # cnpg-controller-manager but is NOT in the upstream 1.30.0 release manifest. # Adopting upstream raw would silently revert them, so they are declared here # as the operator's real configuration. # # Leader election: single-node etcd on the T480's PM991 NVMe stalls WAL fsync # for multiple seconds during heavy Forgejo dind builds. The apiserver stops # answering, client-go's 5s lease-renewal HTTP timeout expires, and # controller-runtime fatals with "leader election lost" (223 restarts / 45d). # Lease 60s / renew 45s rides out a stall instead of restarting the operator. # Safe with replicas: 1 -- there is no second holder to split-brain against. # NOTE: these flags are integer SECONDS, not Go durations. apiVersion: apps/v1 kind: Deployment metadata: name: cnpg-controller-manager namespace: cnpg-system spec: template: spec: containers: - name: manager args: - controller - --leader-elect - --leader-lease-duration=60 - --leader-renew-deadline=45 - --max-concurrent-reconciles=10 - --config-map-name=cnpg-controller-manager-config - --secret-name=cnpg-controller-manager-config - --webhook-port=9443 # The pod talks to the API over the WireGuard overlay address # (10.10.0.2:6443); the in-cluster 10.96.0.1 Service VIP is not # reachable from this namespace (see k8s-api firewall on the T480). env: - name: KUBERNETES_SERVICE_HOST value: "10.10.0.2" - name: KUBERNETES_SERVICE_PORT value: "6443" # Upstream ships 100m/200Mi, which is tight enough that the operator # was starved on this box. Raised by hand; keep it. resources: limits: cpu: 500m memory: 512Mi # Upstream gives the manager 6*5s = 30s to answer /readyz, which is # shorter than a real NVMe fsync stall. 36*5s = 3min. startupProbe: failureThreshold: 36