Skip to content

Helm 3: Missing values from debug output #6238

Closed

Description

@endzyme

As discussed in Developer Call on 2019-08-15: I think a refactor of how releases are printed may have removed the COMPUTED VALUES: and USER-SUPPLIED VALUES: sections of the output.

Helm 2:

helm/cmd/helm/printer.go

Lines 33 to 35 in f4a5598

USER-SUPPLIED VALUES:
{{.Release.Config.Raw}}
COMPUTED VALUES:
(Is used by template and by install)

Helm 3:
Refactors printing responsibility to pkg/action, which doesn't print values anymore.

Observations:
pkg/action PrintRelease() is only passed a Release struct, which doesn't have the the context of USER-SUPPLIED VALUES: anymore. This is due to the coalesce which merges the Chart values during the install run (see pkg/action/install.go). By the time the Run method of Install struct has run, it loses the original values supplied.

Suggested change:
Adding a Release struct field for UserSuppliedValues or potentially OriginalConfig to match the existing Config naming. This new field would house the original map rendered from values.Options{}.MergeValues().

Open to more suggestions and discussion though!


Issue Template Info

Output of helm version:

version.BuildInfo{Version:"v3.0.0-alpha.2", GitCommit:"97e7461e41455e58d89b4d7d192fed5352001d44", GitTreeState:"clean", GoVersion:"go1.12.7"}

Output of kubectl version:

Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.1", GitCommit:"4485c6f18cee9a5d3c3b4e523bd27972b1b53892", GitTreeState:"clean", BuildDate:"2019-07-18T09:18:22Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}

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

Activity

  1. added
    v3.x
    on Aug 20, 2019
  2. mattfarina commented on Aug 20, 2019

    @mattfarina
    Collaborator

    This should not have been removed. PRs welcome to restore it.

  3. added
    bug
    on Aug 23, 2019
  4. added this to the 3.0.0-beta.4 milestone on Oct 1, 2019
  5. thomastaylor312 commented on Oct 1, 2019

    @thomastaylor312
    Contributor

    I'm going to work on fixing this

  6. thomastaylor312 commented on Oct 1, 2019

    @thomastaylor312
    Contributor

    So looking around at the code, I think the output change was very intentional, but it probably was not discussed very well. The --debug flag as it stands now actually outputs all the logging and isn't tied to outputting other kinds of data. It seems like the debug flag now has a conflated meaning as it has to do more with additional logging/context and not with the final output of a command. So, my question is whether we want another flag to indicate we want this output or if we should just include it by default? For now I am going to make it work with --debug, but wanted to raise this point of conversation

    @endzyme Are the original values something you'd want to actually be stored in the release (like in the backing secret)? I would prefer not to because that would start to balloon out the size of the release object (which already get kind of big), so my thinking was to have it be on the object in memory, but not actually write it out to storage. Would that be an ok solution?

  7. thomastaylor312 commented on Oct 1, 2019

    @thomastaylor312
    Contributor

    @endzyme So I am pretty sure the Config data member of a release contains the final merge of the user supplied values based on my initial experimentation. Am I missing something?

    EDIT: I think I realized why that was happening. I think you opened this issue before we fixed a bug where the value merge with the chart modified the original vars. That has been fixed

  8. added a commit that references this issue on Oct 1, 2019
    70b9e0c
  9. endzyme commented on Oct 2, 2019

    @endzyme
    Author

    Thanks for following up - yes - I believe I opened the issue before it was fixed in dev-v3. Thanks again!

  10. added 2 commits that reference this issue on Oct 3, 2019
    61bc202
    3799d00
  11. thomastaylor312 commented on Oct 7, 2019

    @thomastaylor312
    Contributor

    Closed by #6550

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

    bugv3.x

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions