Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for helm values in Ansible module #29984

Open
rarkins opened this issue Jul 2, 2024 Discussed in #29672 · 1 comment
Open

Support for helm values in Ansible module #29984

rarkins opened this issue Jul 2, 2024 Discussed in #29672 · 1 comment
Labels
manager:ansible-galaxy Ansible Galaxy manager priority-4-low Low priority, unlikely to be done unless it becomes important to more people type:feature Feature (new functionality)

Comments

@rarkins
Copy link
Collaborator

rarkins commented Jul 2, 2024

Discussed in #29672

Originally posted by mueller-ma June 14, 2024

Tell us more.

Helm, a Kubernetes package manager, can be executed by Ansible. Here's an example of the action kubernetes.core.helm:

---
- name: Install trivy-operator
  kubernetes.core.helm:
    name: trivy-operator
    namespace: trivy-system
    chart_repo_url: https://aquasecurity.github.io/helm-charts/
    chart_ref: trivy-operator
    chart_version: 0.23.0  # There's a newer version: 0.23.3
    values:
      trivy:
        image:
          registry: ghcr.io
          repository: aquasecurity/trivy
          tag: 0.52.0  # There's a newer version: 0.53.0

# Ansible tasks can be grouped via `block`
- name: Ansible block with a helm task
  block:
    - name: Install trivy-operator
      kubernetes.core.helm:
        name: trivy-operator
        namespace: trivy-system
        chart_repo_url: https://aquasecurity.github.io/helm-charts/
        chart_ref: trivy-operator
        chart_version: 0.23.0
        release_values:  # "release_values" is an alias for "values"
          trivy:
            image:
              registry: ghcr.io
              repository: aquasecurity/trivy
              tag: 0.52.0

https://github.com/mueller-ma/renovate-reproduce/blob/main/ansible-helm/tasks.yml

Two things could be updated via Renovate here:

  1. chart_version is the version of the chart. When using a customManager similar to the customManagers:dockerfileVersions, the following arguments can be used to update this version: datasource=helm depName=trivy-operator registryUrl=https://aquasecurity.github.io/helm-charts/
  2. The value of the keys values and release_values is like the content of a values.yaml file, which is supported by Renovate: https://docs.renovatebot.com/modules/manager/helm-values/

While I'm not aware of any default file name or file paths for Ansible yaml files, some common paths are:

  • playbooks/*
  • role/*/tasks/
@rarkins rarkins added type:feature Feature (new functionality) priority-4-low Low priority, unlikely to be done unless it becomes important to more people manager:ansible-galaxy Ansible Galaxy manager labels Jul 2, 2024
@rarkins
Copy link
Collaborator Author

rarkins commented Jul 2, 2024

Reproduction forked to https://github.com/renovate-reproductions/29984

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
manager:ansible-galaxy Ansible Galaxy manager priority-4-low Low priority, unlikely to be done unless it becomes important to more people type:feature Feature (new functionality)
Projects
None yet
Development

No branches or pull requests

1 participant