Skip to content

Conversation

@iltyty
Copy link
Contributor

@iltyty iltyty commented Dec 25, 2025

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Get node information only in losetup mode, otherwise the nas driver will failed to start when no kubeconfig is provided.

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?


Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.:


@k8s-ci-robot k8s-ci-robot added kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Dec 25, 2025
@k8s-ci-robot k8s-ci-robot requested a review from huww98 December 25, 2025 09:16
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: iltyty

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

The pull request process is described here

Details 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 k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 25, 2025
@iltyty iltyty force-pushed the nas-losetup-cleanup branch from e61918c to 19155b8 Compare December 26, 2025 06:43
if err != nil {
return nil, err
}
config.NodeName = nodeName
Copy link
Contributor

Choose a reason for hiding this comment

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

config.NodeName is also used as CSI NodeID, So I think we still need this when !config.EnableLosetup

Copy link
Contributor

Choose a reason for hiding this comment

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

How about renaming sidecar mode's nodeName to podName, as I haven't find use case for nodeName in the nas driver.

Copy link
Contributor

Choose a reason for hiding this comment

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

CI failure also caused by this issue:

  I1226 18:57:46.163485   18655 main.go:109] "Received NotifyRegistrationStatus call" status="&RegistrationStatus{PluginRegistered:false,Error:RegisterPlugin error -- plugin registration failed with err: error adding CSI driver node info: driverNodeID must not be empty,}"
  E1226 18:57:46.163520   18655 main.go:111] "Registration process failed with error, restarting registration container" err="RegisterPlugin error -- plugin registration failed with err: error adding CSI driver node info: driverNodeID must not be empty"

Copy link
Contributor

Choose a reason for hiding this comment

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

How about renaming sidecar mode's nodeName to podName

I think we can still use KUBE_NODE_NAME env name, and let caller to determine what value is appropriate.

@iltyty iltyty force-pushed the nas-losetup-cleanup branch from 19155b8 to aa9dad9 Compare December 29, 2025 06:28
@huww98
Copy link
Contributor

huww98 commented Jan 3, 2026

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 3, 2026
@k8s-ci-robot k8s-ci-robot merged commit 00bbd1a into kubernetes-sigs:master Jan 3, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants