Documentation ¶
Index ¶
- func GVKToGVR(gvk schema.GroupVersionKind) schema.GroupVersionResource
- func GVRToGVK(gvr schema.GroupVersionResource) schema.GroupVersionKind
- func KindToResource(kind string) string
- func ResourceToKind(resource string) string
- func YamlOrJsonToObject(data []byte) (runtime.Object, *schema.GroupVersionKind, error)
- func YamlToJson(yamlData []byte) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GVKToGVR ¶
func GVKToGVR(gvk schema.GroupVersionKind) schema.GroupVersionResource
GVKToGVR convert schema.GroupVersionKind to schema.GroupVersionResource.
func GVRToGVK ¶
func GVRToGVK(gvr schema.GroupVersionResource) schema.GroupVersionKind
GVRToGVK convert schema.GroupVersionResource to schema.GroupVersionKind.
func KindToResource ¶
KindToResource convert k8s kind name to k8s resource name. like:
KindToResource(Pod) --> pods KindToResource(Ingress) -> ingresses
func ResourceToKind ¶
ResourceToKind convert k8s resource name to k8s kind name. like:
ResourceToKind(pods) -> Pod ResourceToKind(networkpolicies) -> NetworkPolicy
func YamlOrJsonToObject ¶ added in v0.11.0
YamlOrJsonToObject will decode yaml/json documents to runtime.Object and GroupVersionKind.
func YamlToJson ¶ added in v0.11.0
YamlToJson convert yaml documents to json documents, and those are k8s resources.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.