mirror of
https://github.com/ansible-collections/kubernetes.core.git
synced 2026-07-28 18:34:42 +00:00
Make unused release_namespace parameter as optional (#358)
This commit is contained in:
3
changelogs/fragments/357_helm_plugin.yml
Normal file
3
changelogs/fragments/357_helm_plugin.yml
Normal 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).
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
- name: Install env plugin in check mode
|
- name: Install env plugin in check mode
|
||||||
helm_plugin:
|
helm_plugin:
|
||||||
binary_path: "{{ helm_binary }}"
|
binary_path: "{{ helm_binary }}"
|
||||||
namespace: "{{ helm_namespace }}"
|
|
||||||
state: present
|
state: present
|
||||||
plugin_path: https://github.com/adamreese/helm-env
|
plugin_path: https://github.com/adamreese/helm-env
|
||||||
register: check_install_env
|
register: check_install_env
|
||||||
@@ -15,7 +14,6 @@
|
|||||||
- name: Install env plugin
|
- name: Install env plugin
|
||||||
helm_plugin:
|
helm_plugin:
|
||||||
binary_path: "{{ helm_binary }}"
|
binary_path: "{{ helm_binary }}"
|
||||||
namespace: "{{ helm_namespace }}"
|
|
||||||
state: present
|
state: present
|
||||||
plugin_path: https://github.com/adamreese/helm-env
|
plugin_path: https://github.com/adamreese/helm-env
|
||||||
register: install_env
|
register: install_env
|
||||||
@@ -27,7 +25,6 @@
|
|||||||
- name: Gather info about all plugin
|
- name: Gather info about all plugin
|
||||||
helm_plugin_info:
|
helm_plugin_info:
|
||||||
binary_path: "{{ helm_binary }}"
|
binary_path: "{{ helm_binary }}"
|
||||||
namespace: "{{ helm_namespace }}"
|
|
||||||
register: plugin_info
|
register: plugin_info
|
||||||
|
|
||||||
- assert:
|
- assert:
|
||||||
@@ -37,7 +34,6 @@
|
|||||||
- name: Install env plugin again
|
- name: Install env plugin again
|
||||||
helm_plugin:
|
helm_plugin:
|
||||||
binary_path: "{{ helm_binary }}"
|
binary_path: "{{ helm_binary }}"
|
||||||
namespace: "{{ helm_namespace }}"
|
|
||||||
state: present
|
state: present
|
||||||
plugin_path: https://github.com/adamreese/helm-env
|
plugin_path: https://github.com/adamreese/helm-env
|
||||||
register: install_env
|
register: install_env
|
||||||
@@ -49,7 +45,6 @@
|
|||||||
- name: Uninstall env plugin in check mode
|
- name: Uninstall env plugin in check mode
|
||||||
helm_plugin:
|
helm_plugin:
|
||||||
binary_path: "{{ helm_binary }}"
|
binary_path: "{{ helm_binary }}"
|
||||||
namespace: "{{ helm_namespace }}"
|
|
||||||
state: absent
|
state: absent
|
||||||
plugin_name: env
|
plugin_name: env
|
||||||
register: check_uninstall_env
|
register: check_uninstall_env
|
||||||
@@ -62,7 +57,6 @@
|
|||||||
- name: Uninstall env plugin
|
- name: Uninstall env plugin
|
||||||
helm_plugin:
|
helm_plugin:
|
||||||
binary_path: "{{ helm_binary }}"
|
binary_path: "{{ helm_binary }}"
|
||||||
namespace: "{{ helm_namespace }}"
|
|
||||||
state: absent
|
state: absent
|
||||||
plugin_name: env
|
plugin_name: env
|
||||||
register: uninstall_env
|
register: uninstall_env
|
||||||
@@ -74,7 +68,6 @@
|
|||||||
- name: Uninstall env plugin again
|
- name: Uninstall env plugin again
|
||||||
helm_plugin:
|
helm_plugin:
|
||||||
binary_path: "{{ helm_binary }}"
|
binary_path: "{{ helm_binary }}"
|
||||||
namespace: "{{ helm_namespace }}"
|
|
||||||
state: absent
|
state: absent
|
||||||
plugin_name: env
|
plugin_name: env
|
||||||
register: uninstall_env
|
register: uninstall_env
|
||||||
|
|||||||
@@ -19,10 +19,10 @@ requirements:
|
|||||||
description:
|
description:
|
||||||
- Manages Helm plugins.
|
- Manages Helm plugins.
|
||||||
options:
|
options:
|
||||||
|
# TODO: (akasurde) Remove this in version 2.0
|
||||||
release_namespace:
|
release_namespace:
|
||||||
description:
|
description:
|
||||||
- Kubernetes namespace where the helm plugin should be installed.
|
- Kubernetes namespace where the helm plugin should be installed.
|
||||||
required: true
|
|
||||||
type: str
|
type: str
|
||||||
aliases: [ namespace ]
|
aliases: [ namespace ]
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ def main():
|
|||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
argument_spec=dict(
|
argument_spec=dict(
|
||||||
binary_path=dict(type='path'),
|
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']),
|
state=dict(type='str', default='present', choices=['present', 'absent']),
|
||||||
plugin_path=dict(type='str',),
|
plugin_path=dict(type='str',),
|
||||||
plugin_name=dict(type='str',),
|
plugin_name=dict(type='str',),
|
||||||
|
|||||||
@@ -19,10 +19,10 @@ requirements:
|
|||||||
description:
|
description:
|
||||||
- Gather information about Helm plugins installed in namespace.
|
- Gather information about Helm plugins installed in namespace.
|
||||||
options:
|
options:
|
||||||
|
# TODO: (akasurde) Remove this in version 2.0
|
||||||
release_namespace:
|
release_namespace:
|
||||||
description:
|
description:
|
||||||
- Kubernetes namespace where the helm plugins are installed.
|
- Kubernetes namespace where the helm plugins are installed.
|
||||||
required: true
|
|
||||||
type: str
|
type: str
|
||||||
aliases: [ namespace ]
|
aliases: [ namespace ]
|
||||||
|
|
||||||
@@ -84,7 +84,7 @@ def main():
|
|||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
argument_spec=dict(
|
argument_spec=dict(
|
||||||
binary_path=dict(type='path'),
|
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',),
|
plugin_name=dict(type='str',),
|
||||||
# Helm options
|
# Helm options
|
||||||
context=dict(type='str', aliases=['kube_context'], fallback=(env_fallback, ['K8S_AUTH_CONTEXT'])),
|
context=dict(type='str', aliases=['kube_context'], fallback=(env_fallback, ['K8S_AUTH_CONTEXT'])),
|
||||||
|
|||||||
Reference in New Issue
Block a user