-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor nas plugin and support accesspoint #914
Conversation
Skipping CI for Draft Pull Request. |
@tydra-wang: The label(s) In response to this:
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/test-infra repository. |
Maybe you can use #873 to implement v2 Auth |
Please see #874 for upgrade deps. |
61fb40d
to
95651d3
Compare
1f576f9
to
2370fca
Compare
c753c10
to
861d7e0
Compare
c6fa76c
to
ffd654b
Compare
ffd654b
to
d0af129
Compare
Please rebase and get rid of the commit |
8dba9ed
to
6e48bc9
Compare
feat(nas): NodePublish creates subpath if not exists nas: refactor subpath controllerserver nas: split filesystem controllerserver implements nas: split sharepath controllerserver implements refactor(nas): controller server chore: add staging and vendor refactor(nas): controller server fix(nas): init loop image file when NodePublishVolume upgrade client-go dependencies nas: patch deletion finalizer using ssa chore(nas): improve logs fix rebase fix(nas): set global query RegionId in v2 sdk client fix(nas): nas-vpc endpoint not set for some regions cleanup: fix deprecated function cleanup: rename pkg/nas/internal to pkg/nas/cloud refactor(nas): controller init refactor(nas): driver init refactor(nas): driver configs feat(nas): support mount accesspoint cleanup: constants fix(nas): use node name as node id feat(nas): support accesspoint provision
3571c50
to
c5d950a
Compare
} | ||
|
||
var invalidParameters []string | ||
parseParameter := func(key string, target any) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
elegant 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to just switch on key. So that we can report errors on unknown keys. And we can get a compilation error when unknown value type is encountered (maybe due to future SDK update).
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: mowangdk, tydra-wang The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
parseParameter("accesspointPermission", &req.Permission) | ||
parseParameter("accesspointPosixUserId", &req.PosixUserId) | ||
parseParameter("accesspointPosixGroupId", &req.PosixGroupId) | ||
parseParameter("accesspointPosixSecondaryGroupIds", &req.PosixSecondaryGroupIds) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, what is the expected format of this parameter? This looks strange, I would expect the type to be []int32
, but it is *string.
if err == nil { | ||
return false | ||
} | ||
sdkErr, ok := err.(*tea.SDKError) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
prefer errors.As()
} | ||
|
||
// get csi-plugin configmap | ||
cm, err := kubeClient.CoreV1().ConfigMaps(configMapNamespace).Get(context.Background(), configMapName, metav1.GetOptions{}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can just read /etc/csi-plugin/config
on node
What type of PR is this?
/kind feature
/kind cleanup
What this PR does / why we need it:
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.: