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
38 stars 5 forks source link

feat: add DisablePropagateGenerated feature gate #92

Closed erikgb closed 10 months ago

erikgb commented 10 months ago

This adds a temporary/experimental feature gate that allows a user to disable the Annotating a resource to propagate resources created from it feature. As the Accurate controller works at present, we need a way to prevent Accurate from touching resources in namespaces that are not and never will be, managed by Accurate.

The idea is to deprecate and eventually remove this new feature gate when the root cause is fixed.

Relates to https://github.com/cybozu-go/accurate/issues/87 (workaround)

$ bin/accurate-controller --help
accurate controller

Usage:
  accurate-controller [flags]

Flags:
      --add_dir_header                    If true, adds the file directory to the header of the log messages
      --alsologtostderr                   log to standard error as well as files (no effect when -logtostderr=true)
      --apiserver-qps-throttle int        The maximum QPS to the API server. (default 50)
      --cert-dir string                   webhook certificate directory
      --config-file string                Configuration file path (default "/etc/accurate/config.yaml")
      --feature-gates mapStringBool       A set of key=value pairs that describe feature gates for alpha/experimental features. Options are:
                                          AllAlpha=true|false (ALPHA - default=false)
                                          AllBeta=true|false (BETA - default=false)
                                          DisablePropagateGenerated=true|false (ALPHA - default=false)