openebs-archive / dynamic-nfs-provisioner

Operator for dynamically provisioning an NFS server on any Kubernetes Persistent Volume. Also creates an NFS volume on the dynamically provisioned server for enabling Kubernetes RWX volumes.
Apache License 2.0
169 stars 58 forks source link

feat: Add Original PVC context to the deployment labels. #151

Closed farcaller closed 1 year ago

farcaller commented 1 year ago

Pull Request template

Why is this PR required? What issue does it fix?:

This allows targeting the nfs workload pod using stable labels in e.g. CiliumNetworkPolicy rules. Currently the only label on the workload is openebs.io/nfs-server with the generated pvc name which cannot be deduced statically from the original pvc name.

What this PR does?:

Adds the name/namespace/id labels to the pod.

Does this PR require any upgrade changes?:

No.

If the changes in this PR are manually verified, list down the scenarios covered::

Using the pod in the CiliumNetworkPolicy, by targeting the new labels.

Any additional information for your reviewer? :

N/A

Checklist:

t3hmrman commented 1 year ago

@abhilashshetty04 @niladrih @pawanpraka1

Sorry to bother ya'll, -- this is a really useful feature, is it possible to merge & release it?

abhilashshetty04 commented 1 year ago

@avishnu

niladrih commented 1 year ago

Thank you for the PR @farcaller. And thanks for the bump @t3hmrman. The CI checks seem to have not run, I'm putting the do-not-merge label on this one for a while.