options

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// DefaultNamespaces is the default namespace selector for selecting and filtering across all namespaces.
	DefaultNamespaces = koptions.NamespaceList{metav1.NamespaceAll}

	// DefaultResources represents the default set of resources in cluster-api-state-metrics.
	DefaultResources = koptions.ResourceSet{
		"clusters":             struct{}{},
		"machines":             struct{}{},
		"machinedeployments":   struct{}{},
		"kubeadmcontrolplanes": struct{}{},
		"machinesets":          struct{}{},
	}
)

Functions

This section is empty.

Types

type Options

type Options struct {
	Apiserver            string
	Kubeconfig           string
	Help                 bool
	Port                 int
	Host                 string
	TelemetryPort        int
	TelemetryHost        string
	TLSConfig            string
	Resources            koptions.ResourceSet
	Namespaces           koptions.NamespaceList
	NamespacesDenylist   koptions.NamespaceList
	MetricDenylist       koptions.MetricSet
	MetricAllowlist      koptions.MetricSet
	Version              bool
	AnnotationsAllowList koptions.LabelsAllowList
	LabelsAllowList      koptions.LabelsAllowList

	EnableGZIPEncoding bool

	UseAPIServerCache bool
	// contains filtered or unexported fields
}

Options are the configurable parameters for kube-state-metrics.

func NewOptions

func NewOptions() *Options

NewOptions returns a new instance of `Options`.

func (*Options) AddFlags

func (o *Options) AddFlags()

AddFlags populated the Options struct from the command line arguments passed.

func (*Options) Parse

func (o *Options) Parse() error

Parse parses the flag definitions from the argument list.

func (*Options) Usage

func (o *Options) Usage()

Usage is the function called when an error occurs while parsing flags.

Jump to

Keyboard shortcuts

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