readinessgate

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

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

type Gate func(pod *corev1.Pod) (ready bool, reason string)

Gate tests a single condition on a pod. Returns (true, "") when satisfied, or (false, reason) when the condition is not yet met.

func Parse

func Parse(specs []string) ([]Gate, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL