Skip to content

v0.3.55

Choose a tag to compare

@ERP4SME-DevOps-GitHub-Workflow-User ERP4SME-DevOps-GitHub-Workflow-User released this 09 Dec 15:38
88c5286

This release adds a new interface PolicyConfiguration that component types (or their spec types) can implement:

type PolicyConfiguration interface {
  // Get adoption policy.
  // Must return a valid AdoptionPolicy, or the empty string (then the reconciler/framework default applies).
  GetAdoptionPolicy() reconciler.AdoptionPolicy
  // Get update policy.
  // Must return a valid UpdatePolicy, or the empty string (then the reconciler/framework default applies).
  GetUpdatePolicy() reconciler.UpdatePolicy
  // Get delete policy.
  // Must return a valid DeletePolicy, or the empty string (then the reconciler/framework default applies).
  GetDeletePolicy() reconciler.DeletePolicy
}

Through this interface, components can override the framework default policies that would otherwise apply. Of course, dependent resources can still override the behaviour using the well-known annotations. For easier consumption (similar to the already existing Configuration interfaces), there is a standard implementation PolicySpec that components may embed into their spec).

Furthermore, the semantics of the deletion policy was slightly changed:

  1. Other than before, the deletion policy is now ignored during apply. That is, if an existing object becomes obsolete while applying a new revision of the depdendents' manifests, it will be always deleted now, even if it has an effective deletion policy 'orphan'. In other words, the deletion policy will only be honoured if the owning component itself is deleted.
  2. So far, a component's deletion will block if it contains extension types, and there exist any foreign instances of these types in the cluster; this check will now be skipped if all dependents of the component have an effective deletion policy 'orphan'.