How to set or edit the namespace for the Operator deployment (make deploy) #2239
-
Hello, I am testing an operator on a local Kubernetes cluster and saw that that the Operator is deployed in his default namespace "controller-manager-system" . I saw some yaml files where this namespace could be obtained. My question is how to set the namespace where the operator will be deployed. thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @stevelaclasse, By using the Makefile targets command when you run See that it is defined in the config//kustomization.yaml file: https://github.com/kubernetes-sigs/kubebuilder/blob/v3.5.0/testdata/project-v3/config/default/kustomization.yaml#L1-L9 Also, check here the manifest to create the namespace: kubebuilder/testdata/project-v3/config/manager/manager.yaml Lines 1 to 6 in 26d12ab Therefore, to set the namespace where the operator will be deployed you can check the kustomize configuration for example. |
Beta Was this translation helpful? Give feedback.
-
Closing since it is answered. |
Beta Was this translation helpful? Give feedback.
Hi @stevelaclasse,
By using the Makefile targets command when you run
make deploy IMG=image
(More info) a namespace with the project name concat with "-system" will be created and your project will be applied there.See that it is defined in the config//kustomization.yaml file: https://github.com/kubernetes-sigs/kubebuilder/blob/v3.5.0/testdata/project-v3/config/default/kustomization.yaml#L1-L9
Also, check here the manifest to create the namespace:
kubebuilder/testdata/project-v3/config/manager/manager.yaml
Lines 1 to 6 in 26d12ab
Therefore, to set the…