From 9ba17c501ef1253ba4297471b6a0561b160ab978 Mon Sep 17 00:00:00 2001 From: Jan Chaloupka Date: Sun, 23 Dec 2018 15:57:27 +0100 Subject: [PATCH] Remove unused code under pkg/apis and pkg/apis/awsproviderconfig The project does not work with unversioned aws provider configs/specs. --- cmd/manager/main.go | 5 --- .../addtoscheme_awsproviderconfig_v1alpha1.go | 26 --------------- pkg/apis/apis.go | 33 ------------------- pkg/apis/awsproviderconfig/group.go | 18 ---------- 4 files changed, 82 deletions(-) delete mode 100644 pkg/apis/addtoscheme_awsproviderconfig_v1alpha1.go delete mode 100644 pkg/apis/apis.go delete mode 100644 pkg/apis/awsproviderconfig/group.go diff --git a/cmd/manager/main.go b/cmd/manager/main.go index cbb2bdc091..f94209cd22 100644 --- a/cmd/manager/main.go +++ b/cmd/manager/main.go @@ -20,7 +20,6 @@ import ( "github.com/golang/glog" _ "k8s.io/client-go/plugin/pkg/client/auth/gcp" machineactuator "sigs.k8s.io/cluster-api-provider-aws/pkg/actuators/machine" - "sigs.k8s.io/cluster-api-provider-aws/pkg/apis" "sigs.k8s.io/cluster-api-provider-aws/pkg/apis/awsproviderconfig/v1alpha1" awsclient "sigs.k8s.io/cluster-api-provider-aws/pkg/client" clusterapis "sigs.k8s.io/cluster-api/pkg/apis" @@ -48,10 +47,6 @@ func main() { glog.Info("Registering Components.") // Setup Scheme for all resources - if err := apis.AddToScheme(mgr.GetScheme()); err != nil { - glog.Fatal(err) - } - if err := clusterapis.AddToScheme(mgr.GetScheme()); err != nil { glog.Fatal(err) } diff --git a/pkg/apis/addtoscheme_awsproviderconfig_v1alpha1.go b/pkg/apis/addtoscheme_awsproviderconfig_v1alpha1.go deleted file mode 100644 index f1dbfcd46d..0000000000 --- a/pkg/apis/addtoscheme_awsproviderconfig_v1alpha1.go +++ /dev/null @@ -1,26 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package apis - -import ( - "sigs.k8s.io/cluster-api-provider-aws/pkg/apis/awsproviderconfig/v1alpha1" -) - -func init() { - // Register the types with the Scheme so the components can map objects to GroupVersionKinds and back - AddToSchemes = append(AddToSchemes, v1alpha1.SchemeBuilder.AddToScheme) -} diff --git a/pkg/apis/apis.go b/pkg/apis/apis.go deleted file mode 100644 index cc8034a1cd..0000000000 --- a/pkg/apis/apis.go +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Generate deepcopy for apis -//go:generate go run ../../vendor/k8s.io/code-generator/cmd/deepcopy-gen/main.go -O zz_generated.deepcopy -i ./... -h ../../hack/boilerplate.go.txt - -// Package apis contains Kubernetes API groups. -package apis - -import ( - "k8s.io/apimachinery/pkg/runtime" -) - -// AddToSchemes may be used to add all resources defined in the project to a Scheme -var AddToSchemes runtime.SchemeBuilder - -// AddToScheme adds all Resources to the Scheme -func AddToScheme(s *runtime.Scheme) error { - return AddToSchemes.AddToScheme(s) -} diff --git a/pkg/apis/awsproviderconfig/group.go b/pkg/apis/awsproviderconfig/group.go deleted file mode 100644 index 77819463ac..0000000000 --- a/pkg/apis/awsproviderconfig/group.go +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright 2018 The Kubernetes Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -// Package awsproviderconfig contains awsproviderconfig API versions -package awsproviderconfig