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

Clarify release_values and how it differs from set_values #766

Open
ketozhang opened this issue Jul 24, 2024 · 5 comments
Open

Clarify release_values and how it differs from set_values #766

ketozhang opened this issue Jul 24, 2024 · 5 comments
Labels
type/documentation Improvements or additions to documentation

Comments

@ketozhang
Copy link

SUMMARY

There's very minimal documentation on release_values...
image

...from experience, this looks like it overlaps with set_values, but it just takes different data types: former uses dict and latter uses list[dict]. Did I understand this correctly? Either way, further clarification in the docs would be helpful and I can contribute.

ISSUE TYPE
  • Documentation Report
COMPONENT NAME
ANSIBLE VERSION
ansible [core 2.17.1]
@ketozhang
Copy link
Author

ketozhang commented Jul 24, 2024

Another thing to clarify is order of precedence. In Helm there isn't an equivalent feature of this release_values, but there is of set_values (--set) and values_files (--files). The order of precedence goes default chart value, values files, then set.

Where does release_values go? Is it just another value file but embedded into the playbook?

@gravesm
Copy link
Member

gravesm commented Oct 31, 2024

Thanks for filing an issue @ketozhang. The release_values options corresponds to the -f/--values option in helm. The passed in dictionary gets written to a temp file and added to the resulting helm command. If you would like to add clarification to the documentation, that would be great.

@gravesm gravesm added the type/documentation Improvements or additions to documentation label Oct 31, 2024
@ketozhang
Copy link
Author

@gravesm Thanks for the clarification. I also made the mistake, the flag for values_files is also -f/--values. That doesn't clarify what the order of precedence is and according to Helm help pages:

You can specify the '--values'/'-f' flag multiple times. The priority will be given to the
last (right-most) file specified. For example, if both myvalues.yaml and override.yaml
contained a key called 'Test', the value set in override.yaml would take precedence:

    $ helm install -f myvalues.yaml -f override.yaml  myredis ./redis

do you know which one comes first in this Ansible module?

@gravesm
Copy link
Member

gravesm commented Oct 31, 2024

values_files comes before release_values. This part, at least, does show up in the docs: https://docs.ansible.com/ansible/latest/collections/kubernetes/core/helm_module.html#parameter-values_files. I think adding a similar statement to the release_values parameter would help clarify how these two work when used together.

@ketozhang
Copy link
Author

Thanks, let me update the docs and get back with a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants