Skip to content

Values in library subcharts are ignored #10899

Closed

Description

@albgp22

Output of helm version:

version.BuildInfo{Version:"v3.8.2", GitCommit:"6e3701edea09e5d55a8ca2aae03a68917630e91b", GitTreeState:"clean", GoVersion:"go1.17.5"}

Output of kubectl version:

Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.1", GitCommit:"86ec240af8cbd1b60bcc4c03c20da9b98005b92e", GitTreeState:"clean", BuildDate:"2021-12-16T11:41:01Z", GoVersion:"go1.17.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.7+k3s1", GitCommit:"8432d7f239676dfe8f748c0c2a3fabf8cf40a826", GitTreeState:"clean", BuildDate:"2022-02-24T23:03:47Z", GoVersion:"go1.16.10", Compiler:"gc", Platform:"linux/amd64"}

Cloud Provider/Platform (AKS, GKE, Minikube etc.): N/A

Description

Starting from helm v3.8.2 a NBC change has been included, changing the precedence of imported values from library charts via imported-values in Chart.yaml. The following commit introduced that change: 5d017e1.

An illustration for this behavior change can be seen in the following repository https://github.com/albgp22/helm-values-issue but can be stated simply as follows: when we import a value from a given library via imported-values in Chart.yaml file in our application chart, the value gets ignored if it is already present in the values.yaml file.

As this precedence change potentially breaks compatibility of existing charts with newer helm versions, I wonder if it will be reverted in future helm versions. As I see it, imported values from libraries overriding the ones in the application values.yaml file was the expected and logical behavior.

Activity

  1. added
    bug
    on Apr 28, 2022
  2. ratanparai commented on May 8, 2022

    @ratanparai

    We are facing the issue. Is there any update on this bug?

    The current behavior conflict with the documented behavior - https://helm.sh/docs/topics/charts/#importing-child-values-via-dependencies

  3. bacongobbler commented on May 13, 2022

    @bacongobbler
    Member

    @albgp22 any reason why you closed #10940? Did it not address this issue?

  4. albgp22 commented on May 13, 2022

    @albgp22
    Author

    Hi @bacongobbler. It did address this issue, but then I saw that this fix would introduce the bug reported in #9940 again. I will try to come up with a solution as soon as I have time, but in the meantime any help from helm contributors is really appreciated.

  5. arvidOtt commented on May 14, 2022

    @arvidOtt

    We had the same suprise as well regarding the change. Would be great to hear from the maintainers if as you @albgp22 stated: "Imported values from libraries overriding the ones in the application values.yaml file was the expected and logical behavior." In any case this should not be changed in a patch version.

  6. arvidOtt commented on May 16, 2022

    @arvidOtt

    @mattfarina what is your opinion on this?

  7. wernerb commented on May 31, 2022

    @wernerb

    We are actually enjoying that #9940 is finally fixed. When considering a fix, please ensure that this does not return.

  8. Cybermaxke commented on Jul 7, 2022

    @Cybermaxke

    Any updates on this? This change broke the deployment of our charts so we cannot upgrade to the latest helm. As previously mentioned, it would be best to revert the behavior to prevent breakages and then maybe look into introducing a new feature that behaves like #9940.

    A bit more context about my use case, I'm importing values conditionally into the parent chart when a certain feature is enabled, the parent chart (and other subcharts) contain the defaults which can no longer be overridden using imports.

  9. antaloala commented on Sep 15, 2022

    @antaloala

    There are so many cases in which a strange/odd behavior has not been considered a bug as if doing like that the new Helm release would introduce a non-backward compatible change (so breaking those deployment workflows expecting the current behavior) and so, in those cases, it was proposed to solve it as a new feature (e.g. proposing to add some new input param to the helm command in order to get the new desired behavior without breaking compatibility).

    I think not following this approach for #9440 was a mistake and so it would be good to solve it in a coming release, doing as @Cybermaxke comments above (i.e., to get the behavior implemented by #9440 as a new feature to be triggered by some additional input param passed to the helm install/upgrade command and/or additional Chart.yaml field asking for it).

  10. antaloala commented on Oct 6, 2022

    @antaloala

    It looks PR #11162 is waiting for being accepted/merged to "main" for some long time.
    Is there anything preventing it to happen?
    We are not able to upgrade Helm from 3.8.1 to any newer release due to the NBC introduced by 3.8.2 on imported-values behavior; it looks we are not the only ones "suffering" this problem.

    Asking in order to understand if not accepting (yet) that PR #11162 is only because Helm guys allowed to accept it are overloaded ... or is it because they see some "issues/problems" on accepting this PR (?).

    Thanks in advance.

  11. joejulian commented on Oct 12, 2022

    @joejulian
    Contributor

    Responded in the PR.

    PS. I'm not a core maintainer, I just help with issues.

  12. antaloala commented on Oct 18, 2022

    @antaloala

    @bacongobbler , @mattfarina could you comment?
    I think we should revert the non-backward-compatible (NBC) change introduced in Helm behavior from 3.8.2 onwards (because of the merged PR closing #9940) as soon as possible.
    The proposed PR #1162 for that is still providing a solution for the people asking for a different behavior, so when this PR being merged we will

    • get again the previous behavior (so solving the NBC introduced from 3.8.2)
    • giving a solution (based on a new helm input param) for the people asking for a new behavior

    We (and some others) are blocking the upgrade (in our deployment pipelines) to newer Helm versions because of this introduced NBC from 3.8.2

  13. github-actions commented on Jan 17, 2023

    @github-actions

    This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.

  14. Cybermaxke commented on Jan 18, 2023

    @Cybermaxke

    Anything specific that needs to be done to get #11162 in? At this point it's probably already too late to revert back to the old behavior.

  15. 6 remaining items

  16. Cybermaxke commented on Apr 22, 2023

    @Cybermaxke

    Sadly enough, in our case it's not that easy to change to the latest version because of this, and would require some big workarounds.

    I don't think that the new default behavior should be changed at this point, because that would break charts that already depend on this change, but I would like to see the import strategy being added. And that these changes are properly reflected in the documentation, because they are still not up-to-date.

    Some input from the devs about this would be appreciated, because I don't know how to proceed at this point.

  17. mattfarina commented on Jun 22, 2023

    @mattfarina
    Collaborator

    Note, I have been working on this. I just tested my fix against the chart from the initial description and the bug is fixed. Note, there are tests in the coming PR for this case so a change should be caught in the future.

  18. added 4 commits that reference this issue on Jun 22, 2023
    f34ee13
    dd570de
    d0c29d7
    0a5148f
  19. hedayat commented on Jul 2, 2023

    @hedayat

    Hope this fixes soon via either PR. Just wanted to clarify something: there are things which cannot be done at all if the old behavior is changed (Although, those are themselves workarounds for other limitations of Helm), because you'll lose the possibility of overriding some existing values based on a condition/tag.

    Thanks!

  20. roulettedares commented on Jul 8, 2023

    @roulettedares

    Note, I have been working on this. I just tested my fix against the chart from the initial description and the bug is fixed. Note, there are tests in the coming PR for this case so a change should be caught in the future.

    can we combine this with #11162? I would really hate to lose the current behaviour of parent values overriding subchart import-values because it's intuitive, covers a very common use case, and even seems to be intended to function this way by helm contributors in the past

  21. rtarasov commented on Sep 6, 2023

    @rtarasov

    Hi Guys is it really solved? I Observe the same behaviour as stated here in v3.12.3:
    version.BuildInfo{Version:"v3.12.3", GitCommit:"3a31588ad33fe3b89af5a2a54ee1d25bfe6eaa5e", GitTreeState:"clean", GoVersion:"go1.20.7"}

    Yep I can see now that it is for Milestone 3.13.0 ;)

  22. rvilleng commented on Sep 7, 2023

    @rvilleng

    @rtarasov Yes, we have tried it out using helm canary releases and it works :). We are eager to have it in helm 3.13!

    Thanks @mattfarina

  23. rtarasov commented on Sep 7, 2023

    @rtarasov

    @rvilleng Thank you for the info! Do you plan to have 3.13.0 on time i.e. 13.09.2023 or you will postpone? as completeness is 37% for now.

    Thank you in advance!

  24. added a commit that references this issue on Nov 6, 2023
    5356377
  25. Cybermaxke commented on Jan 2, 2024

    @Cybermaxke

    This issue is back, was fixed #12162, but then this issue was returned in 3547a4b to fix #12460

  26. hedayat commented on Jan 2, 2024

    @hedayat

    That's ridiculous! Helm 3.12 (and IIRC helm from 3.9 to 3.12) were the ones that were incompatible with older Helm versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions