Prevent modification of immutable values

Multiple values are immutable in sylva (like for example cluster.name), we should ensure that they can't be modified.

We could introduce a new key to define which values are immutable, like for example:

immutable_values:
  cluster:
    name: 
      _immutable: true    # <<< means that cluster name can't be changed
    # Following key would prevent any change in the whole cluster dict in non-ha mode (as we don't support rolling updates in that case)
    _immutable: '{{ tuple . .Values._internal.ha_cluster.mode | include "interpret-as-string" | eq "non-ha" }}'

And use a template that would lookup previous values in sylva-units secrets, and fail if they are not deepEqual in the current set of (interpreted) values.

Assignee Loading
Time tracking Loading