config

package
Version: v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// DriverName to be registered at CSI
	DriverName string

	// PluginType flags if the driver is
	// it is a node plugin or controller
	// plugin
	PluginType string

	// Version of the CSI controller/node driver
	Version string

	// Endpoint on which requests are made by kubelet
	// or external provisioner
	//
	// NOTE:
	//  - Controller/node plugin will listen on this
	//  - This will be a unix based socket
	Endpoint string

	// NodeID helps in differentiating the nodes on
	// which node drivers are running. This is useful
	// in case of topologies and publishing or
	// unpublishing volumes on nodes
	NodeID string

	// SetIOLimits if set to true, directs the driver
	// to set iops, bps limits on a pod using a volume
	// provisioned on its node. For this to work,
	// CSIDriver.Spec.podInfoOnMount must be set to 'true'
	SetIOLimits bool

	// ContainerRuntime informs the driver of the container runtime
	// used on the node, so that the driver can make assumptions
	// about the cgroup path for a pod requesting a volume mount
	ContainerRuntime string

	// RIopsLimitPerGB provides read iops rate limits per volume group type
	// as a string slice, in the form ["vg1-prefix=100", "vg2-prefix=200"]
	RIopsLimitPerGB *[]string

	// WIopsLimitPerGB provides write iops rate limits per volume group type
	// as a string slice, in the form ["vg1-prefix=100", "vg2-prefix=200"]
	WIopsLimitPerGB *[]string

	// RBpsLimitPerGB provides read bps rate limits per volume group type
	// as a string slice, in the form ["vg1-prefix=100", "vg2-prefix=200"]
	RBpsLimitPerGB *[]string

	// WBpsLimitPerGB provides read bps rate limits per volume group type
	// as a string slice, in the form ["vg1-prefix=100", "vg2-prefix=200"]
	WBpsLimitPerGB *[]string

	// The TCP network address where the prometheus metrics endpoint will listen (example: `:9080`).
	// The default is empty string, which means metrics endpoint is disabled.
	ListenAddress string

	// The HTTP path where prometheus metrics will be exposed. Default is `/metrics`.
	MetricsPath string

	// Exclude metrics about the exporter itself (process_*, go_*).
	DisableExporterMetrics bool
}

Config struct fills the parameters of request or user input

func Default

func Default() *Config

Default returns a new instance of config required to initialize a driver instance

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL