Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // DefaultNamespaces is the default namespace selector for selecting and filtering across all namespaces. DefaultNamespaces = NamespaceList{metav1.NamespaceAll} // DefaultResources represents the default set of resources in kube-state-metrics. DefaultResources = ResourceSet{ "certificatesigningrequests": struct{}{}, "configmaps": struct{}{}, "cronjobs": struct{}{}, "daemonsets": struct{}{}, "deployments": struct{}{}, "endpoints": struct{}{}, "horizontalpodautoscalers": struct{}{}, "ingresses": struct{}{}, "jobs": struct{}{}, "leases": struct{}{}, "limitranges": struct{}{}, "mutatingwebhookconfigurations": struct{}{}, "namespaces": struct{}{}, "networkpolicies": struct{}{}, "nodes": struct{}{}, "persistentvolumes": struct{}{}, "persistentvolumeclaims": struct{}{}, "poddisruptionbudgets": struct{}{}, "pods": struct{}{}, "replicasets": struct{}{}, "replicationcontrollers": struct{}{}, "resourcequotas": struct{}{}, "secrets": struct{}{}, "services": struct{}{}, "statefulsets": struct{}{}, "storageclasses": struct{}{}, "validatingwebhookconfigurations": struct{}{}, "volumeattachments": struct{}{}, } )
Functions ¶
This section is empty.
Types ¶
type LabelsAllowList ¶
LabelsAllowList represents a list of allowed labels for metrics.
func (*LabelsAllowList) Set ¶
func (l *LabelsAllowList) Set(value string) error
Set converts a comma-separated string of metrics and their allowed labels and appends to the LabelsAllowList.
func (*LabelsAllowList) String ¶
func (l *LabelsAllowList) String() string
func (*LabelsAllowList) Type ¶
func (l *LabelsAllowList) Type() string
Type returns a descriptive string about the LabelsAllowList type.
type MetricSet ¶
type MetricSet map[string]struct{}
MetricSet represents a collection which has a unique set of metrics.
type NamespaceList ¶
type NamespaceList []string
NamespaceList represents a list of namespaces to query from.
func (*NamespaceList) IsAllNamespaces ¶
func (n *NamespaceList) IsAllNamespaces() bool
IsAllNamespaces checks if the Namespace selector is that of `NamespaceAll` which is used for selecting or filtering across all namespaces.
func (*NamespaceList) Set ¶
func (n *NamespaceList) Set(value string) error
Set converts a comma-separated string of namespaces into a slice and appends it to the NamespaceList
func (*NamespaceList) String ¶
func (n *NamespaceList) String() string
func (*NamespaceList) Type ¶
func (n *NamespaceList) Type() string
Type returns a descriptive string about the NamespaceList type.
type Options ¶
type Options struct { Apiserver string Kubeconfig string Help bool Port int Host string TelemetryPort int TelemetryHost string Resources ResourceSet Namespaces NamespaceList Shard int32 TotalShards int Pod string Namespace string MetricDenylist MetricSet MetricAllowlist MetricSet Version bool LabelsAllowList LabelsAllowList EnableGZIPEncoding bool // contains filtered or unexported fields }
Options are the configurable parameters for kube-state-metrics.
func (*Options) AddFlags ¶
func (o *Options) AddFlags()
AddFlags populated the Options struct from the command line arguments passed.
type ResourceSet ¶
type ResourceSet map[string]struct{}
ResourceSet represents a collection which has a unique set of resources.
func (ResourceSet) AsSlice ¶
func (r ResourceSet) AsSlice() []string
AsSlice returns the Resource in the form of a plain string slice.
func (*ResourceSet) Set ¶
func (r *ResourceSet) Set(value string) error
Set converts a comma-separated string of resources into a slice and appends it to the ResourceSet.
func (*ResourceSet) String ¶
func (r *ResourceSet) String() string
func (*ResourceSet) Type ¶
func (r *ResourceSet) Type() string
Type returns a descriptive string about the ResourceSet type.