python
python copied to clipboard
Implement base class for Kubernetes model classes
This is a feature request. Most of the Kubernetes objects have a set of fields in common:
- kind
- apiVersion
- metadata
- spec
Currently the various model classes all inherit from object
. Is there a way to implement a base class for all k8s resources and have all the models extend that?
It'd also be nice to have utils.parse_from_yaml(yaml_file)
that just parses a YAML file into the correct model (no API requests at all). I'm not sure how the models are generated, but I suspect it may be related to this analogous java client issue.