@@ -101,6 +101,17 @@ type PolicyConfiguration interface {
101101 GetMissingNamespacesPolicy () reconciler.MissingNamespacesPolicy
102102}
103103
104+ // The TypeConfiguration interface is meant to be implemented by compoments (or their spec) which allow
105+ // to specify additional managed types.
106+ type TypeConfiguration interface {
107+ // Get additional managed types; instances of these types are handled differently during
108+ // apply and delete; foreign instances of these types will block deletion of the component.
109+ // The fields of the returned TypeInfo structs can be concrete api groups, kinds,
110+ // or wildcards ("*"); in addition, groups can be specified as a pattern of the form "*.<suffix>"",
111+ // where the wildcard matches one or multiple dns labels.
112+ GetAdditionalManagedTypes () []reconciler.TypeInfo
113+ }
114+
104115// +kubebuilder:object:generate=true
105116
106117// Legacy placement spec. Components may include this into their spec.
@@ -201,6 +212,16 @@ var _ PolicyConfiguration = &PolicySpec{}
201212
202213// +kubebuilder:object:generate=true
203214
215+ // TypeSpec allows to specify additional managed types, which are not explicitly part of the component's manifests.
216+ // Components providing TypeConfiguration may include this into their spec.
217+ type TypeSpec struct {
218+ AdditionalManagedTypes []reconciler.TypeInfo `json:"additionalManagedTypes,omitempty"`
219+ }
220+
221+ var _ TypeConfiguration = & TypeSpec {}
222+
223+ // +kubebuilder:object:generate=true
224+
204225// Component Status. Components must include this into their status.
205226type Status struct {
206227 ObservedGeneration int64 `json:"observedGeneration"`
0 commit comments