kudobuilder / kudo

Kubernetes Universal Declarative Operator (KUDO)
https://kudo.dev
Apache License 2.0
1.18k stars 103 forks source link

Change the KUDO namespace Overwrite semantic. #1503

Open Gilbert88 opened 4 years ago

Gilbert88 commented 4 years ago

What would you like to be added: Currently, KUDO always overwrites resources' namespace consistently, using either the namespace from --namespace or the default namespace if not specified. We want this to be changed.

The expected semantic is as following:

  1. KUDO never overwrites any resource's namespace. If not specified, use the operator's namespace.
  2. KUDO operator builders are recommended to always define the namespace for each of their resources as {{ .Namespace }}.
  3. If any resource has its namespace hardcoded, e.g., namespace: gilbert, KUDO should respect it. Return an error if any namespace not existed.

Why is this needed:

NOTE: This request will not be backward compatible, but I believe this is a good move for the future. We can introduce a configuration flag for the deprecation cycle.

kensipe commented 4 years ago

@Gilbert88 based on todays meeting... we do NOT anticipate supporting this request. To support honoring namespaces defined in manifests in the KUDO operator is to support multiple namespaces which after significant discussion we are not able to do until we support cluster-wide resource management.
Put another way... we would like to support this request, but there is a lot of infrastructure to support before we can.

We can discuss more on thurs in our working meeting... (or anytime individually)