-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for dynamic informers to kubernetes client #3228
Comments
rohanKanojia
added a commit
to rohanKanojia/kubernetes-client
that referenced
this issue
Jun 9, 2021
…ient Introduce a new method in SharedInformerFactory which will only accept CustomResourceDefinitionContext, types would automatically be assumed to be GenericKubernetesResource and GenericKubernetesResourceList. Till now we were deciding whether a resource is namespaced or not depending upon whether it implements Namespaced interface or not. But having dynamic informers required change to consider `scope` field in CustomResourceDefinitionContext as well, hence I introduced a new class SharedInformerOperationsImpl which overrides `isResourceNamespaced()` so that it can be configured from calling methods.
rohanKanojia
added a commit
to rohanKanojia/kubernetes-client
that referenced
this issue
Jun 9, 2021
…ient Introduce a new method in SharedInformerFactory which will only accept CustomResourceDefinitionContext, types would automatically be assumed to be GenericKubernetesResource and GenericKubernetesResourceList. Till now we were deciding whether a resource is namespaced or not depending upon whether it implements Namespaced interface or not. But having dynamic informers required change to consider `scope` field in CustomResourceDefinitionContext as well, hence I introduced a new class SharedInformerOperationsImpl which overrides `isResourceNamespaced()` so that it can be configured from calling methods.
11 tasks
rohanKanojia
added a commit
to rohanKanojia/kubernetes-client
that referenced
this issue
Jun 9, 2021
…ient Introduce a new method in SharedInformerFactory which will only accept CustomResourceDefinitionContext, types would automatically be assumed to be GenericKubernetesResource and GenericKubernetesResourceList. Till now we were deciding whether a resource is namespaced or not depending upon whether it implements Namespaced interface or not. But having dynamic informers required change to consider `scope` field in CustomResourceDefinitionContext as well, hence I introduced a new class SharedInformerOperationsImpl which overrides `isResourceNamespaced()` so that it can be configured from calling methods.
rohanKanojia
added a commit
to rohanKanojia/kubernetes-client
that referenced
this issue
Jun 10, 2021
…ient Introduce a new method in SharedInformerFactory which will only accept CustomResourceDefinitionContext, types would automatically be assumed to be GenericKubernetesResource and GenericKubernetesResourceList. Till now we were deciding whether a resource is namespaced or not depending upon whether it implements Namespaced interface or not. But having dynamic informers required change to consider `scope` field in CustomResourceDefinitionContext as well, hence I introduced a new class SharedInformerOperationsImpl which overrides `isResourceNamespaced()` so that it can be configured from calling methods.
rohanKanojia
added a commit
to rohanKanojia/kubernetes-client
that referenced
this issue
Jun 15, 2021
…ient Introduce a new method in SharedInformerFactory which will only accept CustomResourceDefinitionContext, types would automatically be assumed to be GenericKubernetesResource and GenericKubernetesResourceList. Till now we were deciding whether a resource is namespaced or not depending upon whether it implements Namespaced interface or not. But having dynamic informers required change to consider `scope` field in CustomResourceDefinitionContext as well, hence I introduced a new class SharedInformerOperationsImpl which overrides `isResourceNamespaced()` so that it can be configured from calling methods.
manusa
pushed a commit
that referenced
this issue
Jun 15, 2021
Introduce a new method in SharedInformerFactory which will only accept CustomResourceDefinitionContext, types would automatically be assumed to be GenericKubernetesResource and GenericKubernetesResourceList. Till now we were deciding whether a resource is namespaced or not depending upon whether it implements Namespaced interface or not. But having dynamic informers required change to consider `scope` field in CustomResourceDefinitionContext as well, hence I introduced a new class SharedInformerOperationsImpl which overrides `isResourceNamespaced()` so that it can be configured from calling methods.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With introduction of GenericKuberntesResource(equivalent of Unstructured[0] in golang client), we should now able to support dynamic informers[1] with
SharedIndexInformer.sharedIndexInformerForCustomResource
accepting CustomResourceDefinitionContext.With just this minor change I was able to get below code working:
Dynamic Informer Sample I tested:
[0] https://github.com/kubernetes/apimachinery/blob/master/pkg/apis/meta/v1/unstructured/unstructured.go#L41
[1] https://firehydrant.io/blog/dynamic-kubernetes-informers/
The text was updated successfully, but these errors were encountered: