Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

helmrelease valuesFrom configuration not respecting priority order when merging ConfigMaps #4799

Open
1 task done
vsirimalla opened this issue May 17, 2024 · 0 comments
Open
1 task done

Comments

@vsirimalla
Copy link

Describe the bug

I'm encountering an issue with my helmrelease configuration, where it's not correctly prioritizing values from multiple ConfigMaps. Specifically, I have two ConfigMaps referenced in the valuesFrom field of my helmrelease configuration:

valuesFrom:
  - kind: ConfigMap
    name: devops
    optional: false
    valuesKey: app-global.yaml
  - kind: ConfigMap
    name: devops
    optional: true
    valuesKey: my-api-v1.yaml

The app-global.yaml file contains the following value:

BW_JAVA_OPTS: '-Xms1024M -Xmx1024M'

And the my-api-v1.yaml file contains the following value:

BW_JAVA_OPTS: '-Xms1024M -Xmx1024M -Djava.security.krb5.conf=/config/krb5.conf'

As you can see, I added the my-api-v1.yaml file later in the order, but when I evaluate the configuration, it's still using the value from app-global.yaml. This is not respecting the priority order of the ConfigMaps.

I was expecting that since my-api-v1.yaml comes last in the list, its values would take precedence. However, this doesn't seem to be happening. I'm not sure if this is a bug or intended behavior, but it's causing issues with my application configuration.

Steps to reproduce

  1. Create two ConfigMaps with the specified contents.
  2. Configure your helmrelease to reference these ConfigMaps in the valuesFrom field, as shown above.
  3. Evaluate the helmrelease configuration and observe that it's not respecting the priority order.

Expected behavior

Expected result: The BW_JAVA_OPTS value from my-api-v1.yaml should take precedence since it comes last in the list.

Actual result: The BW_JAVA_OPTS value from app-global.yaml is still being used, despite my-api-v1.yaml coming later in the order.

Screenshots and recordings

No response

OS / Distro

N/A

Flux version

v2.2.3

Flux check

► checking prerequisites
✗ flux 2.1.1 <2.3.0 (new version is available, please upgrade)
✗ Kubernetes version v1.23.8+vmware.3 does not match >=1.25.0-0
► checking controllers
✔ helm-controller: deployment ready
► ghcr.io/fluxcd/helm-controller:v0.37.4
✔ kustomize-controller: deployment ready
► ghcr.io/fluxcd/kustomize-controller:v1.2.2
✔ notification-controller: deployment ready
► ghcr.io/fluxcd/notification-controller:v1.2.4
✔ source-controller: deployment ready
► ghcr.io/fluxcd/source-controller:v1.2.4
► checking crds
✔ alerts.notification.toolkit.fluxcd.io/v1beta3
✔ buckets.source.toolkit.fluxcd.io/v1beta2
✔ gitrepositories.source.toolkit.fluxcd.io/v1
✔ helmcharts.source.toolkit.fluxcd.io/v1beta2
✔ helmreleases.helm.toolkit.fluxcd.io/v2beta2
✔ helmrepositories.source.toolkit.fluxcd.io/v1beta2
✔ kustomizations.kustomize.toolkit.fluxcd.io/v1
✔ ocirepositories.source.toolkit.fluxcd.io/v1beta2
✔ providers.notification.toolkit.fluxcd.io/v1beta3
✔ receivers.notification.toolkit.fluxcd.io/v1
✗ check failed

Git provider

No response

Container Registry provider

No response

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
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

No branches or pull requests

1 participant