cybozu-go/accurate

Set labels/annotations of sub-namespaces

ymmt2005 opened this issue · 1 comments

What

Currently, Accurate does not allow tenant users to set new labels/annotations to sub-namespaces created from SubNamespace objects.

It is handy to allow tenant users to set new labels/annotations only when:

  1. the label/annotation key is included in the configuration file, and
  2. the label/annotation is not set for the parent namespace.

How

  1. Add new fields to SubNamespace, for example, spec.labels and spec.annotations
  2. Enhance accurate-controller to create a sub-namespace with the specified labels/annotations.

accurate-controller has to ignore labels/annotations whose key is not listed in the configuration file.

It also should not set labels/annotations if the same labels/annotations are set for the parent namespace.
Nevertheless, the value would be overwritten by the existing Namespace controller to the value of the parent labels/annotations.

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

implemented in #19.