k8sutils

package
v1.2.1-dev5 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: Apache-2.0, BSD-3-Clause Imports: 5 Imported by: 0

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

func CheckVersionMeetsConstraint(version, constraint string) (bool, error)

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.

Jump to

Keyboard shortcuts

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