-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
compile check to ensure cloud providers implement cloud interfaces #71547
compile check to ensure cloud providers implement cloud interfaces #71547
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andrewsykim 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 |
cf59db9
to
11b1c9f
Compare
11b1c9f
to
f52f4a6
Compare
/retest |
/lgtm |
Thanks @mcrute! /priority important-soon |
var _ cloudprovider.LoadBalancer = (*Cloud)(nil) | ||
var _ cloudprovider.Routes = (*Cloud)(nil) | ||
var _ cloudprovider.Zones = (*Cloud)(nil) | ||
var _ cloudprovider.PVLabeler = (*Cloud)(nil) |
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.
Missing "var _ cloudprovider.Clusters = (*Cloud)(nil)"
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.
updated!
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 also have several package private objects which implement some of these interfaces. (Eg. azure_vmss scaleSet implements LoadBalancer) Wondering if it would be would be worth also adding checks for the package private objects.
Good point @cheftako. I'll dig into that, thanks! |
/lgtm cancel |
f52f4a6
to
4b0f2ab
Compare
@cheftako only internal type I could find was CloudStack's metadata (now updated). Couldn't find the azure_vmss scale set type you were referring to (though it does implement similar sounding methods like |
/retest |
I believe azure_vmss scaleSet ends up "implmenting" LoadBalancer and other methods via composition with the Azure Cloud object. (https://github.com/kubernetes/kubernetes/blob/master/pkg/cloudprovider/providers/azure/azure_vmss.go#L51) |
/lgtm |
/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 |
What type of PR is this?
/kind cleanup
What this PR does / why we need it:
Ensures all providers are implementing cloud providers interfaces at compile time. As discussed in today's SIG meeting.
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 #
Special notes for your reviewer:
/sig cloud-provider
/assign @cheftako @justinsb