Since the stop channels were replaced in e346475, the commentary is
incorrect and confusing.
Kubernetes-commit: 03be789851db6e0606b2d58c220d0cb40f127168
It seems valuable to be able to provide hand-written docs for these
first-level directories, and if don't want them, the generated doc.go
files are not actually very helpful.
This commit also adds new doc.go files for client-go listers/ and
informers/.
Kubernetes-commit: 95bf7b0afe9dd6a0f00125b1d290514a23e778e2
There should only be one source of truth for the API group's name and
version.
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
Kubernetes-commit: e13198ec6f52c4a6405388e90053954dc7656a31
It's clear that client-sets contain many versions of one group, so this
comment just seems to be out-dated.
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
Kubernetes-commit: 588f016c3bc04ea2da85d7077643677028a8cb1b
SharedInformerFactory starts goroutines in Start and those can be stopped by
closing the stop channel. However, there was no API that waits for the
goroutines.
This is a problem for unit testing. A test has to return while the informers
are still running, which may get flagged by tools like
https://github.com/uber-go/goleak or by klog/ktesting when those informers
lead to log output.
While at it, more documentation gets added to address
https://github.com/kubernetes/kubernetes/issues/65036.
Kubernetes-commit: e89d1d47e8365cad31600b17dab662d3c8a359dd
- Run hack/update-codegen.sh
- Run hack/update-generated-device-plugin.sh
- Run hack/update-generated-protobuf.sh
- Run hack/update-generated-runtime.sh
- Run hack/update-generated-swagger-docs.sh
- Run hack/update-openapi-spec.sh
- Run hack/update-gofmt.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
Kubernetes-commit: a9593d634c6a053848413e600dadbf974627515f
Clarifies that requesting no conversion is part of the codec factory, and
future refactors will make the codec factory less opionated about conversion.
Kubernetes-commit: 7f9dfe58f4cbe1e1b9e80f52addff70bac87bed4
Not every object kind can be registered via tracker .Add() called as
part of SimpleClientset initialization. This is because .Add() relies
on UnsafeGuessKindToResource to convert object kinds into resource
type names, which is broken for some resources. An example of an
affected kind is NetworkAttachmentDefinitions CRD that uses
network-attachment-definitions as its resource type name. When
UnsafeGuessKindToResource is called for this kind, it returns
networkattachmentdefinitions (without dashes).
As per the comment inside .Add, kinds affected by
UnsafeGuessKindToResource deficiencies should instead register objects
using tracker .Create() method. Problem is, current SimpleClientset
struct definition doesn't expose the object tracker in any way, which
makes it impossible to properly register these kinds at all.
To address the issue, this change modifies the definition of
SimpleClientset struct to expose the object tracker used via Tracker()
method.
Kubernetes-commit: d68cd8a0c7e6137ca4219078a3d651ecff03c21f
Adding blank line between comment tag and package name in doc.go. So
that the comment tags such as '+k8s:deepcopy-gen=package' do not show up
in GoDoc.
Kubernetes-commit: 61117761cd4a1b2e6ad9ff2d7eb915f3d2739dc6
- 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