Skip to content

Bug: externalClusters configuration ignored in standalone mode (regression from PR #760) #831

@kanzalqalandri

Description

@kanzalqalandri

I'm running into an issue where my externalClusters configuration in values.yaml is being ignored when deploying a cluster in standalone mode.

mode: standalone  # or not set (defaults to standalone)

cluster:
  externalClusters:
    - name: source-db
      connectionParameters:
        host: "external-postgres.namespace.svc"
        port: "5432"
        user: "replication_user"
        dbname: "my_database"
      password:
        name: external-db-secret
        key: password

However, when I deploy the chart, the externalClusters section is completely missing from the generated Cluster resource. Looking at the template, I can see why this is happening.

Root Cause

In charts/cluster/templates/_external_clusters.tpl, the template logic is:

{{- if eq .Values.mode "standalone" }}
{{- else }}
externalClusters:

This means when mode is standalone (the default), the entire externalClusters section is skipped, even if I've explicitly configured custom external clusters in my values.

I understand this was changed in PR #760 to fix Helm v4 compatibility issues with null values, which totally makes sense. However, this inadvertently removed the ability to configure custom external clusters in standalone mode, which is a legitimate use case for things like logical replication, foreign data wrappers, or monitoring external databases.

Expected Behavior

The chart should support custom externalClusters configuration in standalone mode. The externalClusters field should be rendered when explicitly configured, regardless of the mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingchart( cluster )Related to the cluster chart

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions