Skip to content

Commit d88d6af

Browse files
committed
Move v1alpha1 types to deprecated folder
Signed-off-by: Vince Prignano <[email protected]>
1 parent 53f2e0e commit d88d6af

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+770
-120
lines changed

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ The machine controller should be able to act on a subset of machines that form a
6565
### Resources
6666

6767
* [Cluster Management API KEP](https://github.com/kubernetes/enhancements/blob/master/keps/sig-cluster-lifecycle/0003-cluster-api.md)
68-
* [Cluster type](https://github.com/kubernetes-sigs/cluster-api/blob/master/pkg/apis/cluster/v1alpha1/cluster_types.go#L40)
69-
* [Machine type](https://github.com/kubernetes-sigs/cluster-api/blob/master/pkg/apis/cluster/v1alpha1/machine_types.go#L42)
68+
* [Cluster type](https://github.com/kubernetes-sigs/cluster-api/blob/master/pkg/apis/deprecated/v1alpha1/cluster_types.go#L40)
69+
* [Machine type](https://github.com/kubernetes-sigs/cluster-api/blob/master/pkg/apis/deprecated/v1alpha1/machine_types.go#L42)
7070

7171
### Boostrapping
7272

Makefile

+3-3
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ generate-clientset: ## Generate a typed clientset
102102
go run ./vendor/k8s.io/code-generator/cmd/client-gen/main.go \
103103
--clientset-name clientset \
104104
--input-base sigs.k8s.io/cluster-api/pkg/apis \
105-
--input cluster/v1alpha1,cluster/v1alpha2 \
105+
--input deprecated/v1alpha1,cluster/v1alpha2 \
106106
--output-package sigs.k8s.io/cluster-api/pkg/client/clientset_generated \
107107
--go-header-file=./hack/boilerplate/boilerplate.generatego.txt
108108
go run ./vendor/k8s.io/code-generator/cmd/lister-gen/main.go \
109-
--input-dirs sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1,sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha2 \
109+
--input-dirs sigs.k8s.io/cluster-api/pkg/apis/deprecated/v1alpha1,sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha2 \
110110
--output-package sigs.k8s.io/cluster-api/pkg/client/listers_generated \
111111
--go-header-file=./hack/boilerplate/boilerplate.generatego.txt
112112
go run ./vendor/k8s.io/code-generator/cmd/informer-gen/main.go \
113-
--input-dirs sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1,sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha2 \
113+
--input-dirs sigs.k8s.io/cluster-api/pkg/apis/deprecated/v1alpha1,sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha2 \
114114
--versioned-clientset-package sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset \
115115
--listers-package sigs.k8s.io/cluster-api/pkg/client/listers_generated \
116116
--output-package sigs.k8s.io/cluster-api/pkg/client/informers_generated \

docs/book/common_code/cluster_controller.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ it's name, namespace, labels, and annotations, etc. `ObjectMeta` contains data
2424
common to most objects.
2525

2626
{% sample lang="go" %}
27-
[import:'Cluster'](../../../pkg/apis/cluster/v1alpha1/cluster_types.go)
27+
[import:'Cluster'](../../../pkg/apis/deprecated/v1alpha1/cluster_types.go)
2828
{% endmethod %}
2929

3030
{% method %}
@@ -40,7 +40,7 @@ API definitions are meant to live outside of the Cluster API, which will allow
4040
them to evolve independently of it.
4141

4242
{% sample lang="go" %}
43-
[import:'ClusterSpec'](../../../pkg/apis/cluster/v1alpha1/cluster_types.go)
43+
[import:'ClusterSpec'](../../../pkg/apis/deprecated/v1alpha1/cluster_types.go)
4444
{% endmethod %}
4545

4646
{% method %}
@@ -64,7 +64,7 @@ https://github.com/kubernetes-sigs/cluster-api-provider-gcp/blob/f3145d8810a5c7f
6464
used in practice.
6565

6666
{% sample lang="go" %}
67-
[import:'ClusterStatus'](../../../pkg/apis/cluster/v1alpha1/cluster_types.go)
67+
[import:'ClusterStatus'](../../../pkg/apis/deprecated/v1alpha1/cluster_types.go)
6868
{% endmethod %}
6969

7070
{% method %}
@@ -93,7 +93,7 @@ If a `Cluster` resource is deleted, the controller will call the actuator's
9393
- If the `Delete()` method returns true, remove the finalizer, we're done.
9494
- If the `Cluster` has not been deleted, call the `Reconcile()` method.
9595

96-
[cluster_source]: https://github.com/kubernetes-sigs/cluster-api/blob/master/pkg/apis/cluster/v1alpha1/cluster_types.go
96+
[cluster_source]: https://github.com/kubernetes-sigs/cluster-api/blob/master/pkg/apis/deprecated/v1alpha1/cluster_types.go
9797

9898
#### cluster object reconciliation logic
9999

docs/book/common_code/machine_controller.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ example, it's name, namespace, labels, and annotations, etc. `ObjectMeta`
3737
contains data common to most objects.
3838

3939
{% sample lang="go" %}
40-
[import:'Machine'](../../../pkg/apis/cluster/v1alpha1/machine_types.go)
40+
[import:'Machine'](../../../pkg/apis/deprecated/v1alpha1/machine_types.go)
4141
{% endmethod %}
4242

4343
{% method %}
@@ -62,7 +62,7 @@ command does this [here](https://github.com/kubernetes-sigs/cluster-api/blob/a30
6262
```
6363

6464
{% sample lang="go" %}
65-
[import:'MachineSpec'](../../../pkg/apis/cluster/v1alpha1/machine_types.go)
65+
[import:'MachineSpec'](../../../pkg/apis/deprecated/v1alpha1/machine_types.go)
6666
{% endmethod %}
6767

6868
{% method %}
@@ -82,7 +82,7 @@ these providers a `Machine` and it's corresponding `Node` may never be within
8282
the same cluster. **TODO**: There are open issues to address this.
8383

8484
{% sample lang="go" %}
85-
[import:'MachineStatus'](../../../pkg/apis/cluster/v1alpha1/machine_types.go)
85+
[import:'MachineStatus'](../../../pkg/apis/deprecated/v1alpha1/machine_types.go)
8686
{% endmethod %}
8787

8888
{% method %}
@@ -156,4 +156,4 @@ There are two consequences of this:
156156
[^1] One reason a `Machine` may not be deleted is if it corresponds to the
157157
node running the Machine controller.
158158

159-
[machine_types_source]: https://github.com/kubernetes-sigs/cluster-api/blob/master/pkg/apis/cluster/v1alpha1/machine_types.go
159+
[machine_types_source]: https://github.com/kubernetes-sigs/cluster-api/blob/master/pkg/apis/deprecated/v1alpha1/machine_types.go

docs/book/common_code/machinedeployment_controller.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,36 @@
44
## MachineDeployment
55

66
{% sample lang="go" %}
7-
[import:'MachineDeployment'](../../../pkg/apis/cluster/v1alpha1/machinedeployment_types.go)
7+
[import:'MachineDeployment'](../../../pkg/apis/deprecated/v1alpha1/machinedeployment_types.go)
88
{% endmethod %}
99

1010
{% method %}
1111
## MachineDeploymentSpec
1212

1313
{% sample lang="go" %}
14-
[import:'MachineDeploymentSpec'](../../../pkg/apis/cluster/v1alpha1/machinedeployment_types.go)
14+
[import:'MachineDeploymentSpec'](../../../pkg/apis/deprecated/v1alpha1/machinedeployment_types.go)
1515
{% endmethod %}
1616

1717
{% method %}
1818
## MachineDeploymentStrategy
1919

2020
{% sample lang="go" %}
21-
[import:'MachineDeploymentStrategy'](../../../pkg/apis/cluster/v1alpha1/machinedeployment_types.go)
21+
[import:'MachineDeploymentStrategy'](../../../pkg/apis/deprecated/v1alpha1/machinedeployment_types.go)
2222
{% endmethod %}
2323

2424
{% method %}
2525
## MachineRollingUpdateDeployment
2626

2727
{% sample lang="go" %}
28-
[import:'MachineRollingUpdateDeployment'](../../../pkg/apis/cluster/v1alpha1/machinedeployment_types.go)
28+
[import:'MachineRollingUpdateDeployment'](../../../pkg/apis/deprecated/v1alpha1/machinedeployment_types.go)
2929
{% endmethod %}
3030

3131
{% method %}
3232

3333
## MachineDeploymentStatus
3434

3535
{% sample lang="go" %}
36-
[import:'MachineDeploymentStatus'](../../../pkg/apis/cluster/v1alpha1/machinedeployment_types.go)
36+
[import:'MachineDeploymentStatus'](../../../pkg/apis/deprecated/v1alpha1/machinedeployment_types.go)
3737
{% endmethod %}
3838

3939
## MachineDeployment Controller Semantics

docs/book/common_code/machineset_controller.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,35 @@
22

33
`MachineSet`s are currently different from `Cluster` and `Machine` resources in
44
that they do not define an actuator interface. They are generic controllers
5-
which implement their intent by modifying provider-specific `Cluster` and
5+
which implement their intent by modifying provider-specific `Cluster` and
66
`Machine` resources.
77

88
{% method %}
99
## MachineSet
1010

1111
{% sample lang="go" %}
12-
[import:'MachineSet'](../../../pkg/apis/cluster/v1alpha1/machineset_types.go)
12+
[import:'MachineSet'](../../../pkg/apis/deprecated/v1alpha1/machineset_types.go)
1313
{% endmethod %}
1414

1515
{% method %}
1616
## MachineSetSpec
1717

1818
{% sample lang="go" %}
19-
[import:'MachineSetSpec'](../../../pkg/apis/cluster/v1alpha1/machineset_types.go)
19+
[import:'MachineSetSpec'](../../../pkg/apis/deprecated/v1alpha1/machineset_types.go)
2020
{% endmethod %}
2121

2222
{% method %}
2323
## MachineSetTemplateSpec
2424

2525
{% sample lang="go" %}
26-
[import:'MachineSetTemplateSpec'](../../../pkg/apis/cluster/v1alpha1/machineset_types.go)
26+
[import:'MachineSetTemplateSpec'](../../../pkg/apis/deprecated/v1alpha1/machineset_types.go)
2727
{% endmethod %}
2828

2929
{% method %}
3030
## MachineSetStatus
3131

3232
{% sample lang="go" %}
33-
[import:'MachineSetStatus'](../../../pkg/apis/cluster/v1alpha1/machineset_types.go)
33+
[import:'MachineSetStatus'](../../../pkg/apis/deprecated/v1alpha1/machineset_types.go)
3434
{% endmethod %}
3535

3636
## MachineSet Controller Semantics

docs/proposals/20181121-machine-api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,4 +129,4 @@ revisit the specifics when new patterns start to emerge in core.
129129

130130
## Types
131131

132-
Please see the full types [here](https://github.com/kubernetes-sigs/cluster-api/blob/master/pkg/apis/cluster/v1alpha1/machine_types.go).
132+
Please see the full types [here](https://github.com/kubernetes-sigs/cluster-api/blob/master/pkg/apis/deprecated/v1alpha1/machine_types.go).

pkg/apis/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ go_library(
1010
importpath = "sigs.k8s.io/cluster-api/pkg/apis",
1111
visibility = ["//visibility:public"],
1212
deps = [
13-
"//pkg/apis/cluster/v1alpha1:go_default_library",
1413
"//pkg/apis/cluster/v1alpha2:go_default_library",
14+
"//pkg/apis/deprecated/v1alpha1:go_default_library",
1515
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
1616
],
1717
)

pkg/apis/addtoscheme_cluster_v1alpha1.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ limitations under the License.
1717
package apis
1818

1919
import (
20-
"sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1"
20+
"sigs.k8s.io/cluster-api/pkg/apis/deprecated/v1alpha1"
2121
)
2222

2323
func init() {

pkg/apis/deprecated/BUILD.bazel

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
load("@io_bazel_rules_go//go:def.bzl", "go_library")
2+
3+
go_library(
4+
name = "go_default_library",
5+
srcs = ["group.go"],
6+
importpath = "sigs.k8s.io/cluster-api/pkg/apis/deprecated",
7+
visibility = ["//visibility:public"],
8+
)

pkg/apis/deprecated/group.go

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
Copyright 2018 The Kubernetes Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
// Package cluster contains cluster API versions
18+
package deprecated

pkg/apis/cluster/v1alpha1/BUILD.bazel renamed to pkg/apis/deprecated/v1alpha1/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ go_library(
1414
"register.go",
1515
"zz_generated.deepcopy.go",
1616
],
17-
importpath = "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1",
17+
importpath = "sigs.k8s.io/cluster-api/pkg/apis/deprecated/v1alpha1",
1818
visibility = ["//visibility:public"],
1919
deps = [
2020
"//pkg/apis/cluster/common:go_default_library",

pkg/apis/cluster/v1alpha1/doc.go renamed to pkg/apis/deprecated/v1alpha1/doc.go

+1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ limitations under the License.
2020
// +k8s:conversion-gen=sigs.k8s.io/cluster-api/pkg/apis/cluster
2121
// +k8s:defaulter-gen=TypeMeta
2222
// +groupName=cluster.k8s.io
23+
// +groupGoName=ClusterDeprecated
2324
package v1alpha1

pkg/apis/cluster/v1alpha1/register.go renamed to pkg/apis/deprecated/v1alpha1/register.go

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ limitations under the License.
2222
// +k8s:conversion-gen=sigs.k8s.io/cluster-api/pkg/apis/cluster
2323
// +k8s:defaulter-gen=TypeMeta
2424
// +groupName=cluster.k8s.io
25+
// +groupGoName=ClusterDeprecated
2526
package v1alpha1
2627

2728
import (

pkg/apis/cluster/v1alpha1/testutil/BUILD.bazel renamed to pkg/apis/deprecated/v1alpha1/testutil/BUILD.bazel

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
33
go_library(
44
name = "go_default_library",
55
srcs = ["testutil.go"],
6-
importpath = "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1/testutil",
6+
importpath = "sigs.k8s.io/cluster-api/pkg/apis/deprecated/v1alpha1/testutil",
77
visibility = ["//visibility:public"],
8-
deps = ["//pkg/apis/cluster/v1alpha1:go_default_library"],
8+
deps = ["//pkg/apis/deprecated/v1alpha1:go_default_library"],
99
)

pkg/apis/cluster/v1alpha1/testutil/testutil.go renamed to pkg/apis/deprecated/v1alpha1/testutil/testutil.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ limitations under the License.
1616

1717
package testutil
1818

19-
import "sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1"
19+
import "sigs.k8s.io/cluster-api/pkg/apis/deprecated/v1alpha1"
2020

2121
// GetVanillaCluster return a bare minimum functional cluster resource object
2222
func GetVanillaCluster() v1alpha1.Cluster {

pkg/client/clientset_generated/clientset/BUILD.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ go_library(
99
importpath = "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset",
1010
visibility = ["//visibility:public"],
1111
deps = [
12-
"//pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1:go_default_library",
1312
"//pkg/client/clientset_generated/clientset/typed/cluster/v1alpha2:go_default_library",
13+
"//pkg/client/clientset_generated/clientset/typed/deprecated/v1alpha1:go_default_library",
1414
"//vendor/k8s.io/client-go/discovery:go_default_library",
1515
"//vendor/k8s.io/client-go/rest:go_default_library",
1616
"//vendor/k8s.io/client-go/util/flowcontrol:go_default_library",

pkg/client/clientset_generated/clientset/clientset.go

+13-13
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/client/clientset_generated/clientset/fake/BUILD.bazel

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ go_library(
1010
importpath = "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake",
1111
visibility = ["//visibility:public"],
1212
deps = [
13-
"//pkg/apis/cluster/v1alpha1:go_default_library",
1413
"//pkg/apis/cluster/v1alpha2:go_default_library",
14+
"//pkg/apis/deprecated/v1alpha1:go_default_library",
1515
"//pkg/client/clientset_generated/clientset:go_default_library",
16-
"//pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1:go_default_library",
17-
"//pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake:go_default_library",
1816
"//pkg/client/clientset_generated/clientset/typed/cluster/v1alpha2:go_default_library",
1917
"//pkg/client/clientset_generated/clientset/typed/cluster/v1alpha2/fake:go_default_library",
18+
"//pkg/client/clientset_generated/clientset/typed/deprecated/v1alpha1:go_default_library",
19+
"//pkg/client/clientset_generated/clientset/typed/deprecated/v1alpha1/fake:go_default_library",
2020
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
2121
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
2222
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",

0 commit comments

Comments
 (0)