![]() Automatic merge from submit-queue (batch tested with PRs 54199, 54181, 54196). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Update openapi to use kube-openapi code **What this PR does / why we need it**: OpenAPI code has moved to `github.com/kubernetes/kube-openapi`. Let's use that code as a dependency, since now it's duplicated. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #51823 **Special notes for your reviewer**: **Release note**: ```release-note NONE ``` No user visible changes. Just code moving around. Kubernetes-commit: 507790c9c6f50b580b4409b5ac93b10a24570819 |
||
---|---|---|
artifacts/examples | ||
Godeps | ||
hack | ||
pkg | ||
vendor | ||
BUILD | ||
controller.go | ||
LICENSE | ||
main.go | ||
OWNERS | ||
README.md |
sample-controller
This repository implements a simple controller for watching Foo resources as defined with a CustomResourceDefinition (CRD).
It makes use of the generators in k8s.io/code-generator
to generate a typed client, informers, listers and deep-copy functions. You can
do this yourself using the ./hack/update-codegen.sh
script.
The update-codegen
script will automatically generate the following files &
directories:
pkg/apis/samplecontroller/v1alpha1/zz_generated.deepcopy.go
pkg/client/
Changes should not be made to these files manually, and when creating your own
controller based off of this implementation you should not copy these files and
instead run the update-codegen
script to generate your own.
Purpose
This is an example of how to build a kube-like controller with a single type.
Compatibility
HEAD of this repository will match HEAD of k8s.io/apimachinery and k8s.io/client-go.
Where does it come from?
sample-controller
is synced from
https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/sample-controller.
Code changes are made in that location, merged into k8s.io/kubernetes and
later synced here.