package
0.0.0-20191024030528-a481964b876e
Repository: https://github.com/divinerapier/learn-kubernetes.git
Documentation: pkg.go.dev

# Functions

BreakHTTPProbe breaks the readiness probe for Nginx StatefulSet containers in ss.
BreakPodHTTPProbe breaks the readiness probe for Nginx StatefulSet containers in one pod.
CheckHostname verifies that all Pods in ss have the correct Hostname.
CheckMount checks that the mount at mountPath is valid for all Pods in ss.
CheckServiceName asserts that the ServiceName for ss is equivalent to expectedServiceName.
CreateStatefulSet creates a StatefulSet from the manifest at manifestPath in the Namespace ns using kubectl create.
CreateStatefulSetService creates a Headless Service with Name name and Selector set to match labels.
DeleteAllStatefulSets deletes all StatefulSet API Objects in Namespace ns.
DeleteStatefulPodAtIndex deletes the Pod with ordinal index in ss.
ExecInStatefulPods executes cmd in all Pods in ss.
GetPodList gets the current Pods in ss.
GetStatefulSet gets the StatefulSet named name in namespace.
NewStatefulSet creates a new Webserver StatefulSet for testing.
NewStatefulSetPVC returns a PersistentVolumeClaim named name, for testing StatefulSets.
PauseNewPods adds an always-failing ReadinessProbe to the StatefulSet PodTemplate.
Restart scales ss to 0 and then back to its previous number of replicas.
RestoreHTTPProbe restores the readiness probe for Nginx StatefulSet containers in ss.
RestorePodHTTPProbe restores the readiness probe for Nginx StatefulSet containers in pod.
ResumeNextPod allows the next Pod in the StatefulSet to continue by removing the ReadinessProbe added by PauseNewPods(), if it's still there.
Saturate waits for all Pods in ss to become Running and Ready.
Scale scales ss to count replicas.
SetHTTPProbe sets the pod template's ReadinessProbe for Webserver StatefulSet containers.
SortStatefulPods sorts pods by their ordinals.
UpdateReplicas updates the replicas of ss to count.
UpdateStatefulSetWithRetries updates statfulset template with retries.
VerifyPodAtIndex applies a visitor pattern to the Pod at index in ss.
WaitForPartitionedRollingUpdate waits for all Pods in set to exist and have the correct revision.
WaitForPodNotReady waits for the Pod named podName in set to exist and to not have a Ready condition.
WaitForPodReady waits for the Pod named podName in set to exist and have a Ready condition.
WaitForRollingUpdate waits for all Pods in set to exist and have the correct revision and for the RollingUpdate to complete.
WaitForRunning waits for numPodsRunning in ss to be Running and for the first numPodsReady ordinals to be Ready.
WaitForRunningAndNotReady waits for numStatefulPods in ss to be Running and not Ready.
WaitForRunningAndReady waits for numStatefulPods in ss to be Running and Ready.
WaitForState periodically polls for the ss and its pods until the until function returns either true or an error.
WaitForStatus waits for the StatefulSetStatus's ObservedGeneration to be greater than or equal to set's Generation.
WaitForStatusReadyReplicas waits for the ss.Status.ReadyReplicas to be equal to expectedReplicas.
WaitForStatusReplicas waits for the ss.Status.Replicas to be equal to expectedReplicas.

# Constants

StatefulPodTimeout is a timeout for stateful pods to change state.
StatefulSetPoll is a poll interval for StatefulSet tests.
StatefulSetTimeout is a timeout interval for StatefulSet operations.

# Type aliases

VerifyStatefulPodFunc is a func that examines a StatefulSetPod.