Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Name is the application name. Also used to derive names for various application-related objects. Name = "gardener-custom-metrics" // Uri is an all-purpose identifier of the application, in URI format. Uri = "custom-metrics.gardener.cloud" )
View Source
const ( VerbosityError = 0 VerbosityWarning = 25 VerbosityInfo = 50 VerbosityVerbose = 75 VerbosityDebug = 100 )
Log verbosity
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CLIConfig ¶
type CLIConfig struct { gutil.ManagerConfig // Configures the controller manager which orchestrates the operation of this program RESTConfig gutil.RESTConfig // Configures access to the seed Kapi // The K8s namespace in which this process and associated artefacts belong Namespace string // The IP address at which custom metrics from this process can be consumed AccessIPAddress string // The network port at which custom metrics from this process can be consumed AccessPort int // Log messages which have their level greater than this, will be suppressed LogLevel int // Run the application in a mode which facilitates debugging, e.g. with extremely slow leader election Debug bool }
CLIConfig contains the actual configuration settings to be used by the application. It is a processed version of CLIOptions.
func (*CLIConfig) ManagerOptions ¶
ManagerOptions initializes empty manager.Options, applies the set values and returns it.
type CLIOptions ¶
type CLIOptions struct { gutil.ManagerOptions // For the meaning of the different option fields, see the CLIConfig type, which mirrors these fields Namespace string AccessIPAddress string AccessPort int RestOptions *gutil.RESTOptions LogLevel int Debug bool // Queries per second allowed on the client connection to the seed kube-apiserver QPS float32 // Short-term burst allowance for the QPS setting Burst int // contains filtered or unexported fields }
CLIOptions are command line options with application-level relevance
func (*CLIOptions) AddFlags ¶
func (options *CLIOptions) AddFlags(flags *pflag.FlagSet)
AddFlags implements Flagger.AddFlags.
func (*CLIOptions) Complete ¶
func (options *CLIOptions) Complete() error
Complete implements [ctlcmd.Completer.Complete]. It uses CLI parameters to derive the actual configuration settings to be used by the application.
func (*CLIOptions) Completed ¶
func (options *CLIOptions) Completed() *CLIConfig
Completed returns a CLIConfig which contains the configuration settings derived from CLI parameters. Only call this if `Complete` was successful.
Click to show internal directories.
Click to hide internal directories.