Skip to content

Conversation

@ankitml
Copy link

@ankitml ankitml commented Dec 29, 2025

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

Updated to match upstream PR cloudnative-pg#760 which fixes the same issue:
- Moved externalClusters field inside conditional in template
- Reverted cluster.yaml to unconditional include
- Preserved ParadeDB-specific custom externalClusters feature

This minimizes future rebase conflicts with upstream while
maintaining backward compatibility with ParadeDB's custom
external cluster configuration.

Related: cloudnative-pg#760
…ment test

The test was failing because paradedb/paradedb:17-v0.15.20 image does not exist on Docker Hub, causing ImagePullBackOff. Updated to use 0.15.21 which exists and is already used in the post-upgrade step.
- Updated from v0.15.20/v0.15.21 to v0.20.5 (latest release)
- Fixed ImagePullBackOff error (v0.15.20 image doesn't exist)
- Updated all test configs and assertions to use v0.20.5
Copy link
Member

@philippemnoel philippemnoel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it lgtm aside from all the extension version changes which I don't think should be there

@ankitml ankitml merged commit 53fa37c into dev Dec 30, 2025
25 of 26 checks passed
@ankitml ankitml deleted the fix/external-clusters-null-value branch December 30, 2025 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants