Skip to content

Commit 740afa0

Browse files
committed
Add sample CustomResourceDefinition controller
sample-controller: add API types sample-controller: regenerate files sample-controller: add implementation sample-controller: update bazel sample-controller: update make-rules and cache_go_dirs sample-controller: Set noStatus tag. Remove openapi-gen tag. sample-controller: add deletion tombstone handling logic sample-controller: update README, remove use of reflect in UpdateFuncs sample-controller: add OWNERS file sample-controller: add LICENSE
1 parent aaec4e2 commit 740afa0

Some content is hidden

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

62 files changed

+4024
-1
lines changed

hack/.golint_failures

+8
Original file line numberDiff line numberDiff line change
@@ -778,6 +778,14 @@ staging/src/k8s.io/sample-apiserver/pkg/client/informers/internalversion/interna
778778
staging/src/k8s.io/sample-apiserver/pkg/cmd/server
779779
staging/src/k8s.io/sample-apiserver/pkg/registry/wardle/fischer
780780
staging/src/k8s.io/sample-apiserver/pkg/registry/wardle/flunder
781+
staging/src/k8s.io/sample-controller/pkg/apis/samplecontroller
782+
staging/src/k8s.io/sample-controller/pkg/apis/samplecontroller/v1alpha1
783+
staging/src/k8s.io/sample-controller/pkg/client/clientset/versioned
784+
staging/src/k8s.io/sample-controller/pkg/client/clientset/versioned/fake
785+
staging/src/k8s.io/sample-controller/pkg/client/clientset/versioned/scheme
786+
staging/src/k8s.io/sample-controller/pkg/client/clientset/versioned/typed/samplecontroller/v1alpha1
787+
staging/src/k8s.io/sample-controller/pkg/client/clientset/versioned/typed/samplecontroller/v1alpha1/fake
788+
staging/src/k8s.io/sample-controller/pkg/client/informers/externalversions/internalinterfaces
781789
test/e2e
782790
test/e2e/apimachinery
783791
test/e2e/apps

hack/make-rules/helpers/cache_go_dirs.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function kfind() {
3939
# include the "special" vendor directories which are actually part
4040
# of the Kubernetes source tree - generators will use these for
4141
# including certain core API concepts.
42-
find -H . ./vendor/k8s.io/apimachinery ./vendor/k8s.io/apiserver ./vendor/k8s.io/kube-aggregator ./vendor/k8s.io/apiextensions-apiserver ./vendor/k8s.io/metrics ./vendor/k8s.io/sample-apiserver ./vendor/k8s.io/api ./vendor/k8s.io/client-go ./vendor/k8s.io/code-generator \
42+
find -H . ./vendor/k8s.io/apimachinery ./vendor/k8s.io/apiserver ./vendor/k8s.io/kube-aggregator ./vendor/k8s.io/apiextensions-apiserver ./vendor/k8s.io/metrics ./vendor/k8s.io/sample-apiserver ./vendor/k8s.io/api ./vendor/k8s.io/client-go ./vendor/k8s.io/code-generator ./vendor/k8s.io/sample-controller \
4343
\( \
4444
-not \( \
4545
\( \

hack/update-codegen.sh

+1
Original file line numberDiff line numberDiff line change
@@ -125,5 +125,6 @@ ${informergen} \
125125
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/code-generator/hack/update-codegen.sh
126126
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/kube-aggregator/hack/update-codegen.sh
127127
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/sample-apiserver/hack/update-codegen.sh
128+
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/sample-controller/hack/update-codegen.sh
128129
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/apiextensions-apiserver/hack/update-codegen.sh
129130
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/metrics/hack/update-codegen.sh

hack/verify-codegen.sh

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ kube::golang::setup_env
3030
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/code-generator/hack/verify-codegen.sh
3131
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/kube-aggregator/hack/verify-codegen.sh
3232
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/sample-apiserver/hack/verify-codegen.sh
33+
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/sample-controller/hack/verify-codegen.sh
3334
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/apiextensions-apiserver/hack/verify-codegen.sh
3435
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/metrics/hack/verify-codegen.sh
3536

staging/BUILD

+1
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ filegroup(
208208
"//staging/src/k8s.io/metrics/pkg/client/clientset_generated/clientset:all-srcs",
209209
"//staging/src/k8s.io/metrics/pkg/client/custom_metrics:all-srcs",
210210
"//staging/src/k8s.io/sample-apiserver:all-srcs",
211+
"//staging/src/k8s.io/sample-controller:all-srcs",
211212
],
212213
tags = ["automanaged"],
213214
)
+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")
2+
3+
go_library(
4+
name = "go_default_library",
5+
srcs = [
6+
"controller.go",
7+
"main.go",
8+
],
9+
importpath = "k8s.io/sample-controller",
10+
visibility = ["//visibility:private"],
11+
deps = [
12+
"//vendor/github.com/golang/glog:go_default_library",
13+
"//vendor/k8s.io/api/apps/v1beta2:go_default_library",
14+
"//vendor/k8s.io/api/core/v1:go_default_library",
15+
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
16+
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
17+
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
18+
"//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library",
19+
"//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library",
20+
"//vendor/k8s.io/client-go/informers:go_default_library",
21+
"//vendor/k8s.io/client-go/kubernetes:go_default_library",
22+
"//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library",
23+
"//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library",
24+
"//vendor/k8s.io/client-go/listers/apps/v1beta2:go_default_library",
25+
"//vendor/k8s.io/client-go/tools/cache:go_default_library",
26+
"//vendor/k8s.io/client-go/tools/clientcmd:go_default_library",
27+
"//vendor/k8s.io/client-go/tools/record:go_default_library",
28+
"//vendor/k8s.io/client-go/util/workqueue:go_default_library",
29+
"//vendor/k8s.io/sample-controller/pkg/apis/samplecontroller/v1alpha1:go_default_library",
30+
"//vendor/k8s.io/sample-controller/pkg/client/clientset/versioned:go_default_library",
31+
"//vendor/k8s.io/sample-controller/pkg/client/clientset/versioned/scheme:go_default_library",
32+
"//vendor/k8s.io/sample-controller/pkg/client/informers/externalversions:go_default_library",
33+
"//vendor/k8s.io/sample-controller/pkg/client/listers/samplecontroller/v1alpha1:go_default_library",
34+
"//vendor/k8s.io/sample-controller/pkg/signals:go_default_library",
35+
],
36+
)
37+
38+
go_binary(
39+
name = "sample-controller",
40+
importpath = "k8s.io/sample-controller",
41+
library = ":go_default_library",
42+
visibility = ["//visibility:public"],
43+
)
44+
45+
filegroup(
46+
name = "package-srcs",
47+
srcs = glob(["**"]),
48+
tags = ["automanaged"],
49+
visibility = ["//visibility:private"],
50+
)
51+
52+
filegroup(
53+
name = "all-srcs",
54+
srcs = [
55+
":package-srcs",
56+
"//staging/src/k8s.io/sample-controller/pkg/apis/samplecontroller:all-srcs",
57+
"//staging/src/k8s.io/sample-controller/pkg/client/clientset/versioned:all-srcs",
58+
"//staging/src/k8s.io/sample-controller/pkg/client/informers/externalversions:all-srcs",
59+
"//staging/src/k8s.io/sample-controller/pkg/client/listers/samplecontroller/v1alpha1:all-srcs",
60+
"//staging/src/k8s.io/sample-controller/pkg/signals:all-srcs",
61+
],
62+
tags = ["automanaged"],
63+
visibility = ["//visibility:public"],
64+
)

0 commit comments

Comments
 (0)