-
Notifications
You must be signed in to change notification settings - Fork 1.5k
🌱 Standardize api import aliases #5830
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
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 |
|---|---|---|
|
|
@@ -70,6 +70,55 @@ linters-settings: | |
| # Controller Runtime | ||
| - pkg: sigs.k8s.io/controller-runtime | ||
| alias: ctrl | ||
| # CABPK | ||
| - pkg: sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha3 | ||
| alias: bootstrapv1alpha3 | ||
| - pkg: sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4 | ||
| alias: bootstrapv1alpha4 | ||
| - pkg: sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1 | ||
| alias: bootstrapv1 | ||
| # KCP | ||
| - pkg: sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha3 | ||
| alias: controlplanev1alpha3 | ||
| - pkg: sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4 | ||
| alias: controlplanev1alpha4 | ||
| - pkg: sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1beta1 | ||
| alias: controlplanev1 | ||
| # CAPI | ||
| - pkg: sigs.k8s.io/cluster-api/api/v1alpha3 | ||
| alias: clusterv1alpha3 | ||
| - pkg: sigs.k8s.io/cluster-api/api/v1alpha4 | ||
| alias: clusterv1alpha4 | ||
| - pkg: sigs.k8s.io/cluster-api/api/v1beta1 | ||
| alias: clusterv1 | ||
| # CAPI exp | ||
| - pkg: sigs.k8s.io/cluster-api/exp/api/v1alpha3 | ||
| alias: expv1alpha3 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: clusterexp*?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would be fine for me. I just used the currently most commonly used alias. But I'm not sure which one would be better (same would probably apply to On one side having the cluster prefix would be more consistent with @fabriziopandini WDYT?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. using cluster prefix seems kind of redundant to me, but no strong opinions
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar here. |
||
| - pkg: sigs.k8s.io/cluster-api/exp/api/v1alpha4 | ||
| alias: expv1alpha4 | ||
| - pkg: sigs.k8s.io/cluster-api/exp/api/v1beta1 | ||
| alias: expv1 | ||
| # CAPI exp addons | ||
| - pkg: sigs.k8s.io/cluster-api/exp/addons/api/v1alpha3 | ||
| alias: addonsv1alpha3 | ||
| - pkg: sigs.k8s.io/cluster-api/exp/addons/api/v1alpha4 | ||
| alias: addonsv1alpha4 | ||
| - pkg: sigs.k8s.io/cluster-api/exp/addons/api/v1beta1 | ||
| alias: addonsv1 | ||
| # CAPD | ||
| - pkg: sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1alpha3 | ||
| alias: infrav1alpha3 | ||
| - pkg: sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1alpha4 | ||
| alias: infrav1alpha4 | ||
| - pkg: sigs.k8s.io/cluster-api/test/infrastructure/docker/api/v1beta1 | ||
| alias: infrav1 | ||
| # CAPD exp | ||
| - pkg: sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/api/v1alpha3 | ||
| alias: infraexpv1alpha3 | ||
| - pkg: sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/api/v1alpha4 | ||
| alias: infraexpv1alpha4 | ||
| - pkg: sigs.k8s.io/cluster-api/test/infrastructure/docker/exp/api/v1beta1 | ||
| alias: infraexpv1 | ||
| nolintlint: | ||
| allow-unused: false | ||
| allow-leading-space: 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.
should we reserve v1 for real v1 and let the beta imports be consistent e.g bootstrapv1beta1?
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.
Hm good question. Up until know we used v1 everywhere (and with everywhere I also mean in a bunch of providers :))
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 the main idea behind that is that when we upgrade the version only the import changes and not huge parts of the codebase
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.
yes. this is for avoiding churn in the codebase at each release and it kind of makes sense if you read it as the last version in the v1 series (or at least that was the original idea)