-
Notifications
You must be signed in to change notification settings - Fork 136
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. | ||||||||||
|
||||||||||
| // clearMachineError is a convenience function to remove an error on the machine if its set. | |
| // clearMachineError is a convenience function to remove an error on the machine if it's set. |
Copilot
AI
Mar 23, 2026
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.
ExternalCloudProvider is documented as controlling the kubelet --cloud-provider=external flag. When it's false, an in-tree cloud provider/CCM may still be in use and set a cloud-specific node.spec.providerID. With the inTree gate removed, this code can now write the synthetic kubermatic://... ProviderID for providers like Azure/vSphere/GCE and potentially prevent the in-tree CCM from ever setting the correct ProviderID format, breaking cloud integrations. Consider restoring a guard for in-tree modes/providers, or otherwise ensuring in-tree mode cannot be enabled anymore (e.g. by enforcing ExternalCloudProvider=true where appropriate).
Copilot
AI
Mar 23, 2026
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.
Behavior around ProviderID assignment changed significantly here, but there are existing controller unit tests in this package. It would be good to add/adjust tests covering when node.spec.providerID / machine.spec.providerID should (and should not) be set based on ExternalCloudProvider and cloud provider, to prevent regressions for in-tree vs out-of-tree CCM scenarios.
Copilot
AI
Mar 23, 2026
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.
Same concern as above: when ExternalCloudProvider is false (in-tree kubelet mode), this now sets machine.spec.providerID to the synthetic kubermatic://... value for all providers. If an in-tree cloud provider/CCM is expected to set a cloud-specific providerID, writing a synthetic value here can block later reconciliation from ever using the canonical providerID format.
| // 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 { |
Copilot
AI
Apr 21, 2026
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.
Similarly, machine.Spec.ProviderID is now set whenever ExternalCloudProvider is false, using the kubermatic://... pattern. If a CCM/in-tree cloud provider is expected to manage provider IDs for some configurations, pre-populating this field can lead to inconsistent providerID semantics across clusters. Consider clarifying the supported CCM modes or gating this behavior to only the configurations where a CCM will not set providerID.
| 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".