-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support operator native namespace creation. #1493
Comments
@Gilbert88 I'm trying to understand this request better...
|
Here is a sample config that I tried in my operator:
apiVersion: v1
kind: Namespace
metadata:
name: istio-operator
labels:
istio-operator-managed: Reconcile
istio-injection: disabled
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: {{.Params.operatorNamespace}}
name: istio-operator
spec:
replicas: 1
...
apiVersion: kudo.dev/v1beta1
parameters:
- name: operatorNamespace
default: "istio-operator"
description: "Namespace in which istio-operator is deployed"
displayName: "Namespace for the istio-operator"
apiVersion: kudo.dev/v1beta1
appVersion: 1.5.1
kubernetesVersion: 1.16.0
kudoVersion: 0.10.1
name: "istio-operator"
operatorVersion: 0.1.0
url: https://istio.io/
tasks:
- kind: Apply
name: crds
spec:
resources:
- crd.yaml
- kind: Apply
name: service-account
spec:
resources:
- service_account.yaml
- kind: Apply
name: namespace
spec:
resources:
- namespace.yaml
- kind: Apply
name: deployment
spec:
resources:
- deployment.yaml
- service.yaml
plans:
deploy:
phases:
- name: preconditions
steps:
- name: crds
tasks:
- crds
- name: service-account
tasks:
- service-account
strategy: serial
- name: deploy
steps:
- name: namespace
tasks:
- namespace
- name: deployment
tasks:
- deployment
strategy: serial
strategy: serial I didn't use |
We had a good zoom meeting... in it we reduced the scope of this Issue to KUDO creating 1 namespace (not multi-namespaces).
Some additional background:
Proposal: KUDO forces namespace management to be a preconditionFor this proposal to work... all namespace creation is managed outside kudo. D2iQ would need to find or build automation for kubeaddons etc. This REQUIRES that kudo honor namespaces defined in manifests.. they can NOT go to "default" if there is a namespace defined.
KUDO Creates NamespacesFor this it is proposed that we have by configuration or convention a namespace definition.
where followed by the manifest:
The following rules would apply:
|
This looks interesting. I certainly see the need for some feature in this direction. Some thoughts:
In general, this looks like a good proposal. Just throwing it out there, maybe this was discussed already - Having KUDO operators that can be cluster wide: Similar to I assume this idea would have a couple of downsides as well - not the least that we'd need a duplicated set of CRDs for the namespace-less resources. |
@kensipe I like the proposal. One question: Will the namespace be removed on uninstall? |
I like the proposal. More thoughts:
|
Thanks for the proposal, @kensipe ! LGTM in general. A couple of tweaks that I would like to suggest inline. I read through the Helm v3 issue helm/helm#6794, and I think they made a good move from Helm v2 -> v3. Namespace, as an admin/user-defined resources boundary, should not be created IMPLICITLY if not pre-existed. However, it is a different story in our case - we want an optional for admin/user to tell KUDO EXPLICITLY that a namespace needs to be created before installation, if specified. Also, this aligns with the followup Helm v3 fix, which gives it a namespace creation configurable option to users.
Let's remove this one. We should avoid creating any namespace implicitly. If any user expects a namespace to be created by KUDO, they MUST provide the Also, any implicitly-created namespace may not meet what users need. For example, a namespace may need some Istio labels, in order to make sure the resources under this namespace can communicate through the network within an istio-enabled cluster.
Although an optional +1 for delete the namespace specified by Regarding the namespace overwriting and multi namespaces support, we can split them out from this namespace creation scope. Created #1503 as a separate feature request. |
In addition, we need to handle the case if a specific namespace from |
Thanks @kensipe! I like the proposal. I think I fully agree on use cases where a For the use case where If we decide to create namespaces through KUDO, in that case:
If we introduce the concept of namespace creation without clear ownership, we would be diverging from our best practices model of |
I believe this issue is done, right @kensipe ? |
What would you like to be added:
Currently, KUDO has an assumption that namespace has to be pre-existed before installing an operator. However, when managing some cloud native applications (e.g., istio, kubeflow), users would expect KUDO to support a mechanism, which allows namespace to be created natively if the namespace information is defined along with the operator.
Basically, there are two tasks requested here:
k kudo install
namespace overwriting semantic. KUDO should not always overwrite all resources to one namespace. It is more common today applications would manager multi-namespace.Why is this needed:
This feature is blocking a couple of ongoing efforts:
-Build a Kudo operator for latest Istio controller
-Build a cluster addon for Kudo based kubeflow operator
-Multi namespace management in kudo operator
The text was updated successfully, but these errors were encountered: