mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-03-27 05:43:02 +00:00
Added possibility to get all values by helm_info module (#531)
Added possibility to get all values by helm_info module SUMMARY Parameter get_all_values has been added, which is passed to function get_values. Default is False. Parameter is not required. ISSUE TYPE Feature Pull Request COMPONENT NAME helm_info ADDITIONAL INFORMATION Unfortunately, helm_info module lacks functionality of getting all the values of a helm release, including the default ones. This restricts upgrade and config migration capabilities. Parameter get_all_values has been added. This parameter, if set, adds -a parameter to helm get values call. The parameter is not required and defaults to False, so backwards compability is complied. Reviewed-by: Mike Graves <mgraves@redhat.com> Reviewed-by: Bikouo Aubin <None>
This commit is contained in:
@@ -77,7 +77,7 @@ def run_helm(module, command, fails_on_error=True):
|
||||
return rc, out, err
|
||||
|
||||
|
||||
def get_values(module, command, release_name):
|
||||
def get_values(module, command, release_name, get_all=False):
|
||||
"""
|
||||
Get Values from deployed release
|
||||
"""
|
||||
@@ -86,6 +86,9 @@ def get_values(module, command, release_name):
|
||||
|
||||
get_command = command + " get values --output=yaml " + release_name
|
||||
|
||||
if get_all:
|
||||
get_command += " -a"
|
||||
|
||||
rc, out, err = run_helm(module, get_command)
|
||||
# Helm 3 return "null" string when no values are set
|
||||
if out.rstrip("\n") == "null":
|
||||
|
||||
Reference in New Issue
Block a user