ansible-collections / community.kubernetes

Kubernetes Collection for Ansible
https://galaxy.ansible.com/community/kubernetes
GNU General Public License v3.0
265 stars 106 forks source link

helm_plugin requires release_namespace #357

Closed ecksun closed 3 years ago

ecksun commented 3 years ago
SUMMARY

release_namespace is required in the helm_plugin task.

ISSUE TYPE
COMPONENT NAME

community.kubernetes.helm_plugin

ANSIBLE VERSION
ansible 2.10.3
  config file = /home/user/code/noomi/devops/ansible/cloud-infrastructure/ansible.cfg
  configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/user/code/noomi/devops/ansible/.venv/lib/python3.7/site-packages/ansible
  executable location = /home/user/code/noomi/devops/ansible/.venv/bin/ansible
  python version = 3.7.3 (default, Jul 25 2020, 13:03:44) [GCC 8.3.0]
CONFIGURATION
INTERPRETER_PYTHON(/home/user/code/noomi/devops/ansible/cloud-infrastructure/ansible.cfg) = ../.venv/bin/python3
OS / ENVIRONMENT
STEPS TO REPRODUCE
- name: Install local Helm plugin for Google Cloud Storage repository support
  community.kubernetes.helm_plugin:
    plugin_path: https://github.com/hayorov/helm-gcs
    state: present

Looking at the souce this seems to affect even master.

I'm assuming that in many cases it make sense to have the argument required (perhaps it was more relevant with helm2?), but I don't think it does in this case.

EXPECTED RESULTS

The task should run without having to specify namespace, as the plugin is only local and doesn't deal with any namespaces.

ACTUAL RESULTS
TASK [therole : Install local Helm plugin for Google Cloud Storage repository support] ********************************************************************************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "missing required arguments: release_namespace"}
Akasurde commented 3 years ago

@ecksun Thanks for reporting this. Do you think we should make this as an optional parameter?

ecksun commented 3 years ago

@ecksun Thanks for reporting this. Do you think we should make this as an optional parameter?

probably?

I'm not super familiar with helm and helm plugins so there might be something I haven't understood correctly or that I have missed. But consider my current task:

- name: Install local Helm plugin for Google Cloud Storage repository support
  community.kubernetes.helm_plugin:
    plugin_path: https://github.com/hayorov/helm-gcs
    release_namespace: NOT_REALLY_REQUIRED
    state: present
Akasurde commented 3 years ago

resolved_by_pr #358