Skip to content

Commit

Permalink
Remove Kubeadm upstream v1beta1 types
Browse files Browse the repository at this point in the history
Signed-off-by: killianmuldoon <kmuldoon@vmware.com>
  • Loading branch information
killianmuldoon committed Aug 31, 2023
1 parent a64d0b1 commit e02eeb0
Show file tree
Hide file tree
Showing 15 changed files with 4 additions and 2,488 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -444,9 +444,8 @@ generate-go-conversions-kubeadm-bootstrap: $(CONVERSION_GEN) ## Generate convers
--extra-peer-dirs=sigs.k8s.io/cluster-api/api/v1alpha4 \
--output-file-base=zz_generated.conversion $(CONVERSION_GEN_OUTPUT_BASE) \
--go-header-file=./hack/boilerplate/boilerplate.generatego.txt
$(MAKE) clean-generated-conversions SRC_DIRS="./bootstrap/kubeadm/types/upstreamv1beta1,./bootstrap/kubeadm/types/upstreamv1beta2,./bootstrap/kubeadm/types/upstreamv1beta3"
$(MAKE) clean-generated-conversions SRC_DIRS="./bootstrap/kubeadm/types/upstreamv1beta2,./bootstrap/kubeadm/types/upstreamv1beta3"
$(CONVERSION_GEN) \
--input-dirs=./bootstrap/kubeadm/types/upstreamv1beta1 \
--input-dirs=./bootstrap/kubeadm/types/upstreamv1beta2 \
--input-dirs=./bootstrap/kubeadm/types/upstreamv1beta3 \
--build-tag=ignore_autogenerated_kubeadm_types \
Expand Down
15 changes: 0 additions & 15 deletions bootstrap/kubeadm/api/v1alpha4/conversion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
runtimeserializer "k8s.io/apimachinery/pkg/runtime/serializer"

bootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1beta1"
"sigs.k8s.io/cluster-api/bootstrap/kubeadm/types/upstreamv1beta1"
utilconversion "sigs.k8s.io/cluster-api/util/conversion"
)

Expand All @@ -48,7 +47,6 @@ func TestFuzzyConversion(t *testing.T) {

func fuzzFuncs(_ runtimeserializer.CodecFactory) []interface{} {
return []interface{}{
clusterConfigurationFuzzer,
// This custom functions are needed when ConvertTo/ConvertFrom functions
// uses the json package to unmarshal the bootstrap token string.
//
Expand All @@ -59,24 +57,11 @@ func fuzzFuncs(_ runtimeserializer.CodecFactory) []interface{} {
//
// This function effectively disables any fuzzing for the token by setting
// the values for ID and Secret to working alphanumeric values.
kubeadmBootstrapTokenStringFuzzerV1UpstreamBeta1,
kubeadmBootstrapTokenStringFuzzerV1Beta1,
kubeadmBootstrapTokenStringFuzzerV1Alpha4,
}
}

func clusterConfigurationFuzzer(obj *upstreamv1beta1.ClusterConfiguration, c fuzz.Continue) {
c.FuzzNoCustom(obj)

// ClusterConfiguration.UseHyperKubeImage has been removed in v1alpha4, so setting it to false in order to avoid v1beta1 --> v1alpha4 --> v1beta1 round trip errors.
obj.UseHyperKubeImage = false
}

func kubeadmBootstrapTokenStringFuzzerV1UpstreamBeta1(in *upstreamv1beta1.BootstrapTokenString, _ fuzz.Continue) {
in.ID = fakeID
in.Secret = fakeSecret
}

func kubeadmBootstrapTokenStringFuzzerV1Beta1(in *bootstrapv1.BootstrapTokenString, _ fuzz.Continue) {
in.ID = fakeID
in.Secret = fakeSecret
Expand Down
89 changes: 0 additions & 89 deletions bootstrap/kubeadm/types/upstreamv1beta1/bootstraptokenstring.go

This file was deleted.

223 changes: 0 additions & 223 deletions bootstrap/kubeadm/types/upstreamv1beta1/bootstraptokenstring_test.go

This file was deleted.

Loading

0 comments on commit e02eeb0

Please sign in to comment.