Documentation ¶
Index ¶
- type Condition
- func (c *Condition) ContainersReady(pod k8s.Object) apimachinerywait.ConditionWithContextFunc
- func (c *Condition) DaemonSetReady(daemonset k8s.Object) apimachinerywait.ConditionWithContextFunc
- func (c *Condition) DeploymentAvailable(name, namespace string) apimachinerywait.ConditionWithContextFunc
- func (c *Condition) DeploymentConditionMatch(deployment k8s.Object, conditionType appsv1.DeploymentConditionType, ...) apimachinerywait.ConditionWithContextFunc
- func (c *Condition) JobCompleted(job k8s.Object) apimachinerywait.ConditionWithContextFunc
- func (c *Condition) JobConditionMatch(job k8s.Object, conditionType batchv1.JobConditionType, ...) apimachinerywait.ConditionWithContextFunc
- func (c *Condition) JobFailed(job k8s.Object) apimachinerywait.ConditionWithContextFunc
- func (c *Condition) PodConditionMatch(pod k8s.Object, conditionType v1.PodConditionType, ...) apimachinerywait.ConditionWithContextFunc
- func (c *Condition) PodPhaseMatch(pod k8s.Object, phase v1.PodPhase) apimachinerywait.ConditionWithContextFunc
- func (c *Condition) PodReady(pod k8s.Object) apimachinerywait.ConditionWithContextFunc
- func (c *Condition) PodRunning(pod k8s.Object) apimachinerywait.ConditionWithContextFunc
- func (c *Condition) ResourceDeleted(obj k8s.Object) apimachinerywait.ConditionWithContextFunc
- func (c *Condition) ResourceListMatchN(list k8s.ObjectList, n int, matchFetcher func(object k8s.Object) bool, ...) apimachinerywait.ConditionWithContextFunc
- func (c *Condition) ResourceListN(list k8s.ObjectList, n int, listOptions ...resources.ListOption) apimachinerywait.ConditionWithContextFunc
- func (c *Condition) ResourceMatch(obj k8s.Object, matchFetcher func(object k8s.Object) bool) apimachinerywait.ConditionWithContextFunc
- func (c *Condition) ResourceScaled(obj k8s.Object, scaleFetcher func(object k8s.Object) int32, replica int32) apimachinerywait.ConditionWithContextFunc
- func (c *Condition) ResourcesDeleted(list k8s.ObjectList) apimachinerywait.ConditionWithContextFunc
- func (c *Condition) ResourcesFound(list k8s.ObjectList) apimachinerywait.ConditionWithContextFunc
- func (c *Condition) ResourcesMatch(list k8s.ObjectList, matchFetcher func(object k8s.Object) bool) apimachinerywait.ConditionWithContextFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Condition ¶
type Condition struct {
// contains filtered or unexported fields
}
func New ¶
New is used to create a new Condition that can be used to perform a series of pre-defined wait checks against a resource in question
func (*Condition) ContainersReady ¶
func (c *Condition) ContainersReady(pod k8s.Object) apimachinerywait.ConditionWithContextFunc
ContainersReady is a helper function used to check if the pod condition v1.ContainersReady has reached v1.ConditionTrue
func (*Condition) DaemonSetReady ¶ added in v0.4.0
func (c *Condition) DaemonSetReady(daemonset k8s.Object) apimachinerywait.ConditionWithContextFunc
DaemonSetReady is a helper function used to check if a daemonset's pods are scheduled and ready
func (*Condition) DeploymentAvailable ¶ added in v0.3.0
func (c *Condition) DeploymentAvailable(name, namespace string) apimachinerywait.ConditionWithContextFunc
DeploymentAvailable is a helper function used to check if the deployment condition appsv1.DeploymentAvailable has reached v1.ConditionTrue state
func (*Condition) DeploymentConditionMatch ¶
func (c *Condition) DeploymentConditionMatch(deployment k8s.Object, conditionType appsv1.DeploymentConditionType, conditionState v1.ConditionStatus) apimachinerywait.ConditionWithContextFunc
DeploymentConditionMatch is a helper function that can be used to check a specific condition match for the Deployment in question.
func (*Condition) JobCompleted ¶
func (c *Condition) JobCompleted(job k8s.Object) apimachinerywait.ConditionWithContextFunc
JobCompleted is a helper function used to check if the Job has been completed successfully by checking if the batchv1.JobCompleted has reached the v1.ConditionTrue state
func (*Condition) JobConditionMatch ¶
func (c *Condition) JobConditionMatch(job k8s.Object, conditionType batchv1.JobConditionType, conditionState v1.ConditionStatus) apimachinerywait.ConditionWithContextFunc
JobConditionMatch is a helper function that can be used to check the Job Completion or runtime status against a specific condition. This function accepts both conditionType and conditionState as argument and hence you can use this to match both positive or negative cases with suitable values passed to the arguments.
func (*Condition) JobFailed ¶
func (c *Condition) JobFailed(job k8s.Object) apimachinerywait.ConditionWithContextFunc
JobFailed is a helper function used to check if the Job has failed by checking if the batchv1.JobFailed has reached v1.ConditionTrue state
func (*Condition) PodConditionMatch ¶
func (c *Condition) PodConditionMatch(pod k8s.Object, conditionType v1.PodConditionType, conditionState v1.ConditionStatus) apimachinerywait.ConditionWithContextFunc
PodConditionMatch is a helper function that can be used to check a specific condition match for the Pod in question. This is extended into a few simplified match helpers such as PodReady and ContainersReady as well.
func (*Condition) PodPhaseMatch ¶
func (c *Condition) PodPhaseMatch(pod k8s.Object, phase v1.PodPhase) apimachinerywait.ConditionWithContextFunc
PodPhaseMatch is a helper function that is used to check and see if the Pod Has reached a specific Phase of the runtime. This can be combined with PodConditionMatch to check if a specific condition and phase has been met. This will enable validation such as checking against CLB of a POD.
func (*Condition) PodReady ¶
func (c *Condition) PodReady(pod k8s.Object) apimachinerywait.ConditionWithContextFunc
PodReady is a helper function used to check if the pod condition v1.PodReady has reached v1.ConditionTrue state
func (*Condition) PodRunning ¶
func (c *Condition) PodRunning(pod k8s.Object) apimachinerywait.ConditionWithContextFunc
PodRunning is a helper function used to check if the pod.Status.Phase attribute of the Pod has reached v1.PodRunning
func (*Condition) ResourceDeleted ¶
func (c *Condition) ResourceDeleted(obj k8s.Object) apimachinerywait.ConditionWithContextFunc
ResourceDeleted is a helper function used to check if a resource under question has been deleted. This will enable testing cases where the resource have a finalizer and the DELETE operation of such resource have been triggered and you want to wait until the resource has been deleted.
This method can be leveraged against any Kubernetes resource to check the deletion workflow and it does so by checking the resource and waiting until it obtains a v1.StatusReasonNotFound error from the API
func (*Condition) ResourceListMatchN ¶
func (c *Condition) ResourceListMatchN(list k8s.ObjectList, n int, matchFetcher func(object k8s.Object) bool, listOptions ...resources.ListOption) apimachinerywait.ConditionWithContextFunc
ResourceListMatchN is a helper function that can be used to check for a minimum number of returned objects in a list. This function accepts list options and a match function that can be used to adjust the set of objects queried for in the List resource operation.
func (*Condition) ResourceListN ¶
func (c *Condition) ResourceListN(list k8s.ObjectList, n int, listOptions ...resources.ListOption) apimachinerywait.ConditionWithContextFunc
ResourceListN is a helper function that can be used to check for a minimum number of returned objects in a list. This function accepts list options that can be used to adjust the set of objects queried for in the List resource operation.
func (*Condition) ResourceMatch ¶
func (c *Condition) ResourceMatch(obj k8s.Object, matchFetcher func(object k8s.Object) bool) apimachinerywait.ConditionWithContextFunc
ResourceMatch is a helper function used to check if the resource under question has met a pre-defined state. This can be leveraged for checking fields on a resource that may not be immediately present upon creation.
func (*Condition) ResourceScaled ¶
func (c *Condition) ResourceScaled(obj k8s.Object, scaleFetcher func(object k8s.Object) int32, replica int32) apimachinerywait.ConditionWithContextFunc
ResourceScaled is a helper function used to check if the resource under question has a pre-defined number of replicas. This can be leveraged for checking cases such as scaling up and down a deployment or STS and any other scalable resources.
func (*Condition) ResourcesDeleted ¶
func (c *Condition) ResourcesDeleted(list k8s.ObjectList) apimachinerywait.ConditionWithContextFunc
ResourcesDeleted is a helper function that can be used to check for if a set of objects has been deleted. This function accepts a list of named objects and will wait until it is not able to find each.
func (*Condition) ResourcesFound ¶
func (c *Condition) ResourcesFound(list k8s.ObjectList) apimachinerywait.ConditionWithContextFunc
ResourcesFound is a helper function that can be used to check for a set of objects. This function accepts a list of named objects and will wait until it is able to retrieve each.
func (*Condition) ResourcesMatch ¶
func (c *Condition) ResourcesMatch(list k8s.ObjectList, matchFetcher func(object k8s.Object) bool) apimachinerywait.ConditionWithContextFunc
ResourcesMatch is a helper function that can be used to check for a set of objects. This function accepts a list of named objects and a match function, and will wait until it is able to retrieve each while passing the match validation.