Automatic merge from submit-queue. 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>.
sample-controller: add example CRD controller
**What this PR does / why we need it**:
Adds a sample-controller example repository
fixes#52752
**Special notes for your reviewer**:
This is currently based on the sttts:sttts-codegen-scripts branch and should not be merged until that is (ref https://github.com/kubernetes/kubernetes/pull/52186)
**Release note**:
```
Add sample-controller repository
```
/cc @sttts @nikhita @colemickens
Kubernetes-commit: 9a7800f7d2efb88b397674672ac56f898826cf7c
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.
- 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
Added unit tests.
Changed NewController function to accept informers and not informers
factory. This make code more testable and align it with other
controllers.
Kubernetes-commit: a29a1cbb955e993300c9388a218a4f323f3fdf8f