- Update CRDs (crd.yaml, crd-status-subresource.yaml) to match requirements of current release
- Add `versions` field and structures `schema` as made mandatory in apiextensions/v1
- Add annotation for api-approved.kubernetes.io since CRD is under *k8s.io domain
- Delete crd-validation.yaml since structured schema is mandatory in v1
- Update README
Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
Kubernetes-commit: fd0ac9c8d169169c8072639970565cda9fb9499a
The guide in doc causes an error
```
$ go run *.go -kubeconfig=$HOME/.kube/config
go run: cannot run *_test.go files (controller_test.go)
```
Kubernetes-commit: 9bb3bf2e78473ace1cbb85512785c2ba4507bc9b
**What this PR does / why we need it**:
The sample-controller makes extensive use of various mechanisms
available in the client-go library. For writing custom controllers/operators
it will be helpful if there is precise description of how the
client-go library works and how/where it interfaces with
custom controller code.
This patch adds documentation that sheds light on how (parts) of the
client-go library work and its interaction-points with
controller code. The documentation and the diagram comes from [1],
(link included here for reference purpose).
[1] https://medium.com/@cloudark/kubernetes-custom-controllers-b6c7d0668fdf
Contributing the diagram and the writeup was recommended by
by @sttts and @nikhita on https://github.com/kubernetes/sample-controller/issues/13
**Release note**:
```release-note
NONE
```
Kubernetes-commit: 3e22383a8a14eb3bd02630f3f11c0ad7a806e027
- Add an example to show how to use status subresources
with custom resources.
- Update the comment in the controller to mention that
`UpdateStatus` can now be used.
- Generate `UpdateStatus` for Foo.
- Update the README to remove feature gate information for
CRD validation since the current example requires a v1.9
cluster and it is enabled by default.
- Update the README to add feature gate information for
CustomResourceSubResources.
Kubernetes-commit: 7c06d6fb17ee46f587c1facff93b9bb185522855
The sample-controller uses apps/v1 deployments
since they became GA in 1.9. This means that
sample-controller does not support versions below 1.9.
Kubernetes-commit: 1fd07e197803d0d98bba7d7caa1e5111abd12d6b
- add usage instructions
- add Use Cases, Defining Types and Clean Up section. Copied
from apiextensions-apiserver/examples/client-go. This is done
to be consistent with all other examples.
- fix formatting
Kubernetes-commit: cdcc6ac3751ab7b04bda5bcd5fc82d236d940cc5
We should use the staging files instead of having some files
authoritative in the external repo. Otherwise, we complicate the
publishing process as it has to know which files come from the latter.
`README.md` and `LICENSE` are authoritative in external repos.
We should move them to staging.