Context
In v0.5.0 (#72), the PostgresPolicyPlan CRD is introduced to hold plan artifacts (SQL, change summary) separately from the PostgresPolicy status. During v0.5.x, the deprecated fields are still populated for backward compatibility.
Changes for v0.6.0
Remove deprecated status fields
Remove from PostgresPolicyStatus:
planned_sql: Option<String>
planned_sql_truncated: bool
last_reconcile_time: Option<String> (deprecated alias of last_successful_reconcile_time)
The operator should stop populating these fields. Any tooling reading them should have migrated to using PostgresPolicyPlan CRs and their associated ConfigMaps.
Default approval mode
- New deployments default to
approval: manual (plans require explicit approval)
- Existing deployments that upgraded from v0.5.x with implicit
approval: auto continue working — the field is preserved in their spec
- Document the behavior change in release notes
CRD schema update
- Remove the deprecated fields from the CRD OpenAPI schema
- Regenerate chart CRD and
k8s/crd.yaml
- Bump chart version
Migration guide
- Release notes should clearly state:
planned_sql is removed — use kubectl get pgplan or read the plan's ConfigMap
last_reconcile_time is removed — use last_successful_reconcile_time
- New deployments default to manual approval — add
approval: auto to spec if you want the v0.5.x behavior
Testing
- Verify policy status no longer contains
planned_sql
- Verify existing
approval: auto policies continue auto-approving
- Verify new policies without explicit
approval field default to manual
- E2E tests for the full plan lifecycle without deprecated fields
Context
In v0.5.0 (#72), the
PostgresPolicyPlanCRD is introduced to hold plan artifacts (SQL, change summary) separately from thePostgresPolicystatus. During v0.5.x, the deprecated fields are still populated for backward compatibility.Changes for v0.6.0
Remove deprecated status fields
Remove from
PostgresPolicyStatus:planned_sql: Option<String>planned_sql_truncated: boollast_reconcile_time: Option<String>(deprecated alias oflast_successful_reconcile_time)The operator should stop populating these fields. Any tooling reading them should have migrated to using
PostgresPolicyPlanCRs and their associated ConfigMaps.Default approval mode
approval: manual(plans require explicit approval)approval: autocontinue working — the field is preserved in their specCRD schema update
k8s/crd.yamlMigration guide
planned_sqlis removed — usekubectl get pgplanor read the plan's ConfigMaplast_reconcile_timeis removed — uselast_successful_reconcile_timeapproval: autoto spec if you want the v0.5.x behaviorTesting
planned_sqlapproval: autopolicies continue auto-approvingapprovalfield default to manual