Documentation
¶
Overview ¶
Package readinessgate provides concrete implementations of manager.ReadyToRequestFunc that defer certificate issuance until specific pod-level conditions are met. Gate implementations cover the three main sources of async pod state: IP assignment (pod-ip), status conditions (pod-condition), and annotations (pod-annotation). Multiple gates are combined with AND semantics via NewReadyToRequestFunc.
These implementations are intended to be upstreamed into csi-lib once stabilised.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewReadyToRequestFunc ¶
func NewReadyToRequestFunc(client kubernetes.Interface, gates []Gate) manager.ReadyToRequestFunc
NewReadyToRequestFunc builds a manager.ReadyToRequestFunc that fetches the pod owning the volume and evaluates all gates against it. All gates must pass (AND semantics). Intended to be paired with --continue-on-not-ready=true so that NodePublishVolume succeeds immediately and cert issuance is retried asynchronously until all gates pass.
Types ¶
type Gate ¶
Gate tests a single condition on a pod. Returns (true, "") when satisfied, or (false, reason) when the condition is not yet met.
func Parse ¶
Parse parses gate specs of the form "<type>:<value>" into Gate functions.
Each spec must be one of:
pod-ip:<family> family: any | ipv4 | ipv6 pod-condition:<Type>[=<Status>] Status defaults to "True" pod-annotation:<key> annotation key must be present
Returns an error if any spec is malformed or uses an unsupported type.