var resourceObj = &unstructured.Unstructured{
Object: map[string]interface{}{
"apiVersion": "v1",
"kind": "Namespace",
"metadata": map[string]interface{}{
//+docs: Defines the namespace in which all resources of this
// component belong
"name": collection.Spec.Test.Namespace, // controlled by collection field: test.namespace
"labels": map[string]interface{}{
"workload-collection": collection.Spec.CollectionLabel, // controlled by collection field: collectionLabel
},
},
},
}
Notice the metadata.labels.workload-collection field is managed. When changing that, one would expect a reconciliation event to occur because that field is managed by the collection. However, this is not the case and editing the field directly on a child resource of a component does not queue reconciliation.
Consider the following:
Which has a child resource of Namespace:
Which has the code of the following:
Notice the
metadata.labels.workload-collection
field is managed. When changing that, one would expect a reconciliation event to occur because that field is managed by the collection. However, this is not the case and editing the field directly on a child resource of a component does not queue reconciliation.