Skip to content

Commit

Permalink
Add sample CustomResourceDefinition controller
Browse files Browse the repository at this point in the history
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
  • Loading branch information
munnerz committed Oct 18, 2017
1 parent aaec4e2 commit 740afa0
Show file tree
Hide file tree
Showing 62 changed files with 4,024 additions and 1 deletion.
8 changes: 8 additions & 0 deletions hack/.golint_failures
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,14 @@ staging/src/k8s.io/sample-apiserver/pkg/client/informers/internalversion/interna
staging/src/k8s.io/sample-apiserver/pkg/cmd/server
staging/src/k8s.io/sample-apiserver/pkg/registry/wardle/fischer
staging/src/k8s.io/sample-apiserver/pkg/registry/wardle/flunder
staging/src/k8s.io/sample-controller/pkg/apis/samplecontroller
staging/src/k8s.io/sample-controller/pkg/apis/samplecontroller/v1alpha1
staging/src/k8s.io/sample-controller/pkg/client/clientset/versioned
staging/src/k8s.io/sample-controller/pkg/client/clientset/versioned/fake
staging/src/k8s.io/sample-controller/pkg/client/clientset/versioned/scheme
staging/src/k8s.io/sample-controller/pkg/client/clientset/versioned/typed/samplecontroller/v1alpha1
staging/src/k8s.io/sample-controller/pkg/client/clientset/versioned/typed/samplecontroller/v1alpha1/fake
staging/src/k8s.io/sample-controller/pkg/client/informers/externalversions/internalinterfaces
test/e2e
test/e2e/apimachinery
test/e2e/apps
Expand Down
2 changes: 1 addition & 1 deletion hack/make-rules/helpers/cache_go_dirs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function kfind() {
# include the "special" vendor directories which are actually part
# of the Kubernetes source tree - generators will use these for
# including certain core API concepts.
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 \
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 \
\( \
-not \( \
\( \
Expand Down
1 change: 1 addition & 0 deletions hack/update-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,6 @@ ${informergen} \
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/code-generator/hack/update-codegen.sh
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/kube-aggregator/hack/update-codegen.sh
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/sample-apiserver/hack/update-codegen.sh
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/sample-controller/hack/update-codegen.sh
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/apiextensions-apiserver/hack/update-codegen.sh
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/metrics/hack/update-codegen.sh
1 change: 1 addition & 0 deletions hack/verify-codegen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ kube::golang::setup_env
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/code-generator/hack/verify-codegen.sh
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/kube-aggregator/hack/verify-codegen.sh
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/sample-apiserver/hack/verify-codegen.sh
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/sample-controller/hack/verify-codegen.sh
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/apiextensions-apiserver/hack/verify-codegen.sh
CODEGEN_PKG=./vendor/k8s.io/code-generator vendor/k8s.io/metrics/hack/verify-codegen.sh

Expand Down
1 change: 1 addition & 0 deletions staging/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ filegroup(
"//staging/src/k8s.io/metrics/pkg/client/clientset_generated/clientset:all-srcs",
"//staging/src/k8s.io/metrics/pkg/client/custom_metrics:all-srcs",
"//staging/src/k8s.io/sample-apiserver:all-srcs",
"//staging/src/k8s.io/sample-controller:all-srcs",
],
tags = ["automanaged"],
)
64 changes: 64 additions & 0 deletions staging/src/k8s.io/sample-controller/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
load("@io_bazel_rules_go//go:def.bzl", "go_binary", "go_library")

go_library(
name = "go_default_library",
srcs = [
"controller.go",
"main.go",
],
importpath = "k8s.io/sample-controller",
visibility = ["//visibility:private"],
deps = [
"//vendor/github.com/golang/glog:go_default_library",
"//vendor/k8s.io/api/apps/v1beta2:go_default_library",
"//vendor/k8s.io/api/core/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/api/errors:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/runtime/schema:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/runtime:go_default_library",
"//vendor/k8s.io/apimachinery/pkg/util/wait:go_default_library",
"//vendor/k8s.io/client-go/informers:go_default_library",
"//vendor/k8s.io/client-go/kubernetes:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/scheme:go_default_library",
"//vendor/k8s.io/client-go/kubernetes/typed/core/v1:go_default_library",
"//vendor/k8s.io/client-go/listers/apps/v1beta2:go_default_library",
"//vendor/k8s.io/client-go/tools/cache:go_default_library",
"//vendor/k8s.io/client-go/tools/clientcmd:go_default_library",
"//vendor/k8s.io/client-go/tools/record:go_default_library",
"//vendor/k8s.io/client-go/util/workqueue:go_default_library",
"//vendor/k8s.io/sample-controller/pkg/apis/samplecontroller/v1alpha1:go_default_library",
"//vendor/k8s.io/sample-controller/pkg/client/clientset/versioned:go_default_library",
"//vendor/k8s.io/sample-controller/pkg/client/clientset/versioned/scheme:go_default_library",
"//vendor/k8s.io/sample-controller/pkg/client/informers/externalversions:go_default_library",
"//vendor/k8s.io/sample-controller/pkg/client/listers/samplecontroller/v1alpha1:go_default_library",
"//vendor/k8s.io/sample-controller/pkg/signals:go_default_library",
],
)

go_binary(
name = "sample-controller",
importpath = "k8s.io/sample-controller",
library = ":go_default_library",
visibility = ["//visibility:public"],
)

filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)

filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//staging/src/k8s.io/sample-controller/pkg/apis/samplecontroller:all-srcs",
"//staging/src/k8s.io/sample-controller/pkg/client/clientset/versioned:all-srcs",
"//staging/src/k8s.io/sample-controller/pkg/client/informers/externalversions:all-srcs",
"//staging/src/k8s.io/sample-controller/pkg/client/listers/samplecontroller/v1alpha1:all-srcs",
"//staging/src/k8s.io/sample-controller/pkg/signals:all-srcs",
],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
Loading

0 comments on commit 740afa0

Please sign in to comment.