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

community.kubernetes.helm support values in template j2 file #338

Closed PengBAI closed 3 years ago

PengBAI commented 3 years ago
SUMMARY

add new parameter like values_template to support j2 template file. Or update the existing parameter values_files to support j2 file

  - name: "Install or update gitlab-runner chart if existing"
    community.kubernetes.helm:
      name: "chart-{{ item.offer_name }}"
      chart_ref: "{{ helm_repo_name }}/{{ chart_name }}"
      chart_version: "{{ chart_version }}"
      release_namespace: "{{ namespace_name }}"
      values_template :
        - "my-values.yml.j2"
ISSUE TYPE
goneri commented 3 years ago

Hi @PengBAI,

If I understand properly, this change is actually not required. You can already use the template module to prepare a "values file" and in a second step, pass the result file to helm through its values_files key.

If you think we misunderstood something, feel free to reopen the issue.