Skip to content

kubernetes.core.helm: support to only install (not upgrade) chart #871

Open
@rptaylor

Description

@rptaylor
SUMMARY

It should be possible to only install a Helm chart if it is not present, and avoid upgrading (or downgrading) it.
A typical use case for this is to do an initial install of some applications with Ansible, but then subsequent management and updates of the apps may be taken over via a gitops-based mechanism such as ArgoCD. In particular, ArgoCD itself needs to be initially installed via Helm, but thereafter it can upgrade itself independently. At that point re-running the Ansible Helm task can interfere with the state of the apps as managed by ArgoCD. To avoid that it would be useful to only install a release if it is missing, for initial bootstrapping.

This proposed functionality matches what state: present would be generally interpreted to mean (as opposed to e.g. state: upgraded).

The current behaviour of release_state: present might be more accurately described as changed or upgraded.

But anyway to keep compatibility with the way things are, a new parameter like change_if_present could be added, with default value true that keeps the current behaviour. If false, a release would only be installed if it is missing. If the release is already present, it would not be upgraded or downgraded, and a change in values would not be applied.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

kubernetes.core.helm

ADDITIONAL INFORMATION

This is similar to e.g. https://docs.ansible.com/ansible/latest/collections/ansible/builtin/dnf_module.html#parameter-state

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic/helmIssues relating to helm pluginstype/enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions