v0.3.0
Incompatible changes
This release finalizes various announced deprecations:
- remove deprecated parameters from
component.NewReconciler() - remove deprecated parameters from
manifests.NewHelmGenerator()and affiliated functions - remove deprecated parameters from the
operator.Operatorinterface.
In addition, component.Reconciler() has a new parameter option that allows to tune the reconciler behavior (e.g. auto-creation of namespaces, adoption of existing resources, ...):
type ReconcilerOptions struct {
// Whether namespaces are auto-created if missing.
// If unspecified, true is assumed.
CreateMissingNamespaces *bool
// How to react if a dependent object exists but has no or a different owner.
// If unspecified, AdoptionPolicyAdoptUnowned is assumed.
AdoptionPolicy *AdoptionPolicy
// Schemebuilder allows to define additional schemes to be made available in the
// target client.
SchemeBuilder types.SchemeBuilder
}Enhancements
- It is now possible (through reconciler options, see above) to tune whether or not missing namespaces will be automatically created; previously, they were always auto-created, which is the default behavior now.
- It is now possible (through reconciler options, see above) to tune the reconciler behavior in case dependent objects already exist in the deployment target; previously, existing dependents were adopted if they had no owner-id label, and an error was raised if they had a different owner; this behavior is still the default, but it is now possible to optionally adopt all objects (even those with a foreign owner), or to always fail in case an object is already present.
- Similar to generators, hooks can now retrieve a client for the deployment target from their context, by calling
utils.ClientFromContext(). To be precise, this holds true for reconcile and delete hooks, but not for the post-read hook. - Generators can now retrieve a digest of the triggering component from their context, by calling
utils.ComponentDigestFromContext(); note that this digest honors loaded references (i.e. occurrences of theConfigMapReference,ConfigMapKeyReference,SecretReference,SecretKeyReferencetypes).