-
Notifications
You must be signed in to change notification settings - Fork 39k
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
Add explicit "Installed" field to CSINodeInfo and change update semantics #70515
Conversation
/assign @liggitt |
e0c1a09
to
bf36bb0
Compare
@@ -452,31 +434,20 @@ func (nim *nodeInfoManager) removeCSINodeInfo(csiDriverName string) error { | |||
|
|||
nodeInfoClient := csiKubeClient.CsiV1alpha1().CSINodeInfos() | |||
nodeInfo, err := nodeInfoClient.Get(string(nim.nodeName), metav1.GetOptions{}) | |||
if nodeInfo == nil || errors.IsNotFound(err) { |
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.
Why is this block removed?
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.
nodeInfo
should never be nil here, it's an error if it is and we want to fail fast
/assign @thockin @lavalamp @smarterclayton |
750c423
to
1ee61f6
Compare
0fe427d
to
02b677b
Compare
/retest |
7c96be0
to
ca72b25
Compare
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.
Logic largely LGTM, minus a couple of nits.
Will leave to API reviewers to give the final LGTM
ca72b25
to
c7e7c90
Compare
/retest |
1 similar comment
/retest |
… Object. Split CSINodeInfo into Spec and Status.
c7e7c90
to
06f3b26
Compare
description: Whether the CSI driver is installed. | ||
type: boolean | ||
volumePluginMechanism: | ||
description: Indicates to external components the required mechanism |
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 think I'd expect these descriptions to match the comments on the go type? We can fix that in a followup since it's probably a tooling problem...
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: davidz627, lavalamp, mikedanese, saad-ali 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 |
/retest Review the full test history for this PR. Silence the bot with an |
1 similar comment
/retest Review the full test history for this PR. Silence the bot with an |
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.
Please work with @verult to update and cut a new external provisioner. This impacts his e2e work for csi topology.
For CSI Migration Alpha we expect any user who turns on the feature has both | ||
Kubelet and ADC at a version where the CSINodeInfo's are being created on | ||
Kubelet startup. We will not promote the feature to Beta (on by default) until | ||
the CSINodeInfo's are being created on Kubelet startup for a 2 version skew to |
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 don't think this is going to work. CSINodeInfo is under an alpha feature gate which means they won't be created by default. I think you might need two feature gates, one for controller and one for nodes, then move the node feature gate to beta first.
Or ADC should fallback to intree if migration is on but CSINodeInfo doesn't exist
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.
Nm I think I got it now. The CSIMigration feature gate cannot move to beta until 2 releases after CSINodeInfo is beta. It might be good to explicitly detail this here.
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.
Actually no I'm confused again. The logic that auto creates CSINodeInfo objects for migrated drivers will be under the specific plugin's CSIMigration feature gate?
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.
The plan is that CSINodeInfo objects are auto created iff CSINodeInfo feature gate is on.
Then the gates for each CSIMigration plugin can only go Beta (default) 2 releases after the CSINodeInfos have been added.
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.
would be happy to discuss in-person
// This MUST be the same name returned by the CSI GetPluginName() call for | ||
// that driver. | ||
Driver string `json:"driver"` | ||
Name string `json:"name"` |
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.
What happens if the driver is upgraded and changes values stored in the spec? Are we allowing spec to be mutable for this reason?
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 think Spec
should be mutable as topology keys or node ID may change for the driver
/assign @verult @saad-ali
/cc @bertinatto @jsafrane @vladimirvivien
/kind feature
/sig storage
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #70504
This PR Introduces the
Installed
field andMigratedOnNode
field to theCSINodeInfo
object. The semantics of the object have also been changed so that on driver installation we create/update the driver info withInstalled=true
and on uninstallation of the driver the driver info object persists butInstalled=false
. This enables detection of version/configuration skew between master and node for CSI Migration (kubernetes/enhancements#625).I have also added hooks for un-registering/uninstalling the driver