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
Click to show internal directories.
Click to hide internal directories.