Skip to content

Test nvmeof SA restriction#6097

Closed
Rakshith-R wants to merge 7 commits into
ceph:develfrom
Rakshith-R:restrict-volume-by-sa-nvme-of-test
Closed

Test nvmeof SA restriction#6097
Rakshith-R wants to merge 7 commits into
ceph:develfrom
Rakshith-R:restrict-volume-by-sa-nvme-of-test

Conversation

@Rakshith-R

@Rakshith-R Rakshith-R commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

Depends-on: #6076 #6058


Show available bot commands

These commands are normally not required, but in case of issues, leave any of
the following bot commands in an otherwise empty comment in this PR:

  • /retest ci/centos/<job-name>: retest the <job-name> after unrelated
    failure (please report the failure too!)

Allow restricting RBD volume access to a specific Kubernetes service
account using .rbd.csi.ceph.com/serviceaccount image metadata.

During ControllerPublishVolume, the controller reads the
".rbd.csi.ceph.com/serviceaccount" metadata from the backing
RBD image and passes it to the node via publish context.

During NodePublishVolume, the node validates the pod's
service account (provided by Kubelet when podInfoOnMount is
enabled) against the allowed value, returning PermissionDenied
on mismatch.

Signed-off-by: Rakshith R <rar@redhat.com>
Allow restricting nvmeof volume access to a specific Kubernetes service
account using .rbd.csi.ceph.com/serviceaccount image metadata.

During ControllerPublishVolume, the controller reads the
".rbd.csi.ceph.com/serviceaccount" metadata from the backing
RBD image and passes it to the node via publish context.
During NodePublishVolume, the node validates the pod's
service account (provided by Kubelet when podInfoOnMount is
enabled) against the allowed value, returning PermissionDenied
on mismatch.

Signed-off-by: Rakshith R <rar@redhat.com>
Allow restricting cephFS volume access to a specific Kubernetes service
account using .cephfs.csi.ceph.com/serviceaccount subvolume metadata.

During ControllerPublishVolume, the controller reads the
.cephfs.csi.ceph.com/serviceaccount metadata from the backing CephFS
subvolume and passes it to the node via publish context.

During NodePublishVolume, the node validates the pod's service account
(provided by Kubelet when podInfoOnMount is enabled) against the
allowed value, returning PermissionDenied on mismatch.

Signed-off-by: Rakshith R <rar@redhat.com>
Allow restricting nfs volume access to a specific Kubernetes service
account using .cephfs.csi.ceph.com/serviceaccount subvolume metadata.

During ControllerPublishVolume, the controller delegates
to the CephFS backend to read the .cephfs.csi.ceph.com/serviceaccount
metadata from the backing CephFS subvolume and passes it to the node
via publish context.

During NodePublishVolume, the node validates the pod's service account
(provided by Kubelet when podInfoOnMount is enabled) against
the allowed value, returning PermissionDenied on mismatch.

Signed-off-by: Rakshith R <rar@redhat.com>
…riction

Signed-off-by: Rakshith R <rar@redhat.com>
Signed-off-by: Rakshith R <rar@redhat.com>
@mergify mergify Bot added the component/nvme-of Issues and PRs related to NVMe-oF. label Feb 19, 2026
@Rakshith-R

Copy link
Copy Markdown
Contributor Author

/test ci/centos/mini-e2e/k8s-1.35/nvmeof

@nixpanic nixpanic added the ci/skip/multi-arch-build skip building on multiple architectures label Feb 19, 2026
@nixpanic nixpanic self-assigned this Feb 19, 2026
@Rakshith-R Rakshith-R force-pushed the restrict-volume-by-sa-nvme-of-test branch from f01fde8 to 330fb5b Compare February 19, 2026 10:07
@Rakshith-R

Copy link
Copy Markdown
Contributor Author

/test ci/centos/mini-e2e/k8s-1.35/nvmeof

@nixpanic

Copy link
Copy Markdown
Member

/test ci/centos/mini-e2e/k8s-1.35/nvmeof

It is not unexpected that this fails. #6058 is still a work in progress to make nvmeof e2e testing work well.

@Rakshith-R

Copy link
Copy Markdown
Contributor Author

/test ci/centos/mini-e2e/k8s-1.35/nvmeof

It is not unexpected that this fails. #6058 is still a work in progress to make nvmeof e2e testing work well.

https://jenkins-ceph-csi.apps.ocp.cloud.ci.centos.org/blue/rest/organizations/jenkins/pipelines/mini-e2e_k8s-1.35-nvmeof/runs/22/nodes/90/log/?start=0

The new testcase passed 🥳

Signed-off-by: Rakshith R <rar@redhat.com>
@Rakshith-R Rakshith-R force-pushed the restrict-volume-by-sa-nvme-of-test branch from 330fb5b to c591c1e Compare February 19, 2026 10:37
@Rakshith-R

Copy link
Copy Markdown
Contributor Author

/test ci/centos/mini-e2e/k8s-1.35/nvmeof

@Rakshith-R

Copy link
Copy Markdown
Contributor Author

/test ci/centos/mini-e2e/k8s-1.35/nvmeof

https://jenkins-ceph-csi.apps.ocp.cloud.ci.centos.org/job/mini-e2e_k8s-1.35-nvmeof/23/display/redirect
test passed

therefore closing this pr.

@Rakshith-R Rakshith-R closed this Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/skip/multi-arch-build skip building on multiple architectures component/nvme-of Issues and PRs related to NVMe-oF.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants