discovery

package
v0.0.0-...-f6121d7 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2019 License: Apache-2.0 Imports: 14 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultConstraint                     = ">= 1.9.0"
	DefaultBlackListedVersions            map[string]error
	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 DetectResource

func DetectResource(restmapper *DefaultRESTMapper, obj interface{}) (schema.GroupVersionResource, error)

func FilterAPISubResources

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

func FilterSubResources

func FilterSubResources(resources []schema.GroupVersionResource) []schema.GroupVersionResource

func GetBaseVersion

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

func GetVersion

func GetVersion(client discovery.DiscoveryInterface) (string, 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

Types

type AmbiguousResourceError

type AmbiguousResourceError struct {
	PartialResource schema.GroupVersionKind

	MatchingResources []schema.GroupVersionResource
	MatchingKinds     []schema.GroupVersionKind
}

AmbiguousResourceError is returned if the RESTMapper finds multiple matches for a resource

func (*AmbiguousResourceError) Error

func (e *AmbiguousResourceError) Error() string

type DefaultRESTMapper

type DefaultRESTMapper struct {
	// contains filtered or unexported fields
}

ref: https://github.com/kubernetes/apimachinery/blob/bfe7139b14565386b4470736ca765bf21616b60e/pkg/api/meta/restmapper.go#L72

func LoadRestMapper

func LoadRestMapper(client discovery.DiscoveryInterface) (*DefaultRESTMapper, error)

func NewDefaultRESTMapper

func NewDefaultRESTMapper(defaultGroupVersions []schema.GroupVersion) *DefaultRESTMapper

func (*DefaultRESTMapper) AddSpecific

func (m *DefaultRESTMapper) AddSpecific(kind schema.GroupVersionKind, plural, singular schema.GroupVersionResource)

func (*DefaultRESTMapper) KindFor

func (*DefaultRESTMapper) KindsFor

func (*DefaultRESTMapper) ResourceFor

func (*DefaultRESTMapper) ResourceForKind

func (*DefaultRESTMapper) ResourcesFor

func (*DefaultRESTMapper) ResourcesForKind

type KnownBug

type KnownBug struct {
	URL string
	Fix string
}

func (*KnownBug) Error

func (e *KnownBug) Error() string

Jump to

Keyboard shortcuts

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