options

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: 12 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {

	// NodeID is the name of the node which is hosting this driver instance.
	NodeID string

	// DriverName is the name of this CSI driver which will be shared with
	// the Kubelet.
	DriverName string

	// Endpoint is the endpoint that the driver will connect to the Kubelet.
	Endpoint string

	// DataRoot is the directory that the driver will write and mount volumes
	// from.
	DataRoot string

	// UseTokenRequest declares that the CSI driver will use the empty audience
	// token request for creating CertificateRequests. Requires the token request
	// to be defined on the CSIDriver manifest.
	UseTokenRequest bool

	// ContinueOnNotReady allows NodePublishVolume to succeed even when the
	// driver is not yet ready to create certificate requests. The volume is mounted
	// immediately and certificate issuance is retried asynchronously. Pods MUST
	// tolerate the absence of certificate data at startup (e.g. via init container).
	ContinueOnNotReady bool

	// PodReadinessGates is an ordered list of gate specs that must all pass
	// before a CertificateRequest is created for a volume. Each spec has the
	// form "<type>:<value>". Supported types:
	//   pod-ip:<family>               family: any | ipv4 | ipv6
	//   pod-condition:<Type>[=<Status>]  Status defaults to "True"
	//   pod-annotation:<key>          annotation key must be present
	// Must be used together with --continue-on-not-ready=true; without it the
	// driver will still block NodePublishVolume while waiting for the gates.
	PodReadinessGates []string

	// Logr is the shared base logger.
	Logr logr.Logger

	// RestConfig is the shared base rest config to connect to the Kubernetes
	// API.
	RestConfig *rest.Config

	// CMClient is a rest client for interacting with cert-manager resources.
	CMClient cmclient.Interface

	// MetricsBindAddress is the TCP address for exposing HTTP Prometheus metrics
	// which will be served on the HTTP path '/metrics'. The value "0" will
	// disable exposing metrics.
	MetricsBindAddress string

	// KubernetesAPIQPS is the maximum queries-per-second of requests sent
	// to the Kubernetes apiserver.
	KubernetesAPIQPS float32

	// KubernetesAPIBurst is the maximum burst queries-per-second of requests
	// sent to the Kubernetes apiserver.
	KubernetesAPIBurst int

	// GateBackoffDuration is the base backoff applied when ReadyToRequestFunc
	// (i.e. the readiness gates) reports the driver is not yet ready to issue.
	// Gate-pending is a wait state, not a failure, and warrants a much faster
	// retry cadence than the renewal backoff used for issuance errors. Defaults
	// mirror csi-lib's defaults for GateBackoffConfig.
	GateBackoffDuration time.Duration

	// GateBackoffFactor multiplies GateBackoffDuration after each failed
	// gate-pending attempt.
	GateBackoffFactor float64

	// GateBackoffJitter applies +/- this fraction of the duration to each
	// gate-pending wait.
	GateBackoffJitter float64

	// GateBackoffCap is the maximum duration between gate-pending retries.
	GateBackoffCap time.Duration
	// contains filtered or unexported fields
}

Options are the main options for the driver. Populated via processing command line flags.

func New

func New() *Options

func (*Options) Complete

func (o *Options) Complete() error

func (*Options) Prepare

func (o *Options) Prepare(cmd *cobra.Command) *Options

Jump to

Keyboard shortcuts

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