Documentation ¶
Overview ¶
Package k8sutils is used to provider helper consts and functions for k8s operations
Package k8sutils is used to provider helper consts and functions for k8s operations
Index ¶
Constants ¶
View Source
const ( // VolumeAttachmentGroupName group name VolumeAttachmentGroupName = "storage.k8s.io" // VolumeAttachmentResourceName is the kind used for VolumeAttachment VolumeAttachmentResourceName = "volumeattachments" )
Variables ¶
View Source
var ( // ConstraintK8sGreaterEqual121 is a version constraint for versions >= 1.21. ConstraintK8sGreaterEqual121 *semver.Constraints )
Functions ¶
func CheckVersionMeetsConstraint ¶
CheckVersionMeetsConstraint returns true if the <version> meets the <constraint>.
func IsResourceSupported ¶
func IsResourceSupported( clientset kubernetes.Interface, gr schema.GroupResource, ) bool
IsResourceSupported uses Discovery API to find out if the server supports the given GroupResource. If supported, it will return its groupVersion; Otherwise, it will return ""
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.