Documentation
¶
Index ¶
Constants ¶
const ( // TaskName is the name of the readiness task TaskName string = "common/readiness" )
Variables ¶
This section is empty.
Functions ¶
func IsDNSLabel ¶
IsDNSLabel tests for a string that conforms to the definition of a label in DNS (RFC 1035/1123). The following function is implemented in (very) old versions of k8s util package. This function doesn't seem to exist in newer versions, so reimplemented here.
Types ¶
type ObjRef ¶
type ObjRef struct { // Kind of the object. Specified in the TYPE[.VERSION][.GROUP] format used by `kubectl` // See https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#get Kind string `json:"kind" yaml:"kind"` // Namespace of the object. Optional. If left unspecified, this will be defaulted to the namespace of the experiment Namespace *string `json:"namespace,omitempty" yaml:"namespace,omitempty"` // Name of the object Name string `json:"name" yaml:"name"` // Wait for condition. Optional. // Any value that is accepted by the --for flag of the `kubectl wait` command can be specified. // See https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#wait WaitFor *string `json:"waitFor,omitempty" yaml:"waitFor,omitempty"` }
ObjRef contains details about a specific K8s object whose existence and readiness will be checked
type ReadinessInputs ¶
type ReadinessInputs struct { // InitialDelaySeconds is optional and defaulted to 5 secs. The first check will be performed after this delay. InitialDelaySeconds *int32 `json:"initialDelaySeconds,omitempty" yaml:"initialDelaySeconds,omitempty"` // NumRetries is optional and defaulted to 12. This is the number of retries that will be attempted after the first check. Total number of trials = 1 + NumRetries. NumRetries *int32 `json:"numRetries,omitempty" yaml:"numRetries,omitempty"` // IntervalSeconds is optional and defaulted to 5 secs // Retries will be attempted periodically every IntervalSeconds IntervalSeconds *int32 `json:"intervalSeconds,omitempty" yaml:"intervalSeconds,omitempty"` // ObjRefs is a list of K8s objects along with optional readiness conditions ObjRefs []ObjRef `json:"objRefs,omitempty" yaml:"objRefs,omitempty"` }
ReadinessInputs contains a list of K8s object references along with optional readiness conditions for them. The inputs also specify the delays and retries involved in the existence and readiness checks. This task will also check for existence of objects specified in the VersionInfo field of the experiment.
type ReadinessTask ¶
type ReadinessTask struct { core.TaskMeta `json:",inline" yaml:",inline"` With ReadinessInputs `json:"with" yaml:"with"` }
ReadinessTask checks existence and readiness of specified resources