When deploying a Kubernetes operator using the Operator SDK, resources such as services and deployments are installed in the namespace of the operator (system namespace), rather than in the namespace specified for the CRD. This behavior occurs specifically when the CRD is installed via a Kubernetes deployment.
Expected Behavior:
Resources created by the operator, such as services and deployments, should be installed in the same namespace as the CRD, as specified during its deployment.
helm release is deployed in test ns but the resources are getting dpeloyed in system namespace. Technically resources should also be deployed in test namespace as CRD and helm release.
Additional Information:
This issue does not occur when running the operator directly on a system and connecting to the Kubernetes cluster, as resources are deployed in the respective namespace as the CRD.
The discrepancy in namespace deployment may lead to operational challenges and misconfiguration, especially in multi-tenant environments where namespace isolation is crucial.
When deploying a Kubernetes operator using the Operator SDK, resources such as services and deployments are installed in the namespace of the operator (system namespace), rather than in the namespace specified for the CRD. This behavior occurs specifically when the CRD is installed via a Kubernetes deployment.
Expected Behavior: Resources created by the operator, such as services and deployments, should be installed in the same namespace as the CRD, as specified during its deployment.
helm release is deployed in test ns but the resources are getting dpeloyed in system namespace. Technically resources should also be deployed in test namespace as CRD and helm release.
Additional Information:
Type of question
General operator-related help
Environment
Operator type:
golang
Kubernetes cluster type:
docker kubernetes
$ operator-sdk version
operator-sdk version: "v1.34.1", commit: "edaed1e5057db0349568e0b02df3743051b54e68", kubernetes version: "1.28.0", go version: "go1.21.7", GOOS: "darwin", GOARCH: "amd64"
$ go version
(if language is Go)go version go1.22.1 darwin/amd64
$ kubectl version
Client Version: v1.29.1 Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3 Server Version: v1.29.1
Any help would be highly appreciated