kubeclient

package
v0.51.3-beta2 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIURLForResource

func APIURLForResource(resource *schema.GroupVersionResource, namespace string) string

APIURLForResource returns kubernetes API url based on GroupVersionResource

func TranslatedKubernetesErrors

func TranslatedKubernetesErrors(env *v1alpha.CommandEnvironment, err error) error

Translate kubernetes errors to more human redable format

Types

type KubernetesClients

type KubernetesClients struct {
	Clientset     *kubernetes.Clientset
	RestConfig    *rest.Config
	DynamicClient dynamic.Interface
	ClientConfig  clientcmd.ClientConfig

	CommandEnvironment *v1alpha.CommandEnvironment
	// contains filtered or unexported fields
}

KubernetesClients - contains all sorts of kubernetes clients that can be used to contact with cluster

func NewKubernetesClusterClients

func NewKubernetesClusterClients(env *v1alpha.CommandEnvironment, kubeconfig string) (*KubernetesClients, error)

NewKubernetesClusterClients configures and returns clients for kubernetes cluster

func (*KubernetesClients) CurrentNamespace

func (c *KubernetesClients) CurrentNamespace() (string, error)

CurrentNamespace returns the currently set namespace

func (*KubernetesClients) IsResourceAvailableOnCluster

func (c *KubernetesClients) IsResourceAvailableOnCluster(resource *schema.GroupVersionResource, namespace string) (bool, error)

IsResourceAvailableOnCluster checks the cluster to see if specified CRD is installed

Jump to

Keyboard shortcuts

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