Skip to content

Conversation

@philippemnoel
Copy link
Contributor

Summary

Fixes the spec.externalClusters: Invalid value: "null" error that occurs when deploying in standalone mode with backups disabled and using strict YAML validation (server-side apply).

This fix aligns with upstream CloudNativePG charts PR #760 to minimize future rebase conflicts.

Root Cause

When mode: standalone and backups.enabled: false, the generated YAML ends with:

externalClusters:

with no content. Strict YAML parsers interpret this as externalClusters: null instead of an empty array, causing CNPG operator validation to fail.

Changes Made

1. Fixed _external_clusters.tpl

  • Moved externalClusters: field inside conditional logic
  • Standalone mode: only output field if custom clusters defined
  • Recovery/replica modes: always output field with generated config
  • Matches upstream approach while preserving ParadeDB's custom externalClusters feature

2. Updated CI Validation

  • Added --server-side --validate=strict flags to kubectl apply in deploy-cluster action
  • Ensures future CI runs catch similar YAML validation issues

Testing

  • Verified fix works in standalone mode with backups disabled
  • Confirmed recovery and replica modes still work correctly
  • CI tests pass with stricter validation

Related

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. bug Something isn't working chart( cluster ) Related to the cluster chart labels Jan 2, 2026
Signed-off-by: Philippe Noël <philippemnoel@gmail.com>
@philippemnoel philippemnoel force-pushed the phil/make-externalcluster-conditional branch from fa727e4 to 10d92e0 Compare January 2, 2026 17:33
@philippemnoel philippemnoel deleted the phil/make-externalcluster-conditional branch January 3, 2026 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working chart( cluster ) Related to the cluster chart size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant