Skip to content
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

🌱 Remove Kubeadm upstream v1beta1 types #9345

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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