client-go: kmodules.xyz/client-go/discovery Index | Files

package discovery

import "kmodules.xyz/client-go/discovery"

Index

Package Files

lib.go restmapper.go

Variables

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,
    }
)

func APIResourceForGVK Uses

func APIResourceForGVK(client discovery.DiscoveryInterface, input schema.GroupVersionKind) (metav1.APIResource, error)

func CheckAPIVersion Uses

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

func DetectResource Uses

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

func ExistsGroupKind Uses

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

func ExistsGroupVersionKind Uses

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

func FilterAPISubResources Uses

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

func FilterSubResources Uses

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

func GetBaseVersion Uses

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

func GetVersion Uses

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

func GetVersionInfo Uses

func GetVersionInfo(client discovery.DiscoveryInterface) (int64, int64, int64, string, string, error)

func IsDefaultSupportedVersion Uses

func IsDefaultSupportedVersion(kc kubernetes.Interface) error

func IsPreferredAPIResource Uses

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

func IsSupportedVersion Uses

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

func ResourceForGVK Uses

func ResourceForGVK(client discovery.DiscoveryInterface, input schema.GroupVersionKind) (schema.GroupVersionResource, error)

type AmbiguousResourceError Uses

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 Uses

func (e *AmbiguousResourceError) Error() string

type DefaultRESTMapper Uses

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

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

func LoadRestMapper Uses

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

func NewDefaultRESTMapper Uses

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

func (*DefaultRESTMapper) AddSpecific Uses

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

func (*DefaultRESTMapper) KindFor Uses

func (m *DefaultRESTMapper) KindFor(resource schema.GroupVersionResource) (schema.GroupVersionKind, error)

func (*DefaultRESTMapper) KindsFor Uses

func (m *DefaultRESTMapper) KindsFor(input schema.GroupVersionResource) ([]schema.GroupVersionKind, error)

func (*DefaultRESTMapper) ResourceFor Uses

func (m *DefaultRESTMapper) ResourceFor(resource schema.GroupVersionResource) (schema.GroupVersionResource, error)

func (*DefaultRESTMapper) ResourceForKind Uses

func (m *DefaultRESTMapper) ResourceForKind(input schema.GroupVersionKind) (schema.GroupVersionResource, error)

func (*DefaultRESTMapper) ResourcesFor Uses

func (m *DefaultRESTMapper) ResourcesFor(input schema.GroupVersionResource) ([]schema.GroupVersionResource, error)

func (*DefaultRESTMapper) ResourcesForKind Uses

func (m *DefaultRESTMapper) ResourcesForKind(input schema.GroupVersionKind) ([]schema.GroupVersionResource, error)

type KnownBug Uses

type KnownBug struct {
    URL string
    Fix string
}

func (*KnownBug) Error Uses

func (e *KnownBug) Error() string

Package discovery imports 15 packages (graph) and is imported by 55 packages. Updated 2020-12-29. Refresh now. Tools for package owners.