Make unused release_namespace parameter as optional (#358)

This commit is contained in:
Abhijeet Kasurde
2021-02-03 13:45:25 +05:30
committed by GitHub
parent 5a5ed79b89
commit 86c5c446dd
4 changed files with 7 additions and 11 deletions

View File

@@ -0,0 +1,3 @@
bugfixes:
- helm_plugin - make unused ``release_namespace`` parameter as optional (https://github.com/ansible-collections/community.kubernetes/issues/357).
- helm_plugin_info - make unused ``release_namespace`` parameter as optional (https://github.com/ansible-collections/community.kubernetes/issues/357).

View File

@@ -2,7 +2,6 @@
- name: Install env plugin in check mode
helm_plugin:
binary_path: "{{ helm_binary }}"
namespace: "{{ helm_namespace }}"
state: present
plugin_path: https://github.com/adamreese/helm-env
register: check_install_env
@@ -15,7 +14,6 @@
- name: Install env plugin
helm_plugin:
binary_path: "{{ helm_binary }}"
namespace: "{{ helm_namespace }}"
state: present
plugin_path: https://github.com/adamreese/helm-env
register: install_env
@@ -27,7 +25,6 @@
- name: Gather info about all plugin
helm_plugin_info:
binary_path: "{{ helm_binary }}"
namespace: "{{ helm_namespace }}"
register: plugin_info
- assert:
@@ -37,7 +34,6 @@
- name: Install env plugin again
helm_plugin:
binary_path: "{{ helm_binary }}"
namespace: "{{ helm_namespace }}"
state: present
plugin_path: https://github.com/adamreese/helm-env
register: install_env
@@ -49,7 +45,6 @@
- name: Uninstall env plugin in check mode
helm_plugin:
binary_path: "{{ helm_binary }}"
namespace: "{{ helm_namespace }}"
state: absent
plugin_name: env
register: check_uninstall_env
@@ -62,7 +57,6 @@
- name: Uninstall env plugin
helm_plugin:
binary_path: "{{ helm_binary }}"
namespace: "{{ helm_namespace }}"
state: absent
plugin_name: env
register: uninstall_env
@@ -74,7 +68,6 @@
- name: Uninstall env plugin again
helm_plugin:
binary_path: "{{ helm_binary }}"
namespace: "{{ helm_namespace }}"
state: absent
plugin_name: env
register: uninstall_env

View File

@@ -19,10 +19,10 @@ requirements:
description:
- Manages Helm plugins.
options:
# TODO: (akasurde) Remove this in version 2.0
release_namespace:
description:
- Kubernetes namespace where the helm plugin should be installed.
required: true
type: str
aliases: [ namespace ]
@@ -103,7 +103,7 @@ def main():
module = AnsibleModule(
argument_spec=dict(
binary_path=dict(type='path'),
release_namespace=dict(type='str', required=True, aliases=['namespace']),
release_namespace=dict(type='str', aliases=['namespace']),
state=dict(type='str', default='present', choices=['present', 'absent']),
plugin_path=dict(type='str',),
plugin_name=dict(type='str',),

View File

@@ -19,10 +19,10 @@ requirements:
description:
- Gather information about Helm plugins installed in namespace.
options:
# TODO: (akasurde) Remove this in version 2.0
release_namespace:
description:
- Kubernetes namespace where the helm plugins are installed.
required: true
type: str
aliases: [ namespace ]
@@ -84,7 +84,7 @@ def main():
module = AnsibleModule(
argument_spec=dict(
binary_path=dict(type='path'),
release_namespace=dict(type='str', required=True, aliases=['namespace']),
release_namespace=dict(type='str', aliases=['namespace']),
plugin_name=dict(type='str',),
# Helm options
context=dict(type='str', aliases=['kube_context'], fallback=(env_fallback, ['K8S_AUTH_CONTEXT'])),