-
Notifications
You must be signed in to change notification settings - Fork 137
chore: Removes unused in-tree csi logic #2005
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -30,7 +30,6 @@ import ( | |||||||||
| "github.com/heptiolabs/healthcheck" | ||||||||||
| "github.com/prometheus/client_golang/prometheus" | ||||||||||
| "go.uber.org/zap" | ||||||||||
|
|
||||||||||
| "k8c.io/machine-controller/pkg/cloudprovider" | ||||||||||
| cloudprovidererrors "k8c.io/machine-controller/pkg/cloudprovider/errors" | ||||||||||
| "k8c.io/machine-controller/pkg/cloudprovider/instance" | ||||||||||
|
|
@@ -287,7 +286,7 @@ func enqueueRequestsForNodes(ctx context.Context, log *zap.SugaredLogger, mgr ma | |||||||||
| }) | ||||||||||
| } | ||||||||||
|
|
||||||||||
| // clearMachineError is a convenience function to remove a error on the machine if its set. | ||||||||||
| // clearMachineError is a convenience function to remove an error on the machine if its set. | ||||||||||
| // It does not return an error as it's used around the sync handler. | ||||||||||
| func (r *Reconciler) clearMachineError(machine *clusterv1alpha1.Machine) { | ||||||||||
| if machine.Status.ErrorMessage != nil || machine.Status.ErrorReason != nil { | ||||||||||
|
|
@@ -456,9 +455,8 @@ func (r *Reconciler) reconcile(ctx context.Context, log *zap.SugaredLogger, mach | |||||||||
| return r.ensureInstanceExistsForMachine(ctx, log, prov, machine, providerConfig) | ||||||||||
| } | ||||||||||
|
|
||||||||||
| // case 3.2: if the node exists and both external and internal CCM are not available. Then set the provider-id for the node. | ||||||||||
| inTree := providerconfig.IntreeCloudProviderImplementationSupported(providerConfig.CloudProvider) | ||||||||||
| if !inTree && !r.nodeSettings.ExternalCloudProvider && node.Spec.ProviderID == "" { | ||||||||||
| // case 3.2: if the node exists and external CCM is not available. Then set the provider-id for the node. | ||||||||||
| if !r.nodeSettings.ExternalCloudProvider && node.Spec.ProviderID == "" { | ||||||||||
| providerID := fmt.Sprintf(ProviderIDPattern, providerConfig.CloudProvider, machine.UID) | ||||||||||
| if err := r.updateNode(ctx, node, func(n *corev1.Node) { | ||||||||||
| n.Spec.ProviderID = providerID | ||||||||||
|
Comment on lines
+458
to
462
|
||||||||||
|
|
@@ -899,9 +897,8 @@ func (r *Reconciler) ensureInstanceExistsForMachine( | |||||||||
|
|
||||||||||
| var providerID string | ||||||||||
| if machine.Spec.ProviderID == nil { | ||||||||||
| inTree := providerconfig.IntreeCloudProviderImplementationSupported(providerConfig.CloudProvider) | ||||||||||
| // If both external and internal CCM are not available. We set provider-id for the machine explicitly. | ||||||||||
| if !inTree && !r.nodeSettings.ExternalCloudProvider { | ||||||||||
| // If both external CCM is not available. We set provider-id for the machine explicitly. | ||||||||||
| if !r.nodeSettings.ExternalCloudProvider { | ||||||||||
|
Comment on lines
+900
to
+901
|
||||||||||
| // If both external CCM is not available. We set provider-id for the machine explicitly. | |
| if !r.nodeSettings.ExternalCloudProvider { | |
| // If an external cloud provider/CCM is used, set a synthetic providerID for the machine explicitly. | |
| if r.nodeSettings.ExternalCloudProvider { |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -117,13 +117,6 @@ var ( | |||||||||||||
| } | ||||||||||||||
| ) | ||||||||||||||
|
|
||||||||||||||
|
||||||||||||||
| // IntreeCloudProviderImplementationSupported indicates whether in-tree cloud provider implementations are supported. | |
| // | |
| // Deprecated: This symbol is kept for backward compatibility and will be removed in a future major version. | |
| var IntreeCloudProviderImplementationSupported = true |
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.
@appiepollo14 I'm sure replacing a function with a variable is not a kind of non-breaking change copilot is talking about, but something like will be good
// IntreeCloudProviderImplementationSupported is deprecated and constantly returns false
func IntreeCloudProviderImplementationSupported(CloudProvider) bool {
return false
}
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.
Comment grammar: "if its set" should be "if it's set".