feat(nfs-server): provision nfs server resource in user provided namespace#58
feat(nfs-server): provision nfs server resource in user provided namespace#58kmova merged 12 commits intoopenebs-archive:developfrom
Conversation
nfs-provisioner deployment can be configured with env NFSServerNamespace with namespace value to create nfs-server deployment in a provided namespace. Note: This requires nfs-provisioner should have permission to create/delete deployment, service, PVC resource in the provided namespace. Signed-off-by: mayank <mayank.patel@mayadata.io>
…into nfs-server-ns
Signed-off-by: mayank <mayank.patel@mayadata.io>
Signed-off-by: mayank <mayank.patel@mayadata.io>
Signed-off-by: mayank <mayank.patel@mayadata.io>
Codecov Report
@@ Coverage Diff @@
## develop #58 +/- ##
========================================
Coverage 48.37% 48.37%
========================================
Files 18 18
Lines 1598 1598
========================================
Hits 773 773
Misses 781 781
Partials 44 44 Continue to review full report at Codecov.
|
| value: "openebs-operator-nfs" | ||
| # OPENEBS_IO_NFS_SERVER_NS defines the namespace for nfs-server deployment | ||
| #- name: OPENEBS_IO_NFS_SERVER_NS | ||
| # value: "default" |
There was a problem hiding this comment.
Is the default - default namespace or the namespace where openebs is installed. Probably need to change this "openebs" for better clarity.
provisioner/env.go
Outdated
| } | ||
|
|
||
| func getNfsServerNamespace() string { | ||
| return menv.Get(NFSServerNamespace) |
There was a problem hiding this comment.
This probably should handle the case where NFSServerNamespace is not present in the YAML and return the same value configured to getOpenEBSNamespace if empty.
| return nil, fmt.Errorf("Cannot start Provisioner: failed to get namespace") | ||
| } | ||
|
|
||
| nfsServerNs := getNfsServerNamespace() |
There was a problem hiding this comment.
you can move this code into the menv file as per the previous comment
Signed-off-by: mayank <mayank.patel@mayadata.io>
…oner into nfs-server-ns
Signed-off-by: mayank <mayank.patel@mayadata.io>
Signed-off-by: mayank <mayank.patel@mayadata.io>
Signed-off-by: mayank <mayank.patel@mayadata.io>
mittachaitu
left a comment
There was a problem hiding this comment.
provided few minor comments
Signed-off-by: mayank <mayank.patel@mayadata.io>
|
Hi @kmova @mittachaitu |
Signed-off-by: mayank <mayank.patel@mayadata.io>
Why is this PR required? What issue does it fix?:
As of now, nfs-provisioner creates nfs-server resources in default 'openebs' namespace. This resource can be isolated from operator namespace.
What this PR does?:
This PR fixes the above issue. With these PR changes, nfs-provisioner will create the nfs-server resources in the namespace mentioned in OPENEBS_IO_NFS_SERVER_NS env variable in nfs-provisioner deployment. If OPENEBS_IO_NFS_SERVER_NS is not mentioned or is having empty value then nfs-server resources will be created in the operator namespace which is
openebs.Does this PR require any upgrade changes?:
If the changes in this PR are manually verified, list down the scenarios covered::
Any additional information for your reviewer? :
Mention if this PR is part of any design or a continuation of previous PRs
Checklist:
<type>(<scope>): <subject>