Skip to content

Conversation

@GamerGirlandCo
Copy link

@GamerGirlandCo GamerGirlandCo commented Nov 5, 2025

What type of PR is this?

/kind feature

What this PR does / why we need it:
This PR implements authentication with a kerberos principal and password when mounting NFS shares.

Which issue(s) this PR fixes:

Fixes #525

Special notes for your reviewer:

  • I changed the Dockerfile's base image to debian:stable-slim
    Justification: services cannot be started due to a missing file /lib/lsb/init-functions
  • I changed the Dockerfile's entrypoint to a script (entry.sh)
    The script is created in the Dockerfile inline, and you can review it here
    Justification: this is so we can start necessary services (rpcbind and nfs-common) if and only if we're in the controller pod. Otherwise, the nfsplugin binary is invoked with the exact same arguments the pod's nfs container was started with.

Does this PR introduce a user-facing change?:

Added the ability to authenticate with kerberos-protected NFS shares
The following new parameters may be specified when creating or updating a storage class:
- **`authPrincipal`**
  The principal that will be used to authenticate to the share
- **`authPasswordSecret`**
  The secret containing the authentication password
- **`authKrbConf`**
  The secret containing contents of a krb5.conf with information about how to connect to a realm.

this will allow the authentication password to be passed to `kinit`
- change base image to `debian:stable-slim`
  justification: services cannot be started due to missing file `/lib/lsb/init-functions`
- invoke a script (`entry.sh`) that then invokes `/nfsplugin` with any passed args.
  justification: this is so we can start necessary services (`rpcbind` and `nfs-common`) if and only if we're in the controller pod.
- set `entry.sh` as the entrypoint
…he first argument

this is to tell the script that we're running as a controller, so the necessary services can be started
- apply the kerberos nfs server deployment with `kubectl`
- add a `krb-pwd` key to the `mount-options` secret, which will be used to authenticate with the share in tests
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. labels Nov 5, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: GamerGirlandCo
Once this PR has been reviewed and has the lgtm label, please assign msau42 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot
Copy link
Contributor

Welcome @GamerGirlandCo!

It looks like this is your first PR to kubernetes-csi/csi-driver-nfs 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-csi/csi-driver-nfs has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Nov 5, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Nov 5, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @GamerGirlandCo. Thanks for your PR.

I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Nov 5, 2025
Copy link
Member

@andyzhangx andyzhangx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Nov 5, 2025
@GamerGirlandCo
Copy link
Author

/retest

@GamerGirlandCo
Copy link
Author

/retest

allows an end user to specify a secret which contains contents of a kerberos 5 configuration file that specifies how to connect to one or more realms
@GamerGirlandCo
Copy link
Author

/retest

ensure that `nfs-common` daemons have been started properly
fix reference to secret that doesn't exist in CI environment
add more detailed error logging during kerberos auth phase
@GamerGirlandCo
Copy link
Author

/test pull-csi-driver-nfs-e2e-capz

@GamerGirlandCo
Copy link
Author

/retest-required

@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 11, 2025
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 11, 2025
use ubuntu nfs-krb image instead of alpine to maybe fix timeouts
switch back to alpine nfs-krb image, open TCP port 111
@k8s-ci-robot
Copy link
Contributor

@GamerGirlandCo: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-csi-driver-nfs-external-e2e a6e1f33 link true /test pull-csi-driver-nfs-external-e2e
pull-csi-driver-nfs-e2e-capz a6e1f33 link false /test pull-csi-driver-nfs-e2e-capz

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

NFS credentials

3 participants