Documentation ¶
Index ¶
- Variables
- func CheckPodsAreReady(fetchFunc PodFetchFunc) ([]corev1.Pod, error)
- func DeleteOptionsForeground() metav1.DeleteOptions
- func DumpCoreDumps(_ resource.Context, c cluster.Cluster, workDir string, namespace string, ...)
- func DumpDebug(ctx resource.Context, c cluster.Cluster, workDir, endpoint, namespace string)
- func DumpDeployments(ctx resource.Context, workDir, namespace string)
- func DumpPodAgent(ctx resource.Context, c cluster.Cluster, workDir string, _ string, ...)
- func DumpPodEnvoy(ctx resource.Context, c cluster.Cluster, workDir, namespace string, ...)
- func DumpPodEvents(_ resource.Context, c cluster.Cluster, workDir, namespace string, ...)
- func DumpPodLogs(_ resource.Context, c cluster.Cluster, workDir, namespace string, ...)
- func DumpPodState(_ resource.Context, c cluster.Cluster, workDir string, namespace string, ...)
- func DumpPods(ctx resource.Context, workDir, namespace string, selectors []string, ...)
- func DumpWebhooks(ctx resource.Context, workDir string)
- func MutatingWebhookConfigurationsExists(a kubernetes.Interface, names []string) bool
- func NamespaceExists(a kubernetes.Interface, ns string) bool
- func ValidatingWebhookConfigurationsExists(a kubernetes.Interface, names []string) bool
- func WaitForNamespaceDeletion(a kubernetes.Interface, ns string, opts ...retry.Option) error
- func WaitForSecretToExist(a kubernetes.Interface, namespace, name string, waitTime time.Duration) (*corev1.Secret, error)
- func WaitForSecretToExistOrFail(t test.Failer, a kubernetes.Interface, namespace, name string, ...) *corev1.Secret
- func WaitUntilPodsAreReady(fetchFunc PodFetchFunc, opts ...retry.Option) ([]corev1.Pod, error)
- func WaitUntilServiceEndpointsAreReady(a kubernetes.Interface, ns string, name string, opts ...retry.Option) (*corev1.Service, *corev1.Endpoints, error)
- func WaitUntilServiceLoadBalancerReady(a kubernetes.Interface, ns string, name string, opts ...retry.Option) (string, error)
- type PodDumper
- type PodFetchFunc
Constants ¶
This section is empty.
Variables ¶
var (
ErrNoPodsFetched = fmt.Errorf("no pods fetched")
)
Functions ¶
func CheckPodsAreReady ¶
func CheckPodsAreReady(fetchFunc PodFetchFunc) ([]corev1.Pod, error)
CheckPodsAreReady checks whether the pods that are selected by the given function is in ready state or not.
func DeleteOptionsForeground ¶
func DeleteOptionsForeground() metav1.DeleteOptions
DeleteOptionsForeground creates new delete options that will block until the operation completes.
func DumpCoreDumps ¶
func DumpDeployments ¶
func DumpPodAgent ¶
func DumpPodEnvoy ¶
func DumpPodEnvoy(ctx resource.Context, c cluster.Cluster, workDir, namespace string, pods ...corev1.Pod)
DumpPodEnvoy will dump Envoy proxy config and clusters in each of the provided pods or all pods in the namespace if none are provided.
func DumpPodEvents ¶
func DumpPodEvents(_ resource.Context, c cluster.Cluster, workDir, namespace string, pods ...corev1.Pod)
DumpPodEvents dumps the pod events for either the provided pods or all pods in the namespace if none are provided.
func DumpPodLogs ¶
func DumpPodLogs(_ resource.Context, c cluster.Cluster, workDir, namespace string, pods ...corev1.Pod)
DumpPodLogs will dump logs from each container in each of the provided pods or all pods in the namespace if none are provided.
func DumpPodState ¶
func DumpPodState(_ resource.Context, c cluster.Cluster, workDir string, namespace string, pods ...corev1.Pod)
DumpPodState dumps the pod state for either the provided pods or all pods in the namespace if none are provided.
func DumpPods ¶
func DumpPods(ctx resource.Context, workDir, namespace string, selectors []string, dumpers ...PodDumper)
DumpPods runs each dumper with the selected pods in the given namespace. If selectors is empty, all pods in the namespace will be dumpped. If no dumpers are provided, their resource state, events, container logs and Envoy information will be dumped.
func DumpWebhooks ¶
func MutatingWebhookConfigurationsExists ¶
func MutatingWebhookConfigurationsExists(a kubernetes.Interface, names []string) bool
MutatingWebhookConfigurationsExists returns true if all the given mutating webhook configs exist.
func NamespaceExists ¶
func NamespaceExists(a kubernetes.Interface, ns string) bool
NamespaceExists returns true if the given namespace exists.
func ValidatingWebhookConfigurationsExists ¶
func ValidatingWebhookConfigurationsExists(a kubernetes.Interface, names []string) bool
ValidatingWebhookConfigurationsExists returns true if all the given validating webhook configs exist.
func WaitForNamespaceDeletion ¶
WaitForNamespaceDeletion waits until a namespace is deleted.
func WaitForSecretToExist ¶
func WaitForSecretToExist(a kubernetes.Interface, namespace, name string, waitTime time.Duration) (*corev1.Secret, error)
WaitForSecretToExist waits for the given secret up to the given waitTime.
func WaitForSecretToExistOrFail ¶
func WaitForSecretToExistOrFail(t test.Failer, a kubernetes.Interface, namespace, name string, waitTime time.Duration, ) *corev1.Secret
WaitForSecretToExistOrFail calls WaitForSecretToExist and fails the given test.Failer if an error occurs.
func WaitUntilPodsAreReady ¶
WaitUntilPodsAreReady waits until the pod with the name/namespace is in ready state.
func WaitUntilServiceEndpointsAreReady ¶
func WaitUntilServiceEndpointsAreReady(a kubernetes.Interface, ns string, name string, opts ...retry.Option, ) (*corev1.Service, *corev1.Endpoints, error)
WaitUntilServiceEndpointsAreReady will wait until the service with the given name/namespace is present, and have at least one usable endpoint.
Types ¶
type PodDumper ¶
type PodDumper func(ctx resource.Context, cluster cluster.Cluster, workDir string, namespace string, pods ...corev1.Pod)
PodDumper will dump information from all the pods into the given workDir. If no pods are provided, client will be used to fetch all the pods in a namespace.
type PodFetchFunc ¶
PodFetchFunc fetches pods from a k8s Client.
func NewPodFetch ¶
func NewPodFetch(a istioKube.CLIClient, namespace string, selectors ...string) PodFetchFunc
NewPodFetch creates a new PodFetchFunction that fetches all pods matching the namespace and label selectors.
func NewPodMustFetch ¶
func NewPodMustFetch(a istioKube.CLIClient, namespace string, selectors ...string) PodFetchFunc
NewPodMustFetch creates a new PodFetchFunction that fetches all pods matching the namespace and label selectors. If no pods are found, an error is returned
func NewSinglePodFetch ¶
func NewSinglePodFetch(a istioKube.CLIClient, namespace string, selectors ...string) PodFetchFunc
NewSinglePodFetch creates a new PodFetchFunction that fetches a single pod matching the given label selectors.