Exclude particular labels/annotations from propagation
ymmt2005 opened this issue · comments
What
Accurate can propagate any namespace resource between namespaces.
While copying the resource, all labels and annotations except for ones that contain kubernetes.io/
are inherited.
accurate/controllers/propagate.go
Lines 24 to 55 in ae00997
In some cases, the copied labels or annotations can cause problems.
For instance, if Argo CD is configured to track the managed resources by argocd.argoproj.io/instance
label and the parent resource was created by Argo CD, the propagated resource would have the same label. Argo CD then tries to delete the propagated resource because the propagated resource is not found on the source Git repository.
So, add a feature to exclude particular labels or annotations from propagated resources.
How
Describe how to address the issue.
Checklist
- Finish implementation of the issue
- Test all functions
- Have enough logs to trace activities
- Notify developers of necessary actions
@ymmt2005 Do you have any thoughts about the UX of this feature? Should it be configured:
- globally on the controller level, excluding labels/annotations for all propagated resources
- under watches in the controller configuration, excluding labels/annotations per resource type of propagated resources
- new label/annotation allowing this to be configured per resource instance of propagated resources
@erikgb Sorry, I didn't notice your question.
I agree with option 1.