Documentation ¶
Index ¶
- func FqName(namespace, name string) string
- func FqObjName(o metav1.Object) string
- func FromGVK(pool dynamic.ClientPool, disco discovery.ServerResourcesInterface, ...) (dynamic.ResourceInterface, error)
- func FromResource(pool dynamic.ClientPool, disco discovery.ServerResourcesInterface, ...) (dynamic.ResourceInterface, error)
- func NamespaceOrDefault(ns string) string
- func NewMemcachedDiscoveryClient(cl discovery.DiscoveryInterface) discovery.CachedDiscoveryInterface
- func ParseFqName(id string) (namespace, name string)
- type ServerVersion
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromGVK ¶
func FromGVK( pool dynamic.ClientPool, disco discovery.ServerResourcesInterface, gvk schema.GroupVersionKind, namespace string, ) (dynamic.ResourceInterface, error)
FromGVK returns the ResourceClient for a given object
func FromResource ¶
func FromResource( pool dynamic.ClientPool, disco discovery.ServerResourcesInterface, obj runtime.Object, ) (dynamic.ResourceInterface, error)
FromResource returns the ResourceClient for a given object
func NamespaceOrDefault ¶
NamespaceOrDefault returns `ns` or the the default namespace `"default"` if `ns` is empty.
func NewMemcachedDiscoveryClient ¶
func NewMemcachedDiscoveryClient(cl discovery.DiscoveryInterface) discovery.CachedDiscoveryInterface
NewMemcachedDiscoveryClient creates a new DiscoveryClient that caches results in memory
func ParseFqName ¶
ParseFqName will parse a fully-qualified Kubernetes object name.
Types ¶
type ServerVersion ¶
ServerVersion captures k8s major.minor version in a parsed form
func DefaultVersion ¶
func DefaultVersion() ServerVersion
DefaultVersion takes a wild guess (v1.9) at the version of a Kubernetes cluster.
func FetchVersion ¶
func FetchVersion(v discovery.ServerVersionInterface) (ret ServerVersion, err error)
FetchVersion fetches version information from discovery client, and parses
func (ServerVersion) Compare ¶
func (v ServerVersion) Compare(major, minor int) int
Compare returns -1/0/+1 iff v is less than / equal / greater than major.minor
func (ServerVersion) String ¶
func (v ServerVersion) String() string