kube

package
v1.12.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToUnstructured added in v1.9.0

func BytesToUnstructured(data []byte) (*unstructured.Unstructured, error)

BytesToUnstructured converts the resource to unstructured format

func CRDsInstalled added in v1.9.0

func CRDsInstalled(apiserverClient apiserver.Interface, names ...string) error

CRDsInstalled checks if the Kyverno CRDs are installed or not

func ContainsKind

func ContainsKind(list []string, kind string) bool

ContainsKind - check if kind is in list

func GetKindFromGVK

func GetKindFromGVK(str string) (string, string)

GetKindFromGVK - get kind and APIVersion from GVK

func GetObjectWithTombstone

func GetObjectWithTombstone(obj interface{}) interface{}

func GroupVersionMatches added in v1.9.0

func GroupVersionMatches(groupVersion, serverResourceGroupVersion string) bool

GroupVersionMatches - check if the given group version matches the server resource group version. If the group version contains a wildcard, it will match any version, but the group must match. Returns false if the supplied group version is empty, that condition should be checked before calling this function.

func HigherThanKubernetesVersion added in v1.9.0

func HigherThanKubernetesVersion(client discovery.ServerVersionInterface, log logr.Logger, major, minor, patch int) bool

HigherThanKubernetesVersion compare Kubernetes client version to user given version

func IsSubresource added in v1.9.0

func IsSubresource(resourceName string) bool

IsSubresource returns true if the resource is a subresource

func LabelSelectorContainsWildcard

func LabelSelectorContainsWildcard(v *metav1.LabelSelector) bool

func ObjToUnstructured added in v1.9.0

func ObjToUnstructured(obj interface{}) (*unstructured.Unstructured, error)

func ParseKindSelector added in v1.10.0

func ParseKindSelector(input string) (string, string, string, string)

func RedactSecret added in v1.9.0

func RedactSecret(resource *unstructured.Unstructured) (unstructured.Unstructured, error)

RedactSecret masks keys of data and metadata.annotation fields of Secrets.

func SplitSubresource

func SplitSubresource(s string) (kind string, subresource string)

SplitSubresource - split subresource from kind

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL