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 <[email protected]>
  • Loading branch information
killianmuldoon committed Sep 1, 2023
1 parent b3e0615 commit 6a9aa07
Show file tree
Hide file tree
Showing 17 changed files with 23 additions and 2,577 deletions.
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -447,9 +447,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 6a9aa07

Please sign in to comment.