Versions in this module Expand all Collapse all v0 v0.44.0 Jun 29, 2023 Changes in this version + func AddConfigContextForServiceAccountE(t testing.TestingT, kubectlOptions *KubectlOptions, contextName string, ...) error + func AreAllNodesReady(t testing.TestingT, options *KubectlOptions) bool + func AreAllNodesReadyE(t testing.TestingT, options *KubectlOptions) (bool, error) + func CanIDo(t testing.TestingT, options *KubectlOptions, action authv1.ResourceAttributes) bool + func CanIDoE(t testing.TestingT, options *KubectlOptions, action authv1.ResourceAttributes) (bool, error) + func CopyHomeKubeConfigToTemp(t testing.TestingT) string + func CopyHomeKubeConfigToTempE(t testing.TestingT) (string, error) + func CreateNamespace(t testing.TestingT, options *KubectlOptions, namespaceName string) + func CreateNamespaceE(t testing.TestingT, options *KubectlOptions, namespaceName string) error + func CreateNamespaceWithMetadata(t testing.TestingT, options *KubectlOptions, ...) + func CreateNamespaceWithMetadataE(t testing.TestingT, options *KubectlOptions, ...) error + func CreateServiceAccount(t testing.TestingT, options *KubectlOptions, serviceAccountName string) + func CreateServiceAccountE(t testing.TestingT, options *KubectlOptions, serviceAccountName string) error + func DeleteConfigContextE(t testing.TestingT, contextName string) error + func DeleteConfigContextWithPathE(t testing.TestingT, kubeConfigPath string, contextName string) error + func DeleteNamespace(t testing.TestingT, options *KubectlOptions, namespaceName string) + func DeleteNamespaceE(t testing.TestingT, options *KubectlOptions, namespaceName string) error + func FindNodeHostnameE(t testing.TestingT, node corev1.Node) (string, error) + func FindNodePortE(service *corev1.Service, servicePort int32) (int32, error) + func GetAvailablePort(t testing.TestingT) int + func GetAvailablePortE(t testing.TestingT) (int, error) + func GetClusterRole(t testing.TestingT, options *KubectlOptions, roleName string) *rbacv1.ClusterRole + func GetClusterRoleE(t testing.TestingT, options *KubectlOptions, roleName string) (*rbacv1.ClusterRole, error) + func GetConfigMap(t testing.TestingT, options *KubectlOptions, configMapName string) *corev1.ConfigMap + func GetConfigMapE(t testing.TestingT, options *KubectlOptions, configMapName string) (*corev1.ConfigMap, error) + func GetDaemonSet(t testing.TestingT, options *KubectlOptions, daemonSetName string) *appsv1.DaemonSet + func GetDaemonSetE(t testing.TestingT, options *KubectlOptions, daemonSetName string) (*appsv1.DaemonSet, error) + func GetDeployment(t testing.TestingT, options *KubectlOptions, deploymentName string) *appsv1.Deployment + func GetDeploymentE(t testing.TestingT, options *KubectlOptions, deploymentName string) (*appsv1.Deployment, error) + func GetIngress(t testing.TestingT, options *KubectlOptions, ingressName string) *networkingv1.Ingress + func GetIngressE(t testing.TestingT, options *KubectlOptions, ingressName string) (*networkingv1.Ingress, error) + func GetIngressV1Beta1(t testing.TestingT, options *KubectlOptions, ingressName string) *networkingv1beta1.Ingress + func GetIngressV1Beta1E(t testing.TestingT, options *KubectlOptions, ingressName string) (*networkingv1beta1.Ingress, error) + func GetJob(t testing.TestingT, options *KubectlOptions, jobName string) *batchv1.Job + func GetJobE(t testing.TestingT, options *KubectlOptions, jobName string) (*batchv1.Job, error) + func GetKubeConfigPathE(t testing.TestingT) (string, error) + func GetKubernetesClientE(t testing.TestingT) (*kubernetes.Clientset, error) + func GetKubernetesClientFromOptionsE(t testing.TestingT, options *KubectlOptions) (*kubernetes.Clientset, error) + func GetKubernetesClusterVersionE(t testing.TestingT) (string, error) + func GetKubernetesClusterVersionWithOptionsE(t testing.TestingT, kubectlOptions *KubectlOptions) (string, error) + func GetNamespace(t testing.TestingT, options *KubectlOptions, namespaceName string) *corev1.Namespace + func GetNamespaceE(t testing.TestingT, options *KubectlOptions, namespaceName string) (*corev1.Namespace, error) + func GetNetworkPolicy(t testing.TestingT, options *KubectlOptions, networkPolicyName string) *networkingv1.NetworkPolicy + func GetNetworkPolicyE(t testing.TestingT, options *KubectlOptions, networkPolicyName string) (*networkingv1.NetworkPolicy, error) + func GetNodes(t testing.TestingT, options *KubectlOptions) []corev1.Node + func GetNodesByFilterE(t testing.TestingT, options *KubectlOptions, filter metav1.ListOptions) ([]corev1.Node, error) + func GetNodesE(t testing.TestingT, options *KubectlOptions) ([]corev1.Node, error) + func GetPersistentVolume(t testing.TestingT, options *KubectlOptions, name string) *corev1.PersistentVolume + func GetPersistentVolumeClaim(t testing.TestingT, options *KubectlOptions, pvcName string) *corev1.PersistentVolumeClaim + func GetPersistentVolumeClaimE(t testing.TestingT, options *KubectlOptions, pvcName string) (*corev1.PersistentVolumeClaim, error) + func GetPersistentVolumeE(t testing.TestingT, options *KubectlOptions, name string) (*corev1.PersistentVolume, error) + func GetPod(t testing.TestingT, options *KubectlOptions, podName string) *corev1.Pod + func GetPodE(t testing.TestingT, options *KubectlOptions, podName string) (*corev1.Pod, error) + func GetPodLogs(t testing.TestingT, options *KubectlOptions, pod *corev1.Pod, ...) string + func GetPodLogsE(t testing.TestingT, options *KubectlOptions, pod *corev1.Pod, ...) (string, error) + func GetReadyNodes(t testing.TestingT, options *KubectlOptions) []corev1.Node + func GetReadyNodesE(t testing.TestingT, options *KubectlOptions) ([]corev1.Node, error) + func GetReplicaSet(t testing.TestingT, options *KubectlOptions, replicaSetName string) *appsv1.ReplicaSet + func GetReplicaSetE(t testing.TestingT, options *KubectlOptions, replicaSetName string) (*appsv1.ReplicaSet, error) + func GetRole(t testing.TestingT, options *KubectlOptions, roleName string) *rbacv1.Role + func GetRoleE(t testing.TestingT, options *KubectlOptions, roleName string) (*rbacv1.Role, error) + func GetSecret(t testing.TestingT, options *KubectlOptions, secretName string) *corev1.Secret + func GetSecretE(t testing.TestingT, options *KubectlOptions, secretName string) (*corev1.Secret, error) + func GetService(t testing.TestingT, options *KubectlOptions, serviceName string) *corev1.Service + func GetServiceAccount(t testing.TestingT, options *KubectlOptions, serviceAccountName string) *corev1.ServiceAccount + func GetServiceAccountAuthToken(t testing.TestingT, kubectlOptions *KubectlOptions, serviceAccountName string) string + func GetServiceAccountAuthTokenE(t testing.TestingT, kubectlOptions *KubectlOptions, serviceAccountName string) (string, error) + func GetServiceAccountE(t testing.TestingT, options *KubectlOptions, serviceAccountName string) (*corev1.ServiceAccount, error) + func GetServiceE(t testing.TestingT, options *KubectlOptions, serviceName string) (*corev1.Service, error) + func GetServiceEndpoint(t testing.TestingT, options *KubectlOptions, service *corev1.Service, ...) string + func GetServiceEndpointE(t testing.TestingT, options *KubectlOptions, service *corev1.Service, ...) (string, error) + func IsDeploymentAvailable(deploy *appsv1.Deployment) bool + func IsIngressAvailable(ingress *networkingv1.Ingress) bool + func IsIngressAvailableV1Beta1(ingress *networkingv1beta1.Ingress) bool + func IsJobSucceeded(job *batchv1.Job) bool + func IsMinikubeE(t testing.TestingT, options *KubectlOptions) (bool, error) + func IsNodeReady(node corev1.Node) bool + func IsPersistentVolumeClaimInStatus(pvc *corev1.PersistentVolumeClaim, ...) bool + func IsPersistentVolumeInStatus(pv *corev1.PersistentVolume, pvStatusPhase *corev1.PersistentVolumePhase) bool + func IsPodAvailable(pod *corev1.Pod) bool + func IsServiceAvailable(service *corev1.Service) bool + func KubeConfigPathFromHomeDirE() (string, error) + func KubectlApply(t testing.TestingT, options *KubectlOptions, configPath string) + func KubectlApplyE(t testing.TestingT, options *KubectlOptions, configPath string) error + func KubectlApplyFromKustomize(t testing.TestingT, options *KubectlOptions, configPath string) + func KubectlApplyFromKustomizeE(t testing.TestingT, options *KubectlOptions, configPath string) error + func KubectlApplyFromString(t testing.TestingT, options *KubectlOptions, configData string) + func KubectlApplyFromStringE(t testing.TestingT, options *KubectlOptions, configData string) error + func KubectlDelete(t testing.TestingT, options *KubectlOptions, configPath string) + func KubectlDeleteE(t testing.TestingT, options *KubectlOptions, configPath string) error + func KubectlDeleteFromKustomize(t testing.TestingT, options *KubectlOptions, configPath string) + func KubectlDeleteFromKustomizeE(t testing.TestingT, options *KubectlOptions, configPath string) error + func KubectlDeleteFromString(t testing.TestingT, options *KubectlOptions, configData string) + func KubectlDeleteFromStringE(t testing.TestingT, options *KubectlOptions, configData string) error + func ListDaemonSets(t testing.TestingT, options *KubectlOptions, filters metav1.ListOptions) []appsv1.DaemonSet + func ListDaemonSetsE(t testing.TestingT, options *KubectlOptions, filters metav1.ListOptions) ([]appsv1.DaemonSet, error) + func ListDeployments(t testing.TestingT, options *KubectlOptions, filters metav1.ListOptions) []appsv1.Deployment + func ListDeploymentsE(t testing.TestingT, options *KubectlOptions, filters metav1.ListOptions) ([]appsv1.Deployment, error) + func ListEvents(t testing.TestingT, options *KubectlOptions, filters metav1.ListOptions) []corev1.Event + func ListEventsE(t testing.TestingT, options *KubectlOptions, filters metav1.ListOptions) ([]corev1.Event, error) + func ListIngresses(t testing.TestingT, options *KubectlOptions, filters metav1.ListOptions) []networkingv1.Ingress + func ListIngressesE(t testing.TestingT, options *KubectlOptions, filters metav1.ListOptions) ([]networkingv1.Ingress, error) + func ListIngressesV1Beta1(t testing.TestingT, options *KubectlOptions, filters metav1.ListOptions) []networkingv1beta1.Ingress + func ListIngressesV1Beta1E(t testing.TestingT, options *KubectlOptions, filters metav1.ListOptions) ([]networkingv1beta1.Ingress, error) + func ListJobs(t testing.TestingT, options *KubectlOptions, filters metav1.ListOptions) []batchv1.Job + func ListJobsE(t testing.TestingT, options *KubectlOptions, filters metav1.ListOptions) ([]batchv1.Job, error) + func ListPersistentVolumeClaims(t testing.TestingT, options *KubectlOptions, filters metav1.ListOptions) []corev1.PersistentVolumeClaim + func ListPersistentVolumeClaimsE(t testing.TestingT, options *KubectlOptions, filters metav1.ListOptions) ([]corev1.PersistentVolumeClaim, error) + func ListPersistentVolumes(t testing.TestingT, options *KubectlOptions, filters metav1.ListOptions) []corev1.PersistentVolume + func ListPersistentVolumesE(t testing.TestingT, options *KubectlOptions, filters metav1.ListOptions) ([]corev1.PersistentVolume, error) + func ListPods(t testing.TestingT, options *KubectlOptions, filters metav1.ListOptions) []corev1.Pod + func ListPodsE(t testing.TestingT, options *KubectlOptions, filters metav1.ListOptions) ([]corev1.Pod, error) + func ListReplicaSets(t testing.TestingT, options *KubectlOptions, filters metav1.ListOptions) []appsv1.ReplicaSet + func ListReplicaSetsE(t testing.TestingT, options *KubectlOptions, filters metav1.ListOptions) ([]appsv1.ReplicaSet, error) + func ListServices(t testing.TestingT, options *KubectlOptions, filters metav1.ListOptions) []corev1.Service + func ListServicesE(t testing.TestingT, options *KubectlOptions, filters metav1.ListOptions) ([]corev1.Service, error) + func LoadApiClientConfigE(configPath string, contextName string) (*restclient.Config, error) + func LoadConfigFromPath(path string) clientcmd.ClientConfig + func RemoveOrphanedClusterAndAuthInfoConfig(config *api.Config) + func RunKubectl(t testing.TestingT, options *KubectlOptions, args ...string) + func RunKubectlAndGetOutputE(t testing.TestingT, options *KubectlOptions, args ...string) (string, error) + func RunKubectlE(t testing.TestingT, options *KubectlOptions, args ...string) error + func StoreConfigToTempFile(t testing.TestingT, configData string) string + func StoreConfigToTempFileE(t testing.TestingT, configData string) (string, error) + func UnmarshalJSONPath(t testing.TestingT, jsonData []byte, jsonpathStr string, output interface{}) + func UnmarshalJSONPathE(t testing.TestingT, jsonData []byte, jsonpathStr string, output interface{}) error + func UpsertConfigContext(config *api.Config, contextName string, clusterName string, userName string) + func WaitUntilAllNodesReady(t testing.TestingT, options *KubectlOptions, retries int, ...) + func WaitUntilAllNodesReadyE(t testing.TestingT, options *KubectlOptions, retries int, ...) error + func WaitUntilConfigMapAvailable(t testing.TestingT, options *KubectlOptions, configMapName string, retries int, ...) + func WaitUntilDeploymentAvailable(t testing.TestingT, options *KubectlOptions, deploymentName string, ...) + func WaitUntilDeploymentAvailableE(t testing.TestingT, options *KubectlOptions, deploymentName string, ...) error + func WaitUntilIngressAvailable(t testing.TestingT, options *KubectlOptions, ingressName string, retries int, ...) + func WaitUntilIngressAvailableV1Beta1(t testing.TestingT, options *KubectlOptions, ingressName string, retries int, ...) + func WaitUntilJobSucceed(t testing.TestingT, options *KubectlOptions, jobName string, retries int, ...) + func WaitUntilJobSucceedE(t testing.TestingT, options *KubectlOptions, jobName string, retries int, ...) error + func WaitUntilNetworkPolicyAvailable(t testing.TestingT, options *KubectlOptions, networkPolicyName string, ...) + func WaitUntilNumPodsCreated(t testing.TestingT, options *KubectlOptions, filters metav1.ListOptions, ...) + func WaitUntilNumPodsCreatedE(t testing.TestingT, options *KubectlOptions, filters metav1.ListOptions, ...) error + func WaitUntilPersistentVolumeClaimInStatus(t testing.TestingT, options *KubectlOptions, pvcName string, ...) + func WaitUntilPersistentVolumeClaimInStatusE(t testing.TestingT, options *KubectlOptions, pvcName string, ...) error + func WaitUntilPersistentVolumeInStatus(t testing.TestingT, options *KubectlOptions, pvName string, ...) + func WaitUntilPersistentVolumeInStatusE(t testing.TestingT, options *KubectlOptions, pvName string, ...) error + func WaitUntilPodAvailable(t testing.TestingT, options *KubectlOptions, podName string, retries int, ...) + func WaitUntilPodAvailableE(t testing.TestingT, options *KubectlOptions, podName string, retries int, ...) error + func WaitUntilSecretAvailable(t testing.TestingT, options *KubectlOptions, secretName string, retries int, ...) + func WaitUntilServiceAvailable(t testing.TestingT, options *KubectlOptions, serviceName string, retries int, ...) + type DeploymentNotAvailable struct + func NewDeploymentNotAvailableError(deploy *appsv1.Deployment) DeploymentNotAvailable + func (err DeploymentNotAvailable) Error() string + type DesiredNumberOfPodsNotCreated struct + DesiredCount int + Filter metav1.ListOptions + func (err DesiredNumberOfPodsNotCreated) Error() string + type IngressNotAvailable struct + func (err IngressNotAvailable) Error() string + type IngressNotAvailableV1Beta1 struct + func (err IngressNotAvailableV1Beta1) Error() string + type JSONPathExtractJSONPathErr struct + func (err JSONPathExtractJSONPathErr) Error() string + type JSONPathMalformedJSONErr struct + func (err JSONPathMalformedJSONErr) Error() string + type JSONPathMalformedJSONPathErr struct + func (err JSONPathMalformedJSONPathErr) Error() string + type JSONPathMalformedJSONPathResultErr struct + func (err JSONPathMalformedJSONPathResultErr) Error() string + type JobNotSucceeded struct + func NewJobNotSucceeded(job *batchv1.Job) JobNotSucceeded + func (err JobNotSucceeded) Error() string + type KubeResourceType int + const ResourceTypeDeployment + const ResourceTypePod + const ResourceTypeService + func (resourceType KubeResourceType) String() string + type KubectlOptions struct + ConfigPath string + ContextName string + Env map[string]string + InClusterAuth bool + Namespace string + func NewKubectlOptions(contextName string, configPath string, namespace string) *KubectlOptions + func NewKubectlOptionsWithInClusterAuth() *KubectlOptions + func (kubectlOptions *KubectlOptions) GetConfigPath(t testing.TestingT) (string, error) + type MalformedNodeID struct + func NewMalformedNodeIDError(node *corev1.Node) MalformedNodeID + func (err MalformedNodeID) Error() string + type NoNodesInKubernetes struct + func NewNoNodesInKubernetesError() NoNodesInKubernetes + func (err NoNodesInKubernetes) Error() string + type NodeHasNoHostname struct + func NewNodeHasNoHostnameError(node *corev1.Node) NodeHasNoHostname + func (err NodeHasNoHostname) Error() string + type PersistentVolumeClaimNotInStatus struct + func NewPersistentVolumeClaimNotInStatusError(pvc *corev1.PersistentVolumeClaim, ...) PersistentVolumeClaimNotInStatus + func (err PersistentVolumeClaimNotInStatus) Error() string + type PersistentVolumeNotInStatus struct + func NewPersistentVolumeNotInStatusError(pv *corev1.PersistentVolume, pvStatusPhase *corev1.PersistentVolumePhase) PersistentVolumeNotInStatus + func (err PersistentVolumeNotInStatus) Error() string + type PodNotAvailable struct + func NewPodNotAvailableError(pod *corev1.Pod) PodNotAvailable + func (err PodNotAvailable) Error() string + type ServiceAccountTokenNotAvailable struct + Name string + func (err ServiceAccountTokenNotAvailable) Error() string + type ServiceNotAvailable struct + func NewServiceNotAvailableError(service *corev1.Service) ServiceNotAvailable + func (err ServiceNotAvailable) Error() string + type Tunnel struct + func NewTunnel(kubectlOptions *KubectlOptions, resourceType KubeResourceType, ...) *Tunnel + func NewTunnelWithLogger(kubectlOptions *KubectlOptions, resourceType KubeResourceType, ...) *Tunnel + func (tunnel *Tunnel) Close() + func (tunnel *Tunnel) Endpoint() string + func (tunnel *Tunnel) ForwardPort(t testing.TestingT) + func (tunnel *Tunnel) ForwardPortE(t testing.TestingT) error + type UnknownKubeResourceType struct + ResourceType KubeResourceType + func (err UnknownKubeResourceType) Error() string + type UnknownServicePort struct + func NewUnknownServicePortError(service *corev1.Service, port int32) UnknownServicePort + func (err UnknownServicePort) Error() string + type UnknownServiceType struct + func NewUnknownServiceTypeError(service *corev1.Service) UnknownServiceType + func (err UnknownServiceType) Error() string