cybozu-go / accurate

Kubernetes controller for multi-tenancy. It propagates resources between namespaces accurately and allows tenant users to create/delete sub-namespaces.
https://cybozu-go.github.io/accurate/
Apache License 2.0
34 stars 5 forks source link

Precedence between NS labels/annotations propagation should be documented #94

Open erikgb opened 9 months ago

erikgb commented 9 months ago

What

We are performing a POC of Accurate, and one of our goals is to allow end-users to set selected NS labels/annotations. This seems to work very well, but I could not find the precedence between labelKeys/subNamespaceLabelKeys and annotationKeys/subNamespaceAnnotationKeys documented anywhere. Looking at the code this looks as expected and I have also verified this in our cluster:

https://github.com/cybozu-go/accurate/blob/1cc371dd8d5c1951aa9131c1b382841628a474c9/controllers/namespace_controller.go#L89-L125

But I still think the precedence should be clearly documented (and tested) as a commitment to the current behavior.

How

Checklist