readinessgate

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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(podLister corev1listers.PodLister, gates []Gate) manager.ReadyToRequestFunc

NewReadyToRequestFunc builds a manager.ReadyToRequestFunc that reads the pod owning the volume from the provided node-scoped pod lister 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.

The lister is expected to be backed by a shared informer scoped to the local node via a spec.nodeName field selector. Reading from the informer cache avoids a per-evaluation apiserver call.

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