discovery

package
v0.29.13 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 19 Imported by: 51

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultConstraint          = ">= 1.11.0"
	DefaultBlackListedVersions = map[string]error{
		"1.16.0": err83778_K1_16,
		"1.16.1": err83778_K1_16,
	}
	DefaultBlackListedMultiMasterVersions = map[string]error{
		"1.9.0":  err62649_K1_9,
		"1.9.1":  err62649_K1_9,
		"1.9.2":  err62649_K1_9,
		"1.9.3":  err62649_K1_9,
		"1.9.4":  err62649_K1_9,
		"1.9.5":  err62649_K1_9,
		"1.9.6":  err62649_K1_9,
		"1.9.7":  err62649_K1_9,
		"1.10.0": err62649_K1_10,
		"1.10.1": err62649_K1_10,
	}
)

Functions

func CheckAPIVersion

func CheckAPIVersion(client discovery.DiscoveryInterface, constraint string) (bool, error)

func ExistsGroupKind

func ExistsGroupKind(client discovery.DiscoveryInterface, group, kind string) bool

func ExistsGroupKinds

func ExistsGroupKinds(client discovery.DiscoveryInterface, gk schema.GroupKind, otherGks ...schema.GroupKind) bool

func ExistsGroupVersionKind

func ExistsGroupVersionKind(client discovery.DiscoveryInterface, groupVersion, kind string) bool

func FilterAPISubResources

func FilterAPISubResources(resources []metav1.APIResource) []metav1.APIResource

func GetBaseVersion

func GetBaseVersion(client discovery.DiscoveryInterface) (string, error)

func GetVersion

func GetVersion(client discovery.DiscoveryInterface) (string, error)

func HasGVK added in v0.25.5

func HasGVK(client discovery.DiscoveryInterface, groupVersion, kind string) (bool, error)

func IsDefaultSupportedVersion

func IsDefaultSupportedVersion(kc kubernetes.Interface) error

func IsPreferredAPIResource

func IsPreferredAPIResource(client discovery.DiscoveryInterface, groupVersion, kind string) bool

func IsSupportedVersion

func IsSupportedVersion(kc kubernetes.Interface, constraint string, blackListedVersions map[string]error, blackListedMultiMasterVersions map[string]error) error

func ListAPIVersions added in v0.25.5

func ListAPIVersions(c discovery.DiscoveryInterface, group, kind string) ([]string, error)

func NewRestMapper

func NewRestMapper(client discovery.DiscoveryInterface) meta.RESTMapper

Types

type KnownBug

type KnownBug struct {
	URL string
	Fix string
}

func (*KnownBug) Error

func (e *KnownBug) Error() string

type ResourceMapper

func NewDynamicResourceMapper

func NewDynamicResourceMapper(cfg *rest.Config) (ResourceMapper, error)

func NewResourceMapper

func NewResourceMapper(mapper meta.RESTMapper) ResourceMapper

Jump to

Keyboard shortcuts

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