Skip to content

How should the Helm operator handle existing Helm installations? #144

Open
@SimonBaeumer

Description

@SimonBaeumer

If a Helm operator is installed into a namespace with an already existing Helm release how should the operator handle this situation.

A) automatically reconcile and try to match the CR's state
B) failing because the operator tries to reconcile a resource which is not owned by the operator (in this case the Helm release secret)

Suggestion

  • By default fail on releases which were not owned by the operator, thus preventing users accidentally messing up current installations
  • Add an option to opt-in to let the operator reconcile an existing Helm installation.

Opt-in options

  1. Label on the latest Helm release secret operators.operatorframework.io.helm-operator-plugins.adopt-release: true

    • Explicitly mark a release to be adopted by the operator. This only has an effect if the secret is not operator owned.
      o Manually created Helm releases disable the reconciler for that resource (positive or negative depending on the use-case)
    • Looking up the latest Helm secret in the reconciliation
  2. CR field on the helm-operator CR (i.e. adoptExistingRelease)

    • Explicitly and obvious option on the CR
    • No need to lookup the Helm release ownership nor labels
    • A CR field for a special case which imho does not reflect cluster state
    • Needs to be manually implemented in a hybrid setting
  3. Annotation on the helm-operator CR

  • No need to lookup the Helm release ownership nor labels
    - Shares the same negatives as the CR field but even more a special case on the CR

Considering
A) adopting an existing Helm release is a task done once at setup
B) running Helm upgrades manually in operator managed environments is bad practice

I prefer option 1. With that users of the library don't need to implemented the feature by themselves and can offer smooth transitions to operator managed charts.

See discussion: #116 (comment)
cc: @joelanford

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/backlogHigher priority than priority/awaiting-more-evidence.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions