cruise-automation / isopod

An expressive DSL and framework for Kubernetes configuration without YAML
Apache License 2.0
482 stars 32 forks source link

Encode version in api_group #87

Closed max0ne closed 3 years ago

max0ne commented 3 years ago

This proposes to pass in api version as postfix of the api_group parameter for kube.get and kube.delete. It's used for identifying objects when more than 1 version of an API resource is registered to kube_fake at runtime.

Example usage:

kube.get(customresourcedefinition="crd-v1", api_group="apiextensions.k8s.io/v1", wait="0s")

This does not break backward compatibility, api_group can still be used without version.

Added a tests: