Skip to content

ExternalConfig Array Merging Issue in Kubernetes vs Local Environment #1935

@vineeth-au

Description

@vineeth-au

I've been troubleshooting a configuration merging issue for the past few days without success, so I'm hoping someone here can help.

Environment Details:

spring-boot-dependencies: 3.3.12
spring-cloud-starter-bootstrap: 4.1.4
spring-cloud-dependencies: 2023.0.3

Deployment: Kubernetes cluster

Configuration Setup:
I'm using environment-specific YAML files: application.yaml, application-dev.yaml, application-staging.yaml, and application-prod.yaml.

application.yaml (base configuration):

my-application-name:
  action1:
    - "Item 1"
    - "Item 2"
    - "Item 3"
    - "Item 4"
    - "Item 5"

application-dev.yaml (environment override):

my-application-name:
  action1:
    - "Item 1"
    - "Item 6"
    - "Item 7"

The Problem:

When running locally, the configuration behaves as expected. However, when deployed to Kubernetes, the action1 array becomes: ["Item 1", "Item 6", "Item 7", "Item 4", "Item 5"].

This appears to be merging arrays rather than completely overriding them, but only in the Kubernetes environment. This is quite similar to the issue mentioned here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions