standardflags

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: Apache-2.0 Imports: 6 Imported by: 9

Documentation

Overview

Package standardflags contains flags that multiple CSI sidecars and drivers may want to support.

Index

Constants

This section is empty.

Variables

View Source
var Configuration = SidecarConfiguration{}

Functions

func AddAutomaxprocs

func AddAutomaxprocs(printf func(format string, args ...interface{}))

AddAutomaxprocs adds the -automaxprocs boolean flag to the commandline options. By default the flag is disabled, use EnableAutomaxprocs to enable it during startup of an application.

The printf function that is passed as an argument, will be used by the maxprocs.Logger option when the GOMAXPROCS runtime configuration is adjusted.

func EnableAutomaxprocs

func EnableAutomaxprocs()

EnableAutomaxprocs can be used as an equivalent of -automaxprocs=true on the commandline.

func RegisterCommonFlags added in v0.23.0

func RegisterCommonFlags(flags *flag.FlagSet)

Types

type SidecarConfiguration added in v0.23.0

type SidecarConfiguration struct {
	ShowVersion bool

	KubeConfig string
	CSIAddress string

	LeaderElection              bool
	LeaderElectionNamespace     string
	LeaderElectionLeaseDuration time.Duration
	LeaderElectionRenewDeadline time.Duration
	LeaderElectionRetryPeriod   time.Duration
	LeaderElectionLabels        stringMap

	KubeAPIQPS   float64
	KubeAPIBurst int

	HttpEndpoint   string
	MetricsAddress string
	MetricsPath    string
}

Jump to

Keyboard shortcuts

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