Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new apigroup
Browse files Browse the repository at this point in the history
Signed-off-by: Vince Prignano <vincepri@vmware.com>
vincepri committed Jun 25, 2019

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent ae52102 commit 7b3ef39
Showing 53 changed files with 8,436 additions and 5,928 deletions.
15 changes: 3 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -102,11 +102,11 @@ generate-clientset: ## Generate a typed clientset
go run ./vendor/k8s.io/code-generator/cmd/client-gen/main.go \
--clientset-name clientset \
--input-base sigs.k8s.io/cluster-api/pkg/apis \
--input cluster/v1alpha2 \
--input cluster/v1alpha1,cluster/v1alpha2 \
--output-package sigs.k8s.io/cluster-api/pkg/client/clientset_generated \
--go-header-file=./hack/boilerplate/boilerplate.generatego.txt
go run ./vendor/k8s.io/code-generator/cmd/lister-gen/main.go \
--input-dirs sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha2 \
--input-dirs sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha1,sigs.k8s.io/cluster-api/pkg/apis/cluster/v1alpha2 \
--output-package sigs.k8s.io/cluster-api/pkg/client/listers_generated \
--go-header-file=./hack/boilerplate/boilerplate.generatego.txt
go run ./vendor/k8s.io/code-generator/cmd/informer-gen/main.go \
@@ -120,18 +120,9 @@ generate-clientset: ## Generate a typed clientset
generate-manifests: ## Generate manifests e.g. CRD, RBAC etc.
go run vendor/sigs.k8s.io/controller-tools/cmd/controller-gen/main.go \
paths=./pkg/... \
crd \
crd:trivialVersions=true \
rbac:roleName=manager-role \
output:crd:dir=./config/crds
## Hack for MachineClass. This type has been deprecated in v1alpha2.
## Generating the types with the above command results in an error during tests,
## specifically `per-version schemas may not all be set to identical values (top-level validation should be used instead)`.
## This might be a bug in controller-tools that generates a multi-version CRD where only a single version is available.
go run vendor/sigs.k8s.io/controller-tools/cmd/controller-gen/main.go \
paths=./pkg/apis/cluster/v1alpha1 \
crd:trivialVersions=true \
output:crd:dir=./config/crds-v1alpha1
cp -f ./config/crds-v1alpha1/cluster.k8s.io_machineclasses.yaml ./config/crds/
## Copy files in CI folders.
cp -f ./config/rbac/role*.yaml ./config/ci/rbac/
cp -f ./config/manager/manager*.yaml ./config/ci/manager/
1,406 changes: 470 additions & 936 deletions config/crds/cluster.k8s.io_clusters.yaml

Large diffs are not rendered by default.

2,590 changes: 836 additions & 1,754 deletions config/crds/cluster.k8s.io_machinedeployments.yaml

Large diffs are not rendered by default.

2,257 changes: 733 additions & 1,524 deletions config/crds/cluster.k8s.io_machines.yaml

Large diffs are not rendered by default.

2,483 changes: 801 additions & 1,682 deletions config/crds/cluster.k8s.io_machinesets.yaml

Large diffs are not rendered by default.

480 changes: 480 additions & 0 deletions config/crds/cluster.sigs.k8s.io_clusters.yaml

Large diffs are not rendered by default.

914 changes: 914 additions & 0 deletions config/crds/cluster.sigs.k8s.io_machinedeployments.yaml

Large diffs are not rendered by default.

799 changes: 799 additions & 0 deletions config/crds/cluster.sigs.k8s.io_machines.yaml

Large diffs are not rendered by default.

877 changes: 877 additions & 0 deletions config/crds/cluster.sigs.k8s.io_machinesets.yaml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pkg/apis/cluster/v1alpha2/cluster_types.go
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ import (
"sigs.k8s.io/cluster-api/pkg/apis/cluster/common"
)

const ClusterFinalizer = "cluster.cluster.k8s.io"
const ClusterFinalizer = "cluster.cluster.sigs.k8s.io"

// +genclient
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
2 changes: 1 addition & 1 deletion pkg/apis/cluster/v1alpha2/doc.go
Original file line number Diff line number Diff line change
@@ -19,5 +19,5 @@ limitations under the License.
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=sigs.k8s.io/cluster-api/pkg/apis/cluster
// +k8s:defaulter-gen=TypeMeta
// +groupName=cluster.k8s.io
// +groupName=cluster.sigs.k8s.io
package v1alpha2
6 changes: 3 additions & 3 deletions pkg/apis/cluster/v1alpha2/machine_types.go
Original file line number Diff line number Diff line change
@@ -25,13 +25,13 @@ import (

const (
// MachineFinalizer is set on PrepareForCreate callback.
MachineFinalizer = "machine.cluster.k8s.io"
MachineFinalizer = "machine.cluster.sigs.k8s.io"

// MachineClusterLabelName is the label set on machines linked to a cluster.
MachineClusterLabelName = "cluster.k8s.io/cluster-name"
MachineClusterLabelName = "cluster.sigs.k8s.io/cluster-name"

// MachineControlPlaneLabelName is the label set on machines part of a control plane.
MachineControlPlaneLabelName = "cluster.k8s.io/control-plane"
MachineControlPlaneLabelName = "cluster.sigs.k8s.io/control-plane"
)

// +genclient
6 changes: 3 additions & 3 deletions pkg/apis/cluster/v1alpha2/machineset_types.go
Original file line number Diff line number Diff line change
@@ -84,19 +84,19 @@ type MachineSetDeletePolicy string

const (
// RandomMachineSetDeletePolicy prioritizes both Machines that have the annotation
// "cluster.k8s.io/delete-machine=yes" and Machines that are unhealthy
// "cluster.sigs.k8s.io/delete-machine=yes" and Machines that are unhealthy
// (Status.ErrorReason or Status.ErrorMessage are set to a non-empty value).
// Finally, it picks Machines at random to delete.
RandomMachineSetDeletePolicy MachineSetDeletePolicy = "Random"

// NewestMachineSetDeletePolicy prioritizes both Machines that have the annotation
// "cluster.k8s.io/delete-machine=yes" and Machines that are unhealthy
// "cluster.sigs.k8s.io/delete-machine=yes" and Machines that are unhealthy
// (Status.ErrorReason or Status.ErrorMessage are set to a non-empty value).
// It then prioritizes the newest Machines for deletion based on the Machine's CreationTimestamp.
NewestMachineSetDeletePolicy MachineSetDeletePolicy = "Newest"

// OldestMachineSetDeletePolicy prioritizes both Machines that have the annotation
// "cluster.k8s.io/delete-machine=yes" and Machines that are unhealthy
// "cluster.sigs.k8s.io/delete-machine=yes" and Machines that are unhealthy
// (Status.ErrorReason or Status.ErrorMessage are set to a non-empty value).
// It then prioritizes the oldest Machines for deletion based on the Machine's CreationTimestamp.
OldestMachineSetDeletePolicy MachineSetDeletePolicy = "Oldest"
4 changes: 2 additions & 2 deletions pkg/apis/cluster/v1alpha2/register.go
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ limitations under the License.
// +k8s:deepcopy-gen=package,register
// +k8s:conversion-gen=sigs.k8s.io/cluster-api/pkg/apis/cluster
// +k8s:defaulter-gen=TypeMeta
// +groupName=cluster.k8s.io
// +groupName=cluster.sigs.k8s.io
package v1alpha2

import (
@@ -31,7 +31,7 @@ import (

var (
// SchemeGroupVersion is group version used to register these objects
SchemeGroupVersion = schema.GroupVersion{Group: "cluster.k8s.io", Version: "v1alpha2"}
SchemeGroupVersion = schema.GroupVersion{Group: "cluster.sigs.k8s.io", Version: "v1alpha2"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion}
1 change: 1 addition & 0 deletions pkg/client/clientset_generated/clientset/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ go_library(
importpath = "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset",
visibility = ["//visibility:public"],
deps = [
"//pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1:go_default_library",
"//pkg/client/clientset_generated/clientset/typed/cluster/v1alpha2:go_default_library",
"//vendor/k8s.io/client-go/discovery:go_default_library",
"//vendor/k8s.io/client-go/rest:go_default_library",
14 changes: 14 additions & 0 deletions pkg/client/clientset_generated/clientset/clientset.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions pkg/client/clientset_generated/clientset/fake/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -10,8 +10,11 @@ go_library(
importpath = "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/fake",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/cluster/v1alpha1:go_default_library",
"//pkg/apis/cluster/v1alpha2:go_default_library",
"//pkg/client/clientset_generated/clientset:go_default_library",
"//pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1:go_default_library",
"//pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1/fake:go_default_library",
"//pkg/client/clientset_generated/clientset/typed/cluster/v1alpha2:go_default_library",
"//pkg/client/clientset_generated/clientset/typed/cluster/v1alpha2/fake:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions pkg/client/clientset_generated/clientset/fake/register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@ go_library(
importpath = "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/scheme",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/cluster/v1alpha1:go_default_library",
"//pkg/apis/cluster/v1alpha2:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library",
2 changes: 2 additions & 0 deletions pkg/client/clientset_generated/clientset/scheme/register.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")

go_library(
name = "go_default_library",
srcs = [
"cluster.go",
"cluster_client.go",
"doc.go",
"generated_expansion.go",
"machine.go",
"machineclass.go",
"machinedeployment.go",
"machineset.go",
],
importpath = "sigs.k8s.io/cluster-api/pkg/client/clientset_generated/clientset/typed/cluster/v1alpha1",
visibility = ["//visibility:public"],
deps = [
"//pkg/apis/cluster/v1alpha1:go_default_library",
"//pkg/client/clientset_generated/clientset/scheme:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime/serializer:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/types:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/watch:go_default_library",
"//vendor/k8s.io/client-go/rest:go_default_library",
],
)
Loading

0 comments on commit 7b3ef39

Please sign in to comment.