-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 v1alpha2 types 🎉 #1051
Add v1alpha2 types 🎉 #1051
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vincepri 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 |
169bb0f
to
181c713
Compare
@vincepri Can you please elaborate on this? I'm not sure what "porting it with providerSpec" means. Something related to #833 (comment) |
@pablochacin Cluster will be ported to v1alpha2 as is from v1alpha1 (in this PR). Whenever the proposal is ready and accepted, we can modify the v1alpha2 type to match. |
117665f
to
c9bb768
Compare
/test pull-cluster-api-test |
/check-cla |
@ncdc Running --input-dirs sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1...
(map[string]types.GroupVersions) (len=1) {
(string) (len=7) "cluster": (types.GroupVersions) {
PackageName: (string) (len=7) "cluster",
Group: (types.Group) (len=14) cluster.k8s.io,
Versions: ([]types.PackageVersion) (len=1 cap=1) {
(types.PackageVersion) v1alpha1
}
}
}
... --input-dirs sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha2
--input-dirs sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1,sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha2
--input-dirs sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha2,sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1(map[string]types.GroupVersions) (len=1) {
(string) (len=7) "cluster": (types.GroupVersions) {
PackageName: (string) (len=7) "cluster",
Group: (types.Group) (len=19) cluster.sigs.k8s.io,
Versions: ([]types.PackageVersion) (len=2 cap=2) {
(types.PackageVersion) v1alpha2,
(types.PackageVersion) v1alpha1
}
}
}
panic: runtime error: index out of range
goroutine 1 [running]:
k8s.io/code-generator/cmd/informer-gen/generators.(*genericGenerator).GenerateType.func1(...)
/Users/vince/go/src/sigs.k8s.io/cluster-api/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go:120
k8s.io/code-generator/cmd/informer-gen/generators.(*genericGenerator).GenerateType(0xc0016167e0, 0xc00a58ec00, 0xc00a354d10, 0x142bee0, 0xc00a577580, 0x0, 0x139e7f8)
/Users/vince/go/src/sigs.k8s.io/cluster-api/vendor/k8s.io/code-generator/cmd/informer-gen/generators/generic.go:121 +0x1060
k8s.io/gengo/generator.(*Context).executeBody(0xc00a58ec00, 0x142bae0, 0xc00a56d4f0, 0x14377a0, 0xc0016167e0, 0x480, 0x0)
/Users/vince/go/src/sigs.k8s.io/cluster-api/vendor/k8s.io/gengo/generator/execute.go:304 +0x11d
k8s.io/gengo/generator.(*Context).ExecutePackage(0xc00a30d800, 0xc000016380, 0x13, 0x1434aa0, 0xc00a3e6600, 0x0, 0x0)
/Users/vince/go/src/sigs.k8s.io/cluster-api/vendor/k8s.io/gengo/generator/execute.go:265 +0xbf7
k8s.io/gengo/generator.(*Context).ExecutePackages(0xc00a30d800, 0xc000016380, 0x13, 0xc00a3e6700, 0x5, 0x8, 0x0, 0x12e1136)
/Users/vince/go/src/sigs.k8s.io/cluster-api/vendor/k8s.io/gengo/generator/execute.go:51 +0xc5
k8s.io/gengo/args.(*GeneratorArgs).Execute(0xc000012280, 0xc0000ce570, 0x139d3e0, 0x6, 0x13ccb70, 0x0, 0x0)
/Users/vince/go/src/sigs.k8s.io/cluster-api/vendor/k8s.io/gengo/args/args.go:194 +0x2d7
main.main()
/Users/vince/go/src/sigs.k8s.io/cluster-api/vendor/k8s.io/code-generator/cmd/informer-gen/main.go:55 +0x320
exit status 2 |
@vincepri |
86fc928
to
c851f78
Compare
@ncdc I actually removed the kind file and the feature gates now that we're using |
d092ed0
to
43ad90c
Compare
/test pull-cluster-api-test |
1 similar comment
/test pull-cluster-api-test |
/test pull-cluster-api-test |
Signed-off-by: Vince Prignano <[email protected]>
/lgtm |
klog.V(10).Info("retrying: machine.Status.ProviderStatus is not set") | ||
return false, nil | ||
} | ||
// if m.Status.ProviderStatus == 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.
Why commented out here, should this have been replaced with a TODO instead?
@@ -13,8 +13,6 @@ spec: | |||
shortNames: | |||
- cl | |||
scope: Namespaced | |||
subresources: | |||
status: {} |
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 happened to the status subresource?
@@ -18,7 +18,6 @@ spec: | |||
labelSelectorPath: .status.labelSelector | |||
specReplicasPath: .spec.replicas | |||
statusReplicasPath: .status.replicas | |||
status: {} |
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 happened to the status subresource?
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.
Good point, this needs to be added back. It was conflicting when both v1alpha2 and v1alpha2 were in the same CRD
group: cluster.k8s.io | ||
names: | ||
kind: Machine | ||
plural: machines | ||
shortNames: | ||
- ma | ||
scope: Namespaced | ||
subresources: | ||
status: {} |
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 happened to the status subresource?
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 as above
@@ -18,7 +18,6 @@ spec: | |||
labelSelectorPath: .status.labelSelector | |||
specReplicasPath: .spec.replicas | |||
statusReplicasPath: .status.replicas | |||
status: {} |
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 happened to the status subresource?
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 as above
@@ -0,0 +1,9 @@ | |||
apiVersion: cluster.k8s.io/v1alpha2 |
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 thing with the v1alpha2 samples, they are invalid and can likely just be removed.
/// [MachineSpec] | ||
// MachineSpec defines the desired state of Machine | ||
type MachineSpec struct { | ||
// ObjectMeta will autopopulate the Node created. Use this 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.
Do we actually expect this to affect the created Node? That seems more like a concern for the bootstrap controller than something explicitly on the MachineSpec.
I'm not sure I'm completely convinced here that we need an embedded ObjectMeta on the MachineSpec type.
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.
Ah, I see why this was confusing now... ObjectMeta should not be needed on the MachineSpec, only on the MachineTemplateSpec embedded type:
See PodTemplateSpec and PodSpec for comparison
@@ -38,10 +38,6 @@ const ( | |||
// Machine is the Schema for the machines API | |||
// +k8s:openapi-gen=true | |||
// +kubebuilder:resource:path=machines,shortName=ma | |||
// +kubebuilder:subresource:status |
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 subresource status should probably remain.
@@ -168,7 +168,6 @@ type MachineDeploymentStatus struct { | |||
// MachineDeployment is the Schema for the machinedeployments API | |||
// +k8s:openapi-gen=true | |||
// +kubebuilder:resource:path=machinedeployments,shortName=md | |||
// +kubebuilder:subresource:status |
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 subresource status should probably remain.
@@ -33,7 +33,6 @@ import ( | |||
// MachineSet ensures that a specified number of machines replicas are running at any given time. | |||
// +k8s:openapi-gen=true | |||
// +kubebuilder:resource:path=machinesets,shortName=ms | |||
// +kubebuilder:subresource:status |
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 subresource status should probably remain.
Signed-off-by: Vince Prignano [email protected]
What this PR does / why we need it:
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 #1035
Fixes #1073
Special notes for your reviewer:
Ongoing list of TODOs:
Release note: