Skip to content

Commit 7bc89f4

Browse files
committed
Remove unused updateClusterStatus
1 parent 51ab638 commit 7bc89f4

15 files changed

+7
-538
lines changed

bootstrap/kubeadm/types/upstreamv1beta1/conversion.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,6 @@ func (dst *ClusterConfiguration) ConvertFrom(srcRaw conversion.Hub) error {
3434
return Convert_v1beta2_ClusterConfiguration_To_upstreamv1beta1_ClusterConfiguration(src, dst, nil)
3535
}
3636

37-
func (src *ClusterStatus) ConvertTo(dstRaw conversion.Hub) error {
38-
dst := dstRaw.(*bootstrapv1.ClusterStatus)
39-
return Convert_upstreamv1beta1_ClusterStatus_To_v1beta2_ClusterStatus(src, dst, nil)
40-
}
41-
42-
func (dst *ClusterStatus) ConvertFrom(srcRaw conversion.Hub) error {
43-
src := srcRaw.(*bootstrapv1.ClusterStatus)
44-
return Convert_v1beta2_ClusterStatus_To_upstreamv1beta1_ClusterStatus(src, dst, nil)
45-
}
46-
4737
func (src *InitConfiguration) ConvertTo(dstRaw conversion.Hub) error {
4838
dst := dstRaw.(*bootstrapv1.InitConfiguration)
4939
return Convert_upstreamv1beta1_InitConfiguration_To_v1beta2_InitConfiguration(src, dst, nil)

bootstrap/kubeadm/types/upstreamv1beta1/conversion_test.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,6 @@ func TestFuzzyConversion(t *testing.T) {
4242
SkipSpokeAnnotationCleanup: true,
4343
FuzzerFuncs: []fuzzer.FuzzerFuncs{fuzzFuncs},
4444
}))
45-
t.Run("for ClusterStatus", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{
46-
Hub: &bootstrapv1.ClusterStatus{},
47-
Spoke: &ClusterStatus{},
48-
// NOTE: Kubeadm types does not have ObjectMeta, so we are required to skip data annotation cleanup in the spoke-hub-spoke round trip test.
49-
SkipSpokeAnnotationCleanup: true,
50-
FuzzerFuncs: []fuzzer.FuzzerFuncs{fuzzFuncs},
51-
}))
5245
t.Run("for InitConfiguration", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{
5346
Hub: &bootstrapv1.InitConfiguration{},
5447
Spoke: &InitConfiguration{},

bootstrap/kubeadm/types/upstreamv1beta1/types.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -182,18 +182,6 @@ type ImageMeta struct {
182182
//TODO: evaluate if we need also a ImageName based on user feedbacks
183183
}
184184

185-
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
186-
187-
// ClusterStatus contains the cluster status. The ClusterStatus will be stored in the kubeadm-config
188-
// ConfigMap in the cluster, and then updated by kubeadm when additional control plane instance joins or leaves the cluster.
189-
type ClusterStatus struct {
190-
metav1.TypeMeta `json:",inline"`
191-
192-
// APIEndpoints currently available in the cluster, one for each control plane/api server instance.
193-
// The key of the map is the IP of the host's default interface
194-
APIEndpoints map[string]APIEndpoint `json:"apiEndpoints"`
195-
}
196-
197185
// APIEndpoint struct contains elements of API server instance deployed on a node.
198186
type APIEndpoint struct {
199187
// AdvertiseAddress sets the IP address for the API server to advertise.

bootstrap/kubeadm/types/upstreamv1beta1/zz_generated.conversion.go

Lines changed: 0 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bootstrap/kubeadm/types/upstreamv1beta1/zz_generated.deepcopy.go

Lines changed: 0 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bootstrap/kubeadm/types/upstreamv1beta2/conversion.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,6 @@ func (dst *ClusterConfiguration) ConvertFrom(srcRaw conversion.Hub) error {
3434
return Convert_v1beta2_ClusterConfiguration_To_upstreamv1beta2_ClusterConfiguration(src, dst, nil)
3535
}
3636

37-
func (src *ClusterStatus) ConvertTo(dstRaw conversion.Hub) error {
38-
dst := dstRaw.(*bootstrapv1.ClusterStatus)
39-
return Convert_upstreamv1beta2_ClusterStatus_To_v1beta2_ClusterStatus(src, dst, nil)
40-
}
41-
42-
func (dst *ClusterStatus) ConvertFrom(srcRaw conversion.Hub) error {
43-
src := srcRaw.(*bootstrapv1.ClusterStatus)
44-
return Convert_v1beta2_ClusterStatus_To_upstreamv1beta2_ClusterStatus(src, dst, nil)
45-
}
46-
4737
func (src *InitConfiguration) ConvertTo(dstRaw conversion.Hub) error {
4838
dst := dstRaw.(*bootstrapv1.InitConfiguration)
4939
return Convert_upstreamv1beta2_InitConfiguration_To_v1beta2_InitConfiguration(src, dst, nil)

bootstrap/kubeadm/types/upstreamv1beta2/conversion_test.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,6 @@ func TestFuzzyConversion(t *testing.T) {
4242
SkipSpokeAnnotationCleanup: true,
4343
FuzzerFuncs: []fuzzer.FuzzerFuncs{fuzzFuncs},
4444
}))
45-
t.Run("for ClusterStatus", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{
46-
Hub: &bootstrapv1.ClusterStatus{},
47-
Spoke: &ClusterStatus{},
48-
// NOTE: Kubeadm types does not have ObjectMeta, so we are required to skip data annotation cleanup in the spoke-hub-spoke round trip test.
49-
SkipSpokeAnnotationCleanup: true,
50-
FuzzerFuncs: []fuzzer.FuzzerFuncs{fuzzFuncs},
51-
}))
5245
t.Run("for InitConfiguration", utilconversion.FuzzTestFunc(utilconversion.FuzzTestFuncInput{
5346
Hub: &bootstrapv1.InitConfiguration{},
5447
Spoke: &InitConfiguration{},

bootstrap/kubeadm/types/upstreamv1beta2/types.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -196,18 +196,6 @@ type ImageMeta struct {
196196
//TODO: evaluate if we need also a ImageName based on user feedbacks
197197
}
198198

199-
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
200-
201-
// ClusterStatus contains the cluster status. The ClusterStatus will be stored in the kubeadm-config
202-
// ConfigMap in the cluster, and then updated by kubeadm when additional control plane instance joins or leaves the cluster.
203-
type ClusterStatus struct {
204-
metav1.TypeMeta `json:",inline"`
205-
206-
// APIEndpoints currently available in the cluster, one for each control plane/api server instance.
207-
// The key of the map is the IP of the host's default interface
208-
APIEndpoints map[string]APIEndpoint `json:"apiEndpoints"`
209-
}
210-
211199
// APIEndpoint struct contains elements of API server instance deployed on a node.
212200
type APIEndpoint struct {
213201
// AdvertiseAddress sets the IP address for the API server to advertise.

bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.conversion.go

Lines changed: 0 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bootstrap/kubeadm/types/upstreamv1beta2/zz_generated.deepcopy.go

Lines changed: 0 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)