This is a FEATURE REQUEST
What happened:
Right now OpenEBS can only be deployed to the default namespace.
What you expected to happen:
I want to deploy the operator to custom namespaces for example openebs or kube-system.
How to reproduce it (as minimally and precisely as possible):
Just deploy the operator to a non-default namespace? Change all the namespaces in k8s/openebs-operator.yaml to openebs.
This will put the provisioner in a CrashLoopBackOff and the logs show:
E0206 18:09:03.238356 1 openebs-provisioner.go:69] Error getting maya-apiserver IP Address: services "maya-apiserver-service" not found
Anything else we need to know?:
In Kubernetes it is pretty common to run services in their own namespace. Looking at OpenEBS, I feel like running the maya-apiserver & openebs-provisioner in the default namespace is strange.
Right now I'd like to run these in an own openebs namespace or perhaps in kube-system too.
As discussed on Slack I now open an issue.
@tboerger @yudaykiran
With 0.5.1, the support for deploying openebs in custom namespace (other than default) and then launching an app in a different namespace is supported. To deploy openebs in its own namespace (say openebs) the following changes need to be done to the openebs-operator.yaml:
(1) Create a name space:
apiVersion: v1
kind: Namespace
metadata:
name: openebs
(2) Change the references in openebs-operator.yaml to namespace: default to namespace: openebs (or anything else used in the step1 above).
(3) In the openebs-provisioner deployment, add the following ENV:
- name: OPENEBS_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
The modified openebs-operator:
The sample percona yaml used to test percona in its namespace:
The above yamls use 0.5.2-RC1 (since i was currently testing them, but the non-default namespace works with 0.5.1 as well).
The above details are added to the documentation.
Most helpful comment
With 0.5.1, the support for deploying openebs in custom namespace (other than default) and then launching an app in a different namespace is supported. To deploy openebs in its own namespace (say openebs) the following changes need to be done to the openebs-operator.yaml:
(1) Create a name space:
(2) Change the references in openebs-operator.yaml to namespace: default to namespace: openebs (or anything else used in the step1 above).
(3) In the openebs-provisioner deployment, add the following ENV: