# Functions
AddConfigContextForServiceAccountE will add a new config context that binds the ServiceAccount auth token to the Kubernetes cluster of the current config context.
AreAllNodesReady checks if all nodes are ready in the Kubernetes cluster targeted by the current config context.
AreAllNodesReadyE checks if all nodes are ready in the Kubernetes cluster targeted by the current config context.
CanIDo returns whether or not the provided action is allowed by the client configured by the provided kubectl option.
CanIDoE returns whether or not the provided action is allowed by the client configured by the provided kubectl option.
CopyHomeKubeConfigToTemp will copy the kubeconfig in the home directory to a temp file.
CopyHomeKubeConfigToTemp will copy the kubeconfig in the home directory to a temp file.
CreateNamespace will create a new Kubernetes namespace on the cluster targeted by the provided options.
CreateNamespaceE will create a new Kubernetes namespace on the cluster targeted by the provided options.
CreateServiceAccount will create a new service account resource in the provided namespace with the given name.
CreateServiceAccountE will create a new service account resource in the provided namespace with the given name.
DeleteConfigContextE will remove the context specified at the provided name, and remove any clusters and authinfos that are orphaned as a result of it.
DeleteConfigContextWithPathE will remove the context specified at the provided name, and remove any clusters and authinfos that are orphaned as a result of it.
DeleteNamespace will delete the requested namespace from the Kubernetes cluster targeted by the provided options.
DeleteNamespaceE will delete the requested namespace from the Kubernetes cluster targeted by the provided options.
GetAvailablePort retrieves an available port on the host machine.
GetAvailablePortE retrieves an available port on the host machine.
GetClusterRole returns a Kubernetes ClusterRole resource with the given name.
GetClusterRoleE returns a Kubernetes ClusterRole resource with the given name.
GetKubeConfigPathE determines which file path to use as the kubectl config path.
GetKubernetesClientE returns a Kubernetes API client that can be used to make requests.
GetKubernetesClientFromOptionsE returns a Kubernetes API client given a configured KubectlOptions object.
GetNamespace will query the Kubernetes cluster targeted by the provided options for the requested namespace.
GetNamespaceE will query the Kubernetes cluster targeted by the provided options for the requested namespace.
GetNodes queries Kubernetes for information about the worker nodes registered to the cluster.
GetNodesE queries Kubernetes for information about the worker nodes registered to the cluster.
GetPod returns a Kubernetes pod resource in the provided namespace with the given name.
GetPodE returns a Kubernetes pod resource in the provided namespace with the given name.
GetReadyNodes queries Kubernetes for information about the worker nodes registered to the cluster and only returns those that are in the ready state.
GetReadyNodesE queries Kubernetes for information about the worker nodes registered to the cluster and only returns those that are in the ready state.
GetRole returns a Kubernetes role resource in the provided namespace with the given name.
GetRole returns a Kubernetes role resource in the provided namespace with the given name.
GetSecret returns a Kubernetes secret resource in the provided namespace with the given name.
GetSecret returns a Kubernetes secret resource in the provided namespace with the given name.
GetService returns a Kubernetes service resource in the provided namespace with the given name.
GetServiceAccount returns a Kubernetes service account resource in the provided namespace with the given name.
GetServiceAccountWithAuthTokenE will retrieve the ServiceAccount token from the cluster so it can be used to authenticate requests as that ServiceAccount.
GetServiceAccountWithAuthTokenE will retrieve the ServiceAccount token from the cluster so it can be used to authenticate requests as that ServiceAccount.
GetServiceAccount returns a Kubernetes service account resource in the provided namespace with the given name.
GetServiceE returns a Kubernetes service resource in the provided namespace with the given name.
GetServiceEndpoint will return the service access point.
GetServiceEndpointE will return the service access point using the following logic: - For ClusterIP service type, return the URL that maps to ClusterIP and Service Port - For NodePort service type, identify the public IP of the node (if it exists, otherwise return the bound hostname), and the assigned node port for the provided service port, and return the URL that maps to node ip and node port.
IsNodeReady takes a Kubernetes Node information object and checks if the Node is in the ready state.
IsPodAvailable returns true if the pod is running.
IsServiceAvailable returns true if the service endpoint is ready to accept traffic.
KubeConfigPathFromHomeDirE returns a string to the default Kubernetes config path in the home directory.
KubectlApply will take in a file path and apply it to the cluster targeted by KubectlOptions.
KubectlApplyE will take in a file path and apply it to the cluster targeted by KubectlOptions.
KubectlApplyFromString will take in a kubernetes resource config as a string and apply it on the cluster specified by the provided kubectl options.
KubectlApplyFromStringE will take in a kubernetes resource config as a string and apply it on the cluster specified by the provided kubectl options.
KubectlDelete will take in a file path and delete it from the cluster targeted by KubectlOptions.
KubectlDeleteE will take in a file path and delete it from the cluster targeted by KubectlOptions.
KubectlDeleteFromString will take in a kubernetes resource config as a string and delete it on the cluster specified by the provided kubectl options.
KubectlDeleteFromStringE will take in a kubernetes resource config as a string and delete it on the cluster specified by the provided kubectl options.
ListPods will look for pods in the given namespace that match the given filters and return them.
ListPodsE will look for pods in the given namespace that match the given filters and return them.
ListServices will look for services in the given namespace that match the given filters and return them.
ListServicesE will look for services in the given namespace that match the given filters and return them.
LoadApiClientConfig will load a ClientConfig object from a file path that points to a location on disk containing a kubectl config, with the requested context loaded.
LoadConfigFromPath will load a ClientConfig object from a file path that points to a location on disk containing a kubectl config.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewTunnel will create a new Tunnel struct.
No description provided by the author
No description provided by the author
RemoveOrphanedClusterAndAuthInfoConfig will remove all configurations related to clusters and users that have no contexts associated with it.
RunKubectl will call kubectl using the provided options and args, failing the test on error.
RunKubectlAndGetOutputE will call kubectl using the provided options and args, returning the output of stdout and stderr.
RunKubectlE will call kubectl using the provided options and args.
StoreConfigToTempFile will store the provided config data to a temporary file created on the os and return the filename.
StoreConfigToTempFileE will store the provided config data to a temporary file created on the os and return the filename, or error.
UpsertConfigContext will update or insert a new context to the provided config, binding the provided cluster to the provided user.
WaitUntilAllNodesReady continuously polls the Kubernetes cluster until all nodes in the cluster reach the ready state, or runs out of retries.
WaitUntilAllNodesReadyE continuously polls the Kubernetes cluster until all nodes in the cluster reach the ready state, or runs out of retries.
WaitUntilNumPodsCreated waits until the desired number of pods are created that match the provided filter.
WaitUntilNumPodsCreatedE waits until the desired number of pods are created that match the provided filter.
WaitUntilPodAvailable waits until the pod is running, retrying the check for the specified amount of times, sleeping for the provided duration between each try.
WaitUntilPodAvailableE waits until the pod is running, retrying the check for the specified amount of times, sleeping for the provided duration between each try.
WaitUntilServiceAvailable waits until the service endpoint is ready to accept traffic.
# Constants
No description provided by the author
No description provided by the author
# Structs
DesiredNumberOfPodsNotCreated is returned when the number of pods matching a filter condition does not match the desired number of Pods.
Represents common options necessary to specify for all Kubectl calls.
MalformedNodeID is returned when a Kubernetes node has a malformed node id scheme.
NodeHasNoHostname is returned when a Kubernetes node has no discernible hostname.
NoNodesInKubernetes is returned when the Kubernetes cluster has no nodes registered.
PodNotAvailable is returned when a Kubernetes service is not yet available to accept traffic.
ServiceAccountTokenNotAvailable is returned when a Kubernetes ServiceAccount does not have a token provisioned yet.
ServiceNotAvailable is returned when a Kubernetes service is not yet available to accept traffic.
Tunnel is the main struct that configures and manages port forwading tunnels to Kubernetes resources.
UnknownKubeResourceType is returned if the given resource type does not match the list of known resource types.
UnknownServicePort is returned when the given service port is not an exported port of the service.
UnknownServiceType is returned when a Kubernetes service has a type that is not yet handled by the test functions.
# Type aliases
KubeResourceType is an enum representing known resource types that can support port forwarding.