k8sclient

package
v18.10.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2018 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CLIKubernetes = "kubectl"
	CLIOpenShift  = "oc"

	FlavorKubernetes OrchestratorFlavor = "k8s"
	FlavorOpenShift  OrchestratorFlavor = "openshift"
)

Variables

This section is empty.

Functions

func GetCHAPISCSIPVYAML

func GetCHAPISCSIPVYAML(pvName, size, pvcName, pvcNamespace, secretName, targetPortal string,
	portals []string, iqn string, lun int32, label string) string

func GetCHAPSecretYAML

func GetCHAPSecretYAML(secretName, userName, initiatorSecret, targetSecret string) string

func GetCSIDaemonSetYAML

func GetCSIDaemonSetYAML(tridentImage, label string, debug bool, version *utils.Version) string

func GetCSIServiceYAML

func GetCSIServiceYAML(label string) string

func GetCSIStatefulSetYAML

func GetCSIStatefulSetYAML(pvcName, tridentImage, etcdImage, label string, debug bool) string

func GetClusterRoleBindingYAML

func GetClusterRoleBindingYAML(namespace string, flavor OrchestratorFlavor, version *utils.Version, csi bool) string

func GetClusterRoleYAML

func GetClusterRoleYAML(flavor OrchestratorFlavor, version *utils.Version, csi bool) string

func GetDeploymentYAML

func GetDeploymentYAML(pvcName, tridentImage, etcdImage, label string, debug bool) string

func GetISCSIPVYAML

func GetISCSIPVYAML(pvName, size, pvcName, pvcNamespace, targetPortal string, portals []string,
	iqn string, lun int32, label string) string

func GetInstallerClusterRoleBindingYAML

func GetInstallerClusterRoleBindingYAML(namespace string, flavor OrchestratorFlavor, version *utils.Version) string

func GetInstallerClusterRoleYAML

func GetInstallerClusterRoleYAML(flavor OrchestratorFlavor, version *utils.Version) string

func GetInstallerPodYAML

func GetInstallerPodYAML(label, tridentImage string, commandArgs []string) string

func GetInstallerServiceAccountYAML

func GetInstallerServiceAccountYAML() string

func GetNFSPVYAML

func GetNFSPVYAML(pvName, size, pvcName, pvcNamespace, nfsServer, nfsPath, label string) string

func GetNamespaceYAML

func GetNamespaceYAML(namespace string) string

func GetOpenShiftSCCQueryYAML

func GetOpenShiftSCCQueryYAML(scc string) string

func GetPVCYAML

func GetPVCYAML(pvcName, namespace, size, label string) string

func GetServiceAccountYAML

func GetServiceAccountYAML(csi bool) string

func GetUninstallerPodYAML

func GetUninstallerPodYAML(label, tridentImage string, commandArgs []string) string

Types

type Interface

type Interface interface {
	Version() *version.Info
	ServerVersion() *utils.Version
	Namespace() string
	SetNamespace(namespace string)
	Flavor() OrchestratorFlavor
	CLI() string
	Exec(podName, containerName string, commandArgs []string) ([]byte, error)
	GetDeploymentByLabel(label string, allNamespaces bool) (*v1beta1.Deployment, error)
	GetDeploymentsByLabel(label string, allNamespaces bool) ([]v1beta1.Deployment, error)
	CheckDeploymentExistsByLabel(label string, allNamespaces bool) (bool, string, error)
	DeleteDeploymentByLabel(label string) error
	GetServiceByLabel(label string, allNamespaces bool) (*v1.Service, error)
	GetServicesByLabel(label string, allNamespaces bool) ([]v1.Service, error)
	CheckServiceExistsByLabel(label string, allNamespaces bool) (bool, string, error)
	DeleteServiceByLabel(label string) error
	GetStatefulSetByLabel(label string, allNamespaces bool) (*appsv1.StatefulSet, error)
	GetStatefulSetsByLabel(label string, allNamespaces bool) ([]appsv1.StatefulSet, error)
	CheckStatefulSetExistsByLabel(label string, allNamespaces bool) (bool, string, error)
	DeleteStatefulSetByLabel(label string) error
	GetDaemonSetByLabel(label string, allNamespaces bool) (*v1beta1.DaemonSet, error)
	GetDaemonSetsByLabel(label string, allNamespaces bool) ([]v1beta1.DaemonSet, error)
	CheckDaemonSetExistsByLabel(label string, allNamespaces bool) (bool, string, error)
	DeleteDaemonSetByLabel(label string) error
	GetConfigMapByLabel(label string, allNamespaces bool) (*v1.ConfigMap, error)
	GetConfigMapsByLabel(label string, allNamespaces bool) ([]v1.ConfigMap, error)
	CheckConfigMapExistsByLabel(label string, allNamespaces bool) (bool, string, error)
	DeleteConfigMapByLabel(label string) error
	CreateConfigMapFromDirectory(path, name, label string) error
	GetPodByLabel(label string, allNamespaces bool) (*v1.Pod, error)
	GetPodsByLabel(label string, allNamespaces bool) ([]v1.Pod, error)
	CheckPodExistsByLabel(label string, allNamespaces bool) (bool, string, error)
	DeletePodByLabel(label string) error
	GetPVC(pvcName string) (*v1.PersistentVolumeClaim, error)
	GetPVCByLabel(label string, allNamespaces bool) (*v1.PersistentVolumeClaim, error)
	CheckPVCExists(pvcName string) (bool, error)
	CheckPVCBound(pvcName string) (bool, error)
	DeletePVCByLabel(label string) error
	GetPV(pvName string) (*v1.PersistentVolume, error)
	GetPVByLabel(label string) (*v1.PersistentVolume, error)
	CheckPVExists(pvName string) (bool, error)
	DeletePVByLabel(label string) error
	CheckNamespaceExists(namespace string) (bool, error)
	CreateSecret(secret *v1.Secret) (*v1.Secret, error)
	CreateCHAPSecret(secretName, accountName, initiatorSecret, targetSecret string) (*v1.Secret, error)
	GetSecret(secretName string) (*v1.Secret, error)
	CheckSecretExists(secretName string) (bool, error)
	DeleteSecret(secretName string) error
	CreateObjectByFile(filePath string) error
	CreateObjectByYAML(yaml string) error
	DeleteObjectByFile(filePath string, ignoreNotFound bool) error
	DeleteObjectByYAML(yaml string, ignoreNotFound bool) error
	AddTridentUserToOpenShiftSCC(user, scc string) error
	RemoveTridentUserFromOpenShiftSCC(user, scc string) error
}

func NewKubeClient

func NewKubeClient(config *rest.Config, namespace string) (Interface, error)

func NewKubectlClient

func NewKubectlClient(namespace string) (Interface, error)

type KubeClient

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

func (*KubeClient) AddTridentUserToOpenShiftSCC

func (k *KubeClient) AddTridentUserToOpenShiftSCC(user, scc string) error

AddTridentUserToOpenShiftSCC adds the specified user (typically a service account) to the 'anyuid' security context constraint. This only works for OpenShift.

func (*KubeClient) CLI

func (k *KubeClient) CLI() string

func (*KubeClient) CheckConfigMapExistsByLabel

func (k *KubeClient) CheckConfigMapExistsByLabel(label string, allNamespaces bool) (bool, string, error)

CheckConfigMapExistsByLabel returns true if one or more configmap objects matching the specified label exist.

func (*KubeClient) CheckDaemonSetExistsByLabel

func (k *KubeClient) CheckDaemonSetExistsByLabel(label string, allNamespaces bool) (bool, string, error)

CheckDaemonSetExistsByLabel returns true if one or more daemonset objects matching the specified label exist.

func (*KubeClient) CheckDeploymentExistsByLabel

func (k *KubeClient) CheckDeploymentExistsByLabel(label string, allNamespaces bool) (bool, string, error)

CheckDeploymentExistsByLabel returns true if one or more deployment objects matching the specified label exist.

func (*KubeClient) CheckNamespaceExists

func (k *KubeClient) CheckNamespaceExists(namespace string) (bool, error)

func (*KubeClient) CheckPVCBound

func (k *KubeClient) CheckPVCBound(pvcName string) (bool, error)

func (*KubeClient) CheckPVCExists

func (k *KubeClient) CheckPVCExists(pvc string) (bool, error)

func (*KubeClient) CheckPVExists

func (k *KubeClient) CheckPVExists(pvName string) (bool, error)

func (*KubeClient) CheckPodExistsByLabel

func (k *KubeClient) CheckPodExistsByLabel(label string, allNamespaces bool) (bool, string, error)

CheckPodExistsByLabel returns true if one or more pod objects matching the specified label exist.

func (*KubeClient) CheckSecretExists

func (k *KubeClient) CheckSecretExists(secretName string) (bool, error)

CheckSecretExists returns true if the Secret exists

func (*KubeClient) CheckServiceExistsByLabel

func (k *KubeClient) CheckServiceExistsByLabel(label string, allNamespaces bool) (bool, string, error)

CheckServiceExistsByLabel returns true if one or more service objects matching the specified label exist.

func (*KubeClient) CheckStatefulSetExistsByLabel

func (k *KubeClient) CheckStatefulSetExistsByLabel(label string, allNamespaces bool) (bool, string, error)

CheckStatefulSetExistsByLabel returns true if one or more statefulset objects matching the specified label exist.

func (*KubeClient) CreateCHAPSecret

func (k *KubeClient) CreateCHAPSecret(secretName, accountName, initiatorSecret, targetSecret string,
) (*v1.Secret, error)

CreateCHAPSecret creates a new Secret for iSCSI CHAP mutual authentication

func (*KubeClient) CreateConfigMapFromDirectory

func (k *KubeClient) CreateConfigMapFromDirectory(path, name, label string) error

func (*KubeClient) CreateObjectByFile

func (k *KubeClient) CreateObjectByFile(filePath string) error

CreateObjectByFile creates an object on the server from a YAML/JSON file at the specified path.

func (*KubeClient) CreateObjectByYAML

func (k *KubeClient) CreateObjectByYAML(yamlData string) error

CreateObjectByYAML creates an object on the server from a YAML/JSON document.

func (*KubeClient) CreateSecret

func (k *KubeClient) CreateSecret(secret *v1.Secret) (*v1.Secret, error)

CreateSecret creates a new Secret

func (*KubeClient) DeleteConfigMapByLabel

func (k *KubeClient) DeleteConfigMapByLabel(label string) error

DeleteConfigMapByLabel deletes a configmap object matching the specified label

func (*KubeClient) DeleteDaemonSetByLabel

func (k *KubeClient) DeleteDaemonSetByLabel(label string) error

DeleteDaemonSetByLabel deletes a daemonset object matching the specified label in the namespace of the client.

func (*KubeClient) DeleteDeploymentByLabel

func (k *KubeClient) DeleteDeploymentByLabel(label string) error

DeleteDeploymentByLabel deletes a deployment object matching the specified label in the namespace of the client.

func (*KubeClient) DeleteObjectByFile

func (k *KubeClient) DeleteObjectByFile(filePath string, ignoreNotFound bool) error

DeleteObjectByFile deletes an object on the server from a YAML/JSON file at the specified path.

func (*KubeClient) DeleteObjectByYAML

func (k *KubeClient) DeleteObjectByYAML(yamlData string, ignoreNotFound bool) error

DeleteObjectByYAML deletes an object on the server from a YAML/JSON document.

func (*KubeClient) DeletePVByLabel

func (k *KubeClient) DeletePVByLabel(label string) error

func (*KubeClient) DeletePVCByLabel

func (k *KubeClient) DeletePVCByLabel(label string) error

func (*KubeClient) DeletePodByLabel

func (k *KubeClient) DeletePodByLabel(label string) error

DeletePodByLabel deletes a pod object matching the specified label

func (*KubeClient) DeleteSecret

func (k *KubeClient) DeleteSecret(secretName string) error

DeleteSecret deletes the specified Secret

func (*KubeClient) DeleteServiceByLabel

func (k *KubeClient) DeleteServiceByLabel(label string) error

DeleteServiceByLabel deletes a service object matching the specified label in the namespace of the client.

func (*KubeClient) DeleteStatefulSetByLabel

func (k *KubeClient) DeleteStatefulSetByLabel(label string) error

DeleteStatefulSetByLabel deletes a statefulset object matching the specified label in the namespace of the client.

func (*KubeClient) Exec

func (k *KubeClient) Exec(podName, containerName string, commandArgs []string) ([]byte, error)

func (*KubeClient) Flavor

func (k *KubeClient) Flavor() OrchestratorFlavor

func (*KubeClient) GetConfigMapByLabel

func (k *KubeClient) GetConfigMapByLabel(label string, allNamespaces bool) (*v1.ConfigMap, error)

GetConfigMapByLabel returns a configmap object matching the specified label if it is unique

func (*KubeClient) GetConfigMapsByLabel

func (k *KubeClient) GetConfigMapsByLabel(label string, allNamespaces bool) ([]v1.ConfigMap, error)

GetConfigMapsByLabel returns all configmap objects matching the specified label

func (*KubeClient) GetDaemonSetByLabel

func (k *KubeClient) GetDaemonSetByLabel(label string, allNamespaces bool) (*v1beta1.DaemonSet, error)

GetDaemonSetByLabel returns a daemonset object matching the specified label if it is unique

func (*KubeClient) GetDaemonSetsByLabel

func (k *KubeClient) GetDaemonSetsByLabel(label string, allNamespaces bool) ([]v1beta1.DaemonSet, error)

GetDaemonSetsByLabel returns all daemonset objects matching the specified label

func (*KubeClient) GetDeploymentByLabel

func (k *KubeClient) GetDeploymentByLabel(label string, allNamespaces bool) (*v1beta1.Deployment, error)

GetDeploymentByLabel returns a deployment object matching the specified label if it is unique

func (*KubeClient) GetDeploymentsByLabel

func (k *KubeClient) GetDeploymentsByLabel(label string, allNamespaces bool) ([]v1beta1.Deployment, error)

GetDeploymentByLabel returns all deployment objects matching the specified label

func (*KubeClient) GetPV

func (k *KubeClient) GetPV(pvName string) (*v1.PersistentVolume, error)

func (*KubeClient) GetPVByLabel

func (k *KubeClient) GetPVByLabel(label string) (*v1.PersistentVolume, error)

func (*KubeClient) GetPVC

func (k *KubeClient) GetPVC(pvcName string) (*v1.PersistentVolumeClaim, error)

func (*KubeClient) GetPVCByLabel

func (k *KubeClient) GetPVCByLabel(label string, allNamespaces bool) (*v1.PersistentVolumeClaim, error)

func (*KubeClient) GetPodByLabel

func (k *KubeClient) GetPodByLabel(label string, allNamespaces bool) (*v1.Pod, error)

GetPodByLabel returns a pod object matching the specified label

func (*KubeClient) GetPodsByLabel

func (k *KubeClient) GetPodsByLabel(label string, allNamespaces bool) ([]v1.Pod, error)

GetPodsByLabel returns all pod objects matching the specified label

func (*KubeClient) GetSecret

func (k *KubeClient) GetSecret(secretName string) (*v1.Secret, error)

GetSecret looks up a Secret by name

func (*KubeClient) GetServiceByLabel

func (k *KubeClient) GetServiceByLabel(label string, allNamespaces bool) (*v1.Service, error)

GetServiceByLabel returns a service object matching the specified label if it is unique

func (*KubeClient) GetServicesByLabel

func (k *KubeClient) GetServicesByLabel(label string, allNamespaces bool) ([]v1.Service, error)

GetServicesByLabel returns all service objects matching the specified label

func (*KubeClient) GetStatefulSetByLabel

func (k *KubeClient) GetStatefulSetByLabel(label string, allNamespaces bool) (*appsv1.StatefulSet, error)

GetStatefulSetByLabel returns a statefulset object matching the specified label if it is unique

func (*KubeClient) GetStatefulSetsByLabel

func (k *KubeClient) GetStatefulSetsByLabel(label string, allNamespaces bool) ([]appsv1.StatefulSet, error)

GetStatefulSetsByLabel returns all stateful objects matching the specified label

func (*KubeClient) Namespace

func (k *KubeClient) Namespace() string

func (*KubeClient) RemoveTridentUserFromOpenShiftSCC

func (k *KubeClient) RemoveTridentUserFromOpenShiftSCC(user, scc string) error

RemoveTridentUserFromOpenShiftSCC removes the specified user (typically a service account) from the 'anyuid' security context constraint. This only works for OpenShift, and it must be idempotent.

func (*KubeClient) ServerVersion

func (k *KubeClient) ServerVersion() *utils.Version

func (*KubeClient) SetNamespace

func (k *KubeClient) SetNamespace(namespace string)

func (*KubeClient) Version

func (k *KubeClient) Version() *version.Info

type KubectlClient

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

func (*KubectlClient) AddTridentUserToOpenShiftSCC

func (c *KubectlClient) AddTridentUserToOpenShiftSCC(user, scc string) error

AddTridentUserToOpenShiftSCC adds the specified user (typically a service account) to the 'anyuid' security context constraint. This only works for OpenShift.

func (*KubectlClient) CLI

func (c *KubectlClient) CLI() string

func (*KubectlClient) CheckConfigMapExistsByLabel

func (c *KubectlClient) CheckConfigMapExistsByLabel(label string, allNamespaces bool) (bool, string, error)

CheckConfigMapExistsByLabel returns true if one or more configmap objects matching the specified label exist.

func (*KubectlClient) CheckDaemonSetExistsByLabel

func (c *KubectlClient) CheckDaemonSetExistsByLabel(label string, allNamespaces bool) (bool, string, error)

CheckDaemonSetExistsByLabel returns true if one or more daemonset objects matching the specified label exist.

func (*KubectlClient) CheckDeploymentExistsByLabel

func (c *KubectlClient) CheckDeploymentExistsByLabel(label string, allNamespaces bool) (bool, string, error)

CheckDeploymentExistsByLabel returns true if one or more deployment objects matching the specified label exist.

func (*KubectlClient) CheckNamespaceExists

func (c *KubectlClient) CheckNamespaceExists(namespace string) (bool, error)

CheckNamespaceExists returns true if the specified namespace exists, false otherwise. It only returns an error if the check failed, not if the namespace doesn't exist.

func (*KubectlClient) CheckPVCBound

func (c *KubectlClient) CheckPVCBound(pvcName string) (bool, error)

CheckPVCBound returns true if the specified PVC is bound, false otherwise. It only returns an error if the check failed, not if the PVC doesn't exist.

func (*KubectlClient) CheckPVCExists

func (c *KubectlClient) CheckPVCExists(pvcName string) (bool, error)

CheckPVCExists returns true if the specified PVC exists, false otherwise. It only returns an error if the check failed, not if the PVC doesn't exist.

func (*KubectlClient) CheckPVExists

func (c *KubectlClient) CheckPVExists(pvName string) (bool, error)

CheckPVExists returns true if the specified PV exists, false otherwise. It only returns an error if the check failed, not if the PV doesn't exist.

func (*KubectlClient) CheckPodExistsByLabel

func (c *KubectlClient) CheckPodExistsByLabel(label string, allNamespaces bool) (bool, string, error)

CheckPodExistsByLabel returns true if one or more pod objects matching the specified label exist.

func (*KubectlClient) CheckSecretExists

func (c *KubectlClient) CheckSecretExists(secretName string) (bool, error)

CheckSecretExists returns true if the specified secret exists, false otherwise. It only returns an error if the check failed, not if the secret doesn't exist.

func (*KubectlClient) CheckServiceExistsByLabel

func (c *KubectlClient) CheckServiceExistsByLabel(label string, allNamespaces bool) (bool, string, error)

CheckServiceExistsByLabel returns true if one or more service objects matching the specified label exist.

func (*KubectlClient) CheckStatefulSetExistsByLabel

func (c *KubectlClient) CheckStatefulSetExistsByLabel(label string, allNamespaces bool) (bool, string, error)

CheckStatefulSetExistsByLabel returns true if one or more statefulset objects matching the specified label exist.

func (*KubectlClient) CreateCHAPSecret

func (c *KubectlClient) CreateCHAPSecret(secretName, accountName, initiatorSecret, targetSecret string,
) (*v1.Secret, error)

CreateCHAPSecret creates a new Secret for iSCSI CHAP mutual authentication

func (*KubectlClient) CreateConfigMapFromDirectory

func (c *KubectlClient) CreateConfigMapFromDirectory(path, name, label string) error

func (*KubectlClient) CreateObjectByFile

func (c *KubectlClient) CreateObjectByFile(filePath string) error

CreateObjectByFile creates an object on the server from a YAML/JSON file at the specified path.

func (*KubectlClient) CreateObjectByYAML

func (c *KubectlClient) CreateObjectByYAML(yaml string) error

CreateObjectByYAML creates an object on the server from a YAML/JSON document.

func (*KubectlClient) CreateSecret

func (c *KubectlClient) CreateSecret(secret *v1.Secret) (*v1.Secret, error)

CreateSecret creates a new Secret

func (*KubectlClient) DeleteConfigMapByLabel

func (c *KubectlClient) DeleteConfigMapByLabel(label string) error

DeleteConfigMapByLabel deletes a configmap object matching the specified label

func (*KubectlClient) DeleteDaemonSetByLabel

func (c *KubectlClient) DeleteDaemonSetByLabel(label string) error

DeleteDaemonSetByLabel deletes a daemonset object matching the specified label in the namespace of the client.

func (*KubectlClient) DeleteDeploymentByLabel

func (c *KubectlClient) DeleteDeploymentByLabel(label string) error

DeleteDeploymentByLabel deletes a deployment object matching the specified label in the namespace of the client.

func (*KubectlClient) DeleteObjectByFile

func (c *KubectlClient) DeleteObjectByFile(filePath string, ignoreNotFound bool) error

DeleteObjectByFile deletes an object on the server from a YAML/JSON file at the specified path.

func (*KubectlClient) DeleteObjectByYAML

func (c *KubectlClient) DeleteObjectByYAML(yaml string, ignoreNotFound bool) error

DeleteObjectByYAML deletes an object on the server from a YAML/JSON document.

func (*KubectlClient) DeletePVByLabel

func (c *KubectlClient) DeletePVByLabel(label string) error

func (*KubectlClient) DeletePVCByLabel

func (c *KubectlClient) DeletePVCByLabel(label string) error

DeletePVCByLabel deletes a PVC object matching the specified label in the namespace of the client.

func (*KubectlClient) DeletePodByLabel

func (c *KubectlClient) DeletePodByLabel(label string) error

DeletePodByLabel deletes a pod object matching the specified label

func (*KubectlClient) DeleteSecret

func (c *KubectlClient) DeleteSecret(secretName string) error

DeleteSecret deletes the specified Secret

func (*KubectlClient) DeleteServiceByLabel

func (c *KubectlClient) DeleteServiceByLabel(label string) error

DeleteServiceByLabel deletes a service object matching the specified label in the namespace of the client.

func (*KubectlClient) DeleteStatefulSetByLabel

func (c *KubectlClient) DeleteStatefulSetByLabel(label string) error

DeleteStatefulSetByLabel deletes a statefulset object matching the specified label in the namespace of the client.

func (*KubectlClient) Exec

func (c *KubectlClient) Exec(podName, containerName string, commandArgs []string) ([]byte, error)

func (*KubectlClient) Flavor

func (c *KubectlClient) Flavor() OrchestratorFlavor

func (*KubectlClient) GetConfigMapByLabel

func (c *KubectlClient) GetConfigMapByLabel(label string, allNamespaces bool) (*v1.ConfigMap, error)

GetConfigMapByLabel returns a configmap object matching the specified label if it is unique

func (*KubectlClient) GetConfigMapsByLabel

func (c *KubectlClient) GetConfigMapsByLabel(label string, allNamespaces bool) ([]v1.ConfigMap, error)

GetConfigMapsByLabel returns all configmap objects matching the specified label

func (*KubectlClient) GetDaemonSetByLabel

func (c *KubectlClient) GetDaemonSetByLabel(label string, allNamespaces bool) (*v1beta1.DaemonSet, error)

GetDaemonSetByLabel returns a daemonset object matching the specified label if it is unique

func (*KubectlClient) GetDaemonSetsByLabel

func (c *KubectlClient) GetDaemonSetsByLabel(label string, allNamespaces bool) ([]v1beta1.DaemonSet, error)

GetDaemonSetsByLabel returns all daemonset objects matching the specified label

func (*KubectlClient) GetDeploymentByLabel

func (c *KubectlClient) GetDeploymentByLabel(label string, allNamespaces bool) (*v1beta1.Deployment, error)

GetDeploymentByLabel returns a deployment object matching the specified label if it is unique

func (*KubectlClient) GetDeploymentsByLabel

func (c *KubectlClient) GetDeploymentsByLabel(label string, allNamespaces bool) ([]v1beta1.Deployment, error)

GetDeploymentByLabel returns all deployment objects matching the specified label

func (*KubectlClient) GetPV

func (c *KubectlClient) GetPV(pvName string) (*v1.PersistentVolume, error)

func (*KubectlClient) GetPVByLabel

func (c *KubectlClient) GetPVByLabel(label string) (*v1.PersistentVolume, error)

func (*KubectlClient) GetPVC

func (c *KubectlClient) GetPVC(pvcName string) (*v1.PersistentVolumeClaim, error)

func (*KubectlClient) GetPVCByLabel

func (c *KubectlClient) GetPVCByLabel(label string, allNamespaces bool) (*v1.PersistentVolumeClaim, error)

func (*KubectlClient) GetPodByLabel

func (c *KubectlClient) GetPodByLabel(label string, allNamespaces bool) (*v1.Pod, error)

GetPodByLabel returns a pod object matching the specified label

func (*KubectlClient) GetPodsByLabel

func (c *KubectlClient) GetPodsByLabel(label string, allNamespaces bool) ([]v1.Pod, error)

GetPodsByLabel returns all pod objects matching the specified label

func (*KubectlClient) GetSecret

func (c *KubectlClient) GetSecret(secretName string) (*v1.Secret, error)

GetSecret looks up a Secret by name

func (*KubectlClient) GetServiceByLabel

func (c *KubectlClient) GetServiceByLabel(label string, allNamespaces bool) (*v1.Service, error)

GetServiceByLabel returns a service object matching the specified label if it is unique

func (*KubectlClient) GetServicesByLabel

func (c *KubectlClient) GetServicesByLabel(label string, allNamespaces bool) ([]v1.Service, error)

GetServicesByLabel returns all service objects matching the specified label

func (*KubectlClient) GetStatefulSetByLabel

func (c *KubectlClient) GetStatefulSetByLabel(label string, allNamespaces bool) (*appsv1.StatefulSet, error)

GetStatefulSetByLabel returns a statefulset object matching the specified label if it is unique

func (*KubectlClient) GetStatefulSetsByLabel

func (c *KubectlClient) GetStatefulSetsByLabel(label string, allNamespaces bool) ([]appsv1.StatefulSet, error)

GetStatefulSetsByLabel returns all stateful objects matching the specified label

func (*KubectlClient) Namespace

func (c *KubectlClient) Namespace() string

func (*KubectlClient) RemoveTridentUserFromOpenShiftSCC

func (c *KubectlClient) RemoveTridentUserFromOpenShiftSCC(user, scc string) error

RemoveTridentUserFromOpenShiftSCC removes the specified user (typically a service account) from the 'anyuid' security context constraint. This only works for OpenShift.

func (*KubectlClient) ServerVersion

func (c *KubectlClient) ServerVersion() *utils.Version

func (*KubectlClient) SetNamespace

func (c *KubectlClient) SetNamespace(namespace string)

func (*KubectlClient) Version

func (c *KubectlClient) Version() *version.Info

type OrchestratorFlavor

type OrchestratorFlavor string

Jump to

Keyboard shortcuts

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