Fix CNPG webhook drift for WAL timeout parameters #14

Merged
forgejo_admin merged 1 commit from 13-deploy-cloudnativepg-operator-cluster-to into main 2026-03-02 21:17:43 +00:00

Summary

  • Pin wal_receiver_timeout and wal_sender_timeout CNPG defaults in the CNPG Cluster manifest
  • CNPG's admission webhook injects these values (5min) when absent, causing Terraform provider "inconsistent result after apply" errors on every tofu apply

Changes

  • terraform/main.tf: added wal_receiver_timeout = "5min" and wal_sender_timeout = "5min" to the postgresql.parameters block in the kubernetes_manifest.cnpg_cluster resource

Test Plan

  • tofu fmt -check passes
  • tofu validate passes
  • tofu plan shows no drift for the CNPG cluster resource (requires live cluster)

Review Checklist

  • No secrets committed
  • No unnecessary file changes
  • Commit messages are descriptive
  • tofu fmt and tofu validate pass
  • Forgejo issue: #13
  • plan-2026-02-26-tf-modularize-postgres -- Phase 2
## Summary - Pin `wal_receiver_timeout` and `wal_sender_timeout` CNPG defaults in the CNPG Cluster manifest - CNPG's admission webhook injects these values (`5min`) when absent, causing Terraform provider "inconsistent result after apply" errors on every `tofu apply` ## Changes - `terraform/main.tf`: added `wal_receiver_timeout = "5min"` and `wal_sender_timeout = "5min"` to the `postgresql.parameters` block in the `kubernetes_manifest.cnpg_cluster` resource ## Test Plan - [x] `tofu fmt -check` passes - [x] `tofu validate` passes - [ ] `tofu plan` shows no drift for the CNPG cluster resource (requires live cluster) ## Review Checklist - [x] No secrets committed - [x] No unnecessary file changes - [x] Commit messages are descriptive - [x] `tofu fmt` and `tofu validate` pass ## Related Notes - Forgejo issue: #13 - `plan-2026-02-26-tf-modularize-postgres` -- Phase 2
CNPG's admission webhook injects wal_receiver_timeout and
wal_sender_timeout defaults into the Cluster spec, causing
Terraform provider drift errors on every apply. Pin the
CNPG default values (5min) in the manifest.

Closes #13

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
forgejo_admin deleted branch 13-deploy-cloudnativepg-operator-cluster-to 2026-03-02 21:17:43 +00:00
Sign in to join this conversation.
No description provided.