Documentation
¶
Overview ¶
Package v1 is the v1 version of the API.
Index ¶
- Constants
- Variables
- func ClusterNodeMonitoringResource() metav1.GroupVersionResource
- func ClusterPodMonitoringResource() metav1.GroupVersionResource
- func ClusterRulesResource() metav1.GroupVersionResource
- func GlobalRulesResource() metav1.GroupVersionResource
- func Kind(kind string) schema.GroupKind
- func OperatorConfigResource() metav1.GroupVersionResource
- func PodMonitoringResource() metav1.GroupVersionResource
- func Resource(resource string) schema.GroupResource
- func RulesResource() metav1.GroupVersionResource
- func TLSVersionFromString(s string) (config.TLSVersion, error)
- type AlertingSpec
- type AlertmanagerEndpoints
- type Auth
- type Authorization
- type BasicAuth
- type ClusterNodeMonitoring
- func (in *ClusterNodeMonitoring) DeepCopy() *ClusterNodeMonitoring
- func (in *ClusterNodeMonitoring) DeepCopyInto(out *ClusterNodeMonitoring)
- func (in *ClusterNodeMonitoring) DeepCopyObject() runtime.Object
- func (c *ClusterNodeMonitoring) GetEndpoints() []ScrapeNodeEndpoint
- func (c *ClusterNodeMonitoring) GetKey() string
- func (c *ClusterNodeMonitoring) GetMonitoringStatus() *MonitoringStatus
- func (c *ClusterNodeMonitoring) ScrapeConfigs(projectID, location, cluster string) (res []*promconfig.ScrapeConfig, err error)
- func (c *ClusterNodeMonitoring) ValidateCreate() (admission.Warnings, error)
- func (*ClusterNodeMonitoring) ValidateDelete() (admission.Warnings, error)
- func (c *ClusterNodeMonitoring) ValidateUpdate(runtime.Object) (admission.Warnings, error)
- type ClusterNodeMonitoringList
- type ClusterNodeMonitoringSpec
- type ClusterNodeTLS
- type ClusterPodMonitoring
- func (in *ClusterPodMonitoring) DeepCopy() *ClusterPodMonitoring
- func (in *ClusterPodMonitoring) DeepCopyInto(out *ClusterPodMonitoring)
- func (in *ClusterPodMonitoring) DeepCopyObject() runtime.Object
- func (c *ClusterPodMonitoring) Default()
- func (c *ClusterPodMonitoring) GetEndpoints() []ScrapeEndpoint
- func (c *ClusterPodMonitoring) GetKey() string
- func (c *ClusterPodMonitoring) GetMonitoringStatus() *MonitoringStatus
- func (c *ClusterPodMonitoring) GetPodMonitoringStatus() *PodMonitoringStatus
- func (c *ClusterPodMonitoring) IsNamespaceScoped() bool
- func (c *ClusterPodMonitoring) ScrapeConfigs(projectID, location, cluster string, pool PrometheusSecretConfigs) (res []*promconfig.ScrapeConfig, err error)
- func (c *ClusterPodMonitoring) UpdateDefault() bool
- func (c *ClusterPodMonitoring) ValidateCreate() (admission.Warnings, error)
- func (*ClusterPodMonitoring) ValidateDelete() (admission.Warnings, error)
- func (c *ClusterPodMonitoring) ValidateUpdate(runtime.Object) (admission.Warnings, error)
- type ClusterPodMonitoringList
- type ClusterPodMonitoringSpec
- type ClusterRules
- func (in *ClusterRules) DeepCopy() *ClusterRules
- func (in *ClusterRules) DeepCopyInto(out *ClusterRules)
- func (in *ClusterRules) DeepCopyObject() runtime.Object
- func (r *ClusterRules) GetMonitoringStatus() *MonitoringStatus
- func (r *ClusterRules) RuleGroupsConfig(projectID, location, cluster string) (string, error)
- func (r *ClusterRules) ValidateCreate() (admission.Warnings, error)
- func (*ClusterRules) ValidateDelete() (admission.Warnings, error)
- func (r *ClusterRules) ValidateUpdate(runtime.Object) (admission.Warnings, error)
- type ClusterRulesList
- type CollectionSpec
- type CompressionType
- type ConfigSpec
- type ExportFilters
- type ExportSpec
- type GlobalRules
- func (in *GlobalRules) DeepCopy() *GlobalRules
- func (in *GlobalRules) DeepCopyInto(out *GlobalRules)
- func (in *GlobalRules) DeepCopyObject() runtime.Object
- func (r *GlobalRules) GetMonitoringStatus() *MonitoringStatus
- func (r *GlobalRules) RuleGroupsConfig() (string, error)
- func (r *GlobalRules) ValidateCreate() (admission.Warnings, error)
- func (*GlobalRules) ValidateDelete() (admission.Warnings, error)
- func (r *GlobalRules) ValidateUpdate(runtime.Object) (admission.Warnings, error)
- type GlobalRulesList
- type HTTPClientConfig
- type KubeletScraping
- type LabelMapping
- type ManagedAlertmanagerSpec
- type MonitoringCRD
- type MonitoringCondition
- type MonitoringConditionType
- type MonitoringStatus
- type OAuth2
- type OperatorConfig
- type OperatorConfigList
- type OperatorConfigValidator
- func (v *OperatorConfigValidator) ValidateCreate(_ context.Context, o runtime.Object) (admission.Warnings, error)
- func (v *OperatorConfigValidator) ValidateDelete(_ context.Context, _ runtime.Object) (admission.Warnings, error)
- func (v *OperatorConfigValidator) ValidateUpdate(ctx context.Context, _, o runtime.Object) (admission.Warnings, error)
- type OperatorFeatures
- type PodMonitoring
- func (in *PodMonitoring) DeepCopy() *PodMonitoring
- func (in *PodMonitoring) DeepCopyInto(out *PodMonitoring)
- func (in *PodMonitoring) DeepCopyObject() runtime.Object
- func (p *PodMonitoring) Default()
- func (p *PodMonitoring) GetEndpoints() []ScrapeEndpoint
- func (p *PodMonitoring) GetKey() string
- func (p *PodMonitoring) GetMonitoringStatus() *MonitoringStatus
- func (p *PodMonitoring) GetPodMonitoringStatus() *PodMonitoringStatus
- func (p *PodMonitoring) IsNamespaceScoped() bool
- func (p *PodMonitoring) ScrapeConfigs(projectID, location, cluster string, pool PrometheusSecretConfigs) (res []*promconfig.ScrapeConfig, err error)
- func (p *PodMonitoring) UpdateDefault() bool
- func (p *PodMonitoring) ValidateCreate() (admission.Warnings, error)
- func (p *PodMonitoring) ValidateDelete() (admission.Warnings, error)
- func (p *PodMonitoring) ValidateUpdate(runtime.Object) (admission.Warnings, error)
- type PodMonitoringCRD
- type PodMonitoringList
- type PodMonitoringSpec
- type PodMonitoringStatus
- type PrometheusSecretConfigs
- func (in PrometheusSecretConfigs) DeepCopy() PrometheusSecretConfigs
- func (in PrometheusSecretConfigs) DeepCopyInto(out *PrometheusSecretConfigs)
- func (p PrometheusSecretConfigs) SecretConfigs() []secrets.SecretConfig
- func (p PrometheusSecretConfigs) Set(ref string, c secrets.KubernetesSecretConfig)
- type ProxyConfig
- type RelabelingRule
- type Rule
- type RuleEvaluatorSpec
- type RuleGroup
- type Rules
- func (in *Rules) DeepCopy() *Rules
- func (in *Rules) DeepCopyInto(out *Rules)
- func (in *Rules) DeepCopyObject() runtime.Object
- func (r *Rules) GetMonitoringStatus() *MonitoringStatus
- func (r *Rules) RuleGroupsConfig(projectID, location, cluster string) (string, error)
- func (r *Rules) ValidateCreate() (admission.Warnings, error)
- func (*Rules) ValidateDelete() (admission.Warnings, error)
- func (r *Rules) ValidateUpdate(runtime.Object) (admission.Warnings, error)
- type RulesList
- type RulesSpec
- type RulesStatus
- type SampleGroup
- type SampleTarget
- type ScalingSpec
- type ScrapeEndpoint
- type ScrapeEndpointStatus
- type ScrapeLimits
- type ScrapeNodeEndpoint
- type SecretKeySelector
- type SecretOrConfigMap
- type SecretSelector
- type TLS
- type TLSConfig
- type TargetLabels
- type TargetStatusSpec
- type VPASpec
Constants ¶
const EnvVarNodeName = "NODE_NAME"
Environment variable for the current node that needs to be interpolated in generated scrape configurations for a PodMonitoring resource.
const (
Version = "v1"
)
Variables ¶
var ( // SchemeBuilder initializes a scheme builder. SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) // AddToScheme is a global function that registers this API group & version to a scheme. AddToScheme = SchemeBuilder.AddToScheme // SchemeGroupVersion is group version used to register these objects. SchemeGroupVersion = schema.GroupVersion{Group: monitoring.GroupName, Version: Version} )
Functions ¶
func ClusterNodeMonitoringResource ¶ added in v0.12.0
func ClusterNodeMonitoringResource() metav1.GroupVersionResource
ClusterNodeMonitoringResource returns a ClusterNodeMonitoring GroupVersionResource. This can be used to enforce API types.
func ClusterPodMonitoringResource ¶
func ClusterPodMonitoringResource() metav1.GroupVersionResource
ClusterPodMonitoringResource returns a ClusterPodMonitoring GroupVersionResource. This can be used to enforce API types.
func ClusterRulesResource ¶
func ClusterRulesResource() metav1.GroupVersionResource
ClusterRulesResource returns a ClusterRules GroupVersionResource. This can be used to enforce API types.
func GlobalRulesResource ¶
func GlobalRulesResource() metav1.GroupVersionResource
GlobalRulesResource returns a GlobalRules GroupVersionResource. This can be used to enforce API types.
func OperatorConfigResource ¶
func OperatorConfigResource() metav1.GroupVersionResource
OperatorConfigResource returns a OperatorConfig GroupVersionResource. This can be used to enforce API types.
func PodMonitoringResource ¶
func PodMonitoringResource() metav1.GroupVersionResource
PodMonitoringResource returns a PodMonitoring GroupVersionResource. This can be used to enforce API types.
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource.
func RulesResource ¶
func RulesResource() metav1.GroupVersionResource
RulesResource returns a Rules GroupVersionResource. This can be used to enforce API types.
func TLSVersionFromString ¶ added in v0.10.0
func TLSVersionFromString(s string) (config.TLSVersion, error)
TLSVersionFromString converts a string representation of a TLS version.
Types ¶
type AlertingSpec ¶
type AlertingSpec struct { // Alertmanagers contains endpoint configuration for designated Alertmanagers. Alertmanagers []AlertmanagerEndpoints `json:"alertmanagers,omitempty"` }
AlertingSpec defines alerting configuration.
func (*AlertingSpec) DeepCopy ¶
func (in *AlertingSpec) DeepCopy() *AlertingSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertingSpec.
func (*AlertingSpec) DeepCopyInto ¶
func (in *AlertingSpec) DeepCopyInto(out *AlertingSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AlertmanagerEndpoints ¶
type AlertmanagerEndpoints struct { // Namespace of Endpoints object. Namespace string `json:"namespace"` // Name of Endpoints object in Namespace. Name string `json:"name"` // Port the Alertmanager API is exposed on. Port intstr.IntOrString `json:"port"` // Scheme to use when firing alerts. Scheme string `json:"scheme,omitempty"` // Prefix for the HTTP path alerts are pushed to. PathPrefix string `json:"pathPrefix,omitempty"` // TLS Config to use for alertmanager connection. TLS *TLSConfig `json:"tls,omitempty"` // Authorization section for this alertmanager endpoint Authorization *Authorization `json:"authorization,omitempty"` // Version of the Alertmanager API that rule-evaluator uses to send alerts. It // can be "v1" or "v2". APIVersion string `json:"apiVersion,omitempty"` // Timeout is a per-target Alertmanager timeout when pushing alerts. Timeout string `json:"timeout,omitempty"` }
AlertmanagerEndpoints defines a selection of a single Endpoints object containing alertmanager IPs to fire alerts against.
func (*AlertmanagerEndpoints) DeepCopy ¶
func (in *AlertmanagerEndpoints) DeepCopy() *AlertmanagerEndpoints
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerEndpoints.
func (*AlertmanagerEndpoints) DeepCopyInto ¶
func (in *AlertmanagerEndpoints) DeepCopyInto(out *AlertmanagerEndpoints)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Auth ¶ added in v0.10.0
type Auth struct { // Type is the authentication type. Defaults to Bearer. // Basic will cause an error, as the BasicAuth object should be used instead. // +optional Type string `json:"type,omitempty"` // Credentials uses the secret as the credentials (token) for the authentication header. // +optional Credentials *SecretSelector `json:"credentials,omitempty"` }
Auth sets the `Authorization` header on every HTTP request.
func (*Auth) DeepCopy ¶ added in v0.10.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Auth.
func (*Auth) DeepCopyInto ¶ added in v0.10.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Auth) ToPrometheusConfig ¶ added in v0.10.0
func (c *Auth) ToPrometheusConfig(m PodMonitoringCRD, pool PrometheusSecretConfigs) (*config.Authorization, error)
ToPrometheusConfig converts this object into the respective Prometheus configuration.
type Authorization ¶
type Authorization struct { // Set the authentication type. Defaults to Bearer, Basic will cause an // error Type string `json:"type,omitempty"` // The secret's key that contains the credentials of the request Credentials *corev1.SecretKeySelector `json:"credentials,omitempty"` }
Authorization specifies a subset of the Authorization struct, that is safe for use in Endpoints (no CredentialsFile field).
func (*Authorization) DeepCopy ¶
func (in *Authorization) DeepCopy() *Authorization
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Authorization.
func (*Authorization) DeepCopyInto ¶
func (in *Authorization) DeepCopyInto(out *Authorization)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type BasicAuth ¶ added in v0.10.0
type BasicAuth struct { // Username is the BasicAuth username. // +optional Username string `json:"username,omitempty"` // Password uses the secret as the BasicAuth password. // +optional Password *SecretSelector `json:"password,omitempty"` }
BasicAuth sets the `Authorization` header on every HTTP request with the configured username and password.
func (*BasicAuth) DeepCopy ¶ added in v0.10.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicAuth.
func (*BasicAuth) DeepCopyInto ¶ added in v0.10.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*BasicAuth) ToPrometheusConfig ¶ added in v0.10.0
func (c *BasicAuth) ToPrometheusConfig(m PodMonitoringCRD, pool PrometheusSecretConfigs) (*config.BasicAuth, error)
ToPrometheusConfig converts this object into the respective Prometheus configuration.
type ClusterNodeMonitoring ¶ added in v0.12.0
type ClusterNodeMonitoring struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Specification of desired node selection for target discovery by // Prometheus. Spec ClusterNodeMonitoringSpec `json:"spec"` // Most recently observed status of the resource. // +optional Status MonitoringStatus `json:"status,omitempty"` }
ClusterNodeMonitoring defines monitoring for a set of nodes. +genclient +genclient:nonNamespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:resource:scope=Cluster +kubebuilder:subresource:status +kubebuilder:storageversion
func (*ClusterNodeMonitoring) DeepCopy ¶ added in v0.12.0
func (in *ClusterNodeMonitoring) DeepCopy() *ClusterNodeMonitoring
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterNodeMonitoring.
func (*ClusterNodeMonitoring) DeepCopyInto ¶ added in v0.12.0
func (in *ClusterNodeMonitoring) DeepCopyInto(out *ClusterNodeMonitoring)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterNodeMonitoring) DeepCopyObject ¶ added in v0.12.0
func (in *ClusterNodeMonitoring) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ClusterNodeMonitoring) GetEndpoints ¶ added in v0.12.0
func (c *ClusterNodeMonitoring) GetEndpoints() []ScrapeNodeEndpoint
func (*ClusterNodeMonitoring) GetKey ¶ added in v0.12.0
func (c *ClusterNodeMonitoring) GetKey() string
func (*ClusterNodeMonitoring) GetMonitoringStatus ¶ added in v0.12.0
func (c *ClusterNodeMonitoring) GetMonitoringStatus() *MonitoringStatus
func (*ClusterNodeMonitoring) ScrapeConfigs ¶ added in v0.12.0
func (c *ClusterNodeMonitoring) ScrapeConfigs(projectID, location, cluster string) (res []*promconfig.ScrapeConfig, err error)
func (*ClusterNodeMonitoring) ValidateCreate ¶ added in v0.12.0
func (c *ClusterNodeMonitoring) ValidateCreate() (admission.Warnings, error)
func (*ClusterNodeMonitoring) ValidateDelete ¶ added in v0.12.0
func (*ClusterNodeMonitoring) ValidateDelete() (admission.Warnings, error)
func (*ClusterNodeMonitoring) ValidateUpdate ¶ added in v0.12.0
type ClusterNodeMonitoringList ¶ added in v0.12.0
type ClusterNodeMonitoringList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ClusterNodeMonitoring `json:"items"` }
ClusterNodeMonitoringList is a list of ClusterNodeMonitorings. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ClusterNodeMonitoringList) DeepCopy ¶ added in v0.12.0
func (in *ClusterNodeMonitoringList) DeepCopy() *ClusterNodeMonitoringList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterNodeMonitoringList.
func (*ClusterNodeMonitoringList) DeepCopyInto ¶ added in v0.12.0
func (in *ClusterNodeMonitoringList) DeepCopyInto(out *ClusterNodeMonitoringList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterNodeMonitoringList) DeepCopyObject ¶ added in v0.12.0
func (in *ClusterNodeMonitoringList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterNodeMonitoringSpec ¶ added in v0.12.0
type ClusterNodeMonitoringSpec struct { // Label selector that specifies which nodes are selected for this monitoring // configuration. If left empty all nodes are selected. Selector metav1.LabelSelector `json:"selector,omitempty"` // The endpoints to scrape on the selected nodes. Endpoints []ScrapeNodeEndpoint `json:"endpoints"` // Limits to apply at scrape time. Limits *ScrapeLimits `json:"limits,omitempty"` }
ClusterNodeMonitoringSpec contains specification parameters for ClusterNodeMonitoring.
func (*ClusterNodeMonitoringSpec) DeepCopyInto ¶ added in v0.12.0
func (in *ClusterNodeMonitoringSpec) DeepCopyInto(out *ClusterNodeMonitoringSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterNodeTLS ¶ added in v0.13.0
type ClusterNodeTLS struct { // InsecureSkipVerify disables target certificate validation. // +optional InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"` }
type ClusterPodMonitoring ¶
type ClusterPodMonitoring struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Specification of desired Pod selection for target discovery by // Prometheus. Spec ClusterPodMonitoringSpec `json:"spec"` // Most recently observed status of the resource. // +optional Status PodMonitoringStatus `json:"status"` }
ClusterPodMonitoring defines monitoring for a set of pods, scoped to all pods within the cluster. +genclient +genclient:nonNamespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:resource:scope=Cluster +kubebuilder:subresource:status +kubebuilder:storageversion
func (*ClusterPodMonitoring) DeepCopy ¶
func (in *ClusterPodMonitoring) DeepCopy() *ClusterPodMonitoring
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterPodMonitoring.
func (*ClusterPodMonitoring) DeepCopyInto ¶
func (in *ClusterPodMonitoring) DeepCopyInto(out *ClusterPodMonitoring)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterPodMonitoring) DeepCopyObject ¶
func (in *ClusterPodMonitoring) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ClusterPodMonitoring) Default ¶ added in v0.13.0
func (c *ClusterPodMonitoring) Default()
Default implements admission.Defaulter.
func (*ClusterPodMonitoring) GetEndpoints ¶ added in v0.10.0
func (c *ClusterPodMonitoring) GetEndpoints() []ScrapeEndpoint
func (*ClusterPodMonitoring) GetKey ¶ added in v0.6.1
func (c *ClusterPodMonitoring) GetKey() string
func (*ClusterPodMonitoring) GetMonitoringStatus ¶ added in v0.10.0
func (c *ClusterPodMonitoring) GetMonitoringStatus() *MonitoringStatus
func (*ClusterPodMonitoring) GetPodMonitoringStatus ¶ added in v0.10.0
func (c *ClusterPodMonitoring) GetPodMonitoringStatus() *PodMonitoringStatus
func (*ClusterPodMonitoring) IsNamespaceScoped ¶ added in v0.12.0
func (c *ClusterPodMonitoring) IsNamespaceScoped() bool
func (*ClusterPodMonitoring) ScrapeConfigs ¶
func (c *ClusterPodMonitoring) ScrapeConfigs(projectID, location, cluster string, pool PrometheusSecretConfigs) (res []*promconfig.ScrapeConfig, err error)
ScrapeConfigs generates Prometheus scrape configs for the PodMonitoring.
func (*ClusterPodMonitoring) UpdateDefault ¶ added in v0.13.0
func (c *ClusterPodMonitoring) UpdateDefault() bool
UpdateDefault defaults any unset fields, returning true if the object was updated.
func (*ClusterPodMonitoring) ValidateCreate ¶
func (c *ClusterPodMonitoring) ValidateCreate() (admission.Warnings, error)
func (*ClusterPodMonitoring) ValidateDelete ¶
func (*ClusterPodMonitoring) ValidateDelete() (admission.Warnings, error)
func (*ClusterPodMonitoring) ValidateUpdate ¶
type ClusterPodMonitoringList ¶
type ClusterPodMonitoringList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ClusterPodMonitoring `json:"items"` }
ClusterPodMonitoringList is a list of ClusterPodMonitorings. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ClusterPodMonitoringList) DeepCopy ¶
func (in *ClusterPodMonitoringList) DeepCopy() *ClusterPodMonitoringList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterPodMonitoringList.
func (*ClusterPodMonitoringList) DeepCopyInto ¶
func (in *ClusterPodMonitoringList) DeepCopyInto(out *ClusterPodMonitoringList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterPodMonitoringList) DeepCopyObject ¶
func (in *ClusterPodMonitoringList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type ClusterPodMonitoringSpec ¶
type ClusterPodMonitoringSpec struct { // Label selector that specifies which pods are selected for this monitoring // configuration. Selector metav1.LabelSelector `json:"selector"` // The endpoints to scrape on the selected pods. Endpoints []ScrapeEndpoint `json:"endpoints"` // Labels to add to the Prometheus target for discovered endpoints. // The `instance` label is always set to `<pod_name>:<port>` or `<node_name>:<port>` // if the scraped pod is controlled by a DaemonSet. TargetLabels TargetLabels `json:"targetLabels,omitempty"` // Limits to apply at scrape time. Limits *ScrapeLimits `json:"limits,omitempty"` // FilterRunning will drop any pods that are in the "Failed" or "Succeeded" // pod lifecycle. // See: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase // Specifically, this prevents scraping Succeeded pods from K8s jobs, which // could contribute to noisy logs or irrelevant metrics. // Additionally, it can mitigate issues with reusing stale target // labels in cases where Pod IPs are reused (e.g. spot containers). // See: https://github.com/GoogleCloudPlatform/prometheus-engine/issues/145 FilterRunning *bool `json:"filterRunning,omitempty"` }
ClusterPodMonitoringSpec contains specification parameters for ClusterPodMonitoring.
func (*ClusterPodMonitoringSpec) DeepCopy ¶
func (in *ClusterPodMonitoringSpec) DeepCopy() *ClusterPodMonitoringSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterPodMonitoringSpec.
func (*ClusterPodMonitoringSpec) DeepCopyInto ¶
func (in *ClusterPodMonitoringSpec) DeepCopyInto(out *ClusterPodMonitoringSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ClusterRules ¶
type ClusterRules struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Specification of rules to record and alert on. Spec RulesSpec `json:"spec"` // Most recently observed status of the resource. // +optional Status RulesStatus `json:"status"` }
ClusterRules defines Prometheus alerting and recording rules that are scoped to the current cluster. Only metric data from the current cluster is processed and all rule results have their project_id and cluster label preserved for query processing. If the location label is not preserved by the rule, it defaults to the cluster's location.
+genclient +genclient:nonNamespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:resource:scope=Cluster +kubebuilder:subresource:status +kubebuilder:storageversion
func (*ClusterRules) DeepCopy ¶
func (in *ClusterRules) DeepCopy() *ClusterRules
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRules.
func (*ClusterRules) DeepCopyInto ¶
func (in *ClusterRules) DeepCopyInto(out *ClusterRules)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterRules) DeepCopyObject ¶
func (in *ClusterRules) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ClusterRules) GetMonitoringStatus ¶ added in v0.13.0
func (r *ClusterRules) GetMonitoringStatus() *MonitoringStatus
func (*ClusterRules) RuleGroupsConfig ¶ added in v0.13.0
func (r *ClusterRules) RuleGroupsConfig(projectID, location, cluster string) (string, error)
func (*ClusterRules) ValidateCreate ¶ added in v0.13.0
func (r *ClusterRules) ValidateCreate() (admission.Warnings, error)
func (*ClusterRules) ValidateDelete ¶ added in v0.13.0
func (*ClusterRules) ValidateDelete() (admission.Warnings, error)
func (*ClusterRules) ValidateUpdate ¶ added in v0.13.0
type ClusterRulesList ¶
type ClusterRulesList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []ClusterRules `json:"items"` }
ClusterRulesList is a list of ClusterRules. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*ClusterRulesList) DeepCopy ¶
func (in *ClusterRulesList) DeepCopy() *ClusterRulesList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRulesList.
func (*ClusterRulesList) DeepCopyInto ¶
func (in *ClusterRulesList) DeepCopyInto(out *ClusterRulesList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClusterRulesList) DeepCopyObject ¶
func (in *ClusterRulesList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type CollectionSpec ¶
type CollectionSpec struct { // ExternalLabels specifies external labels that are attached to all scraped // data before being written to Google Cloud Monitoring or any other additional exports // specified in the OperatorConfig. The precedence behavior matches that of Prometheus. ExternalLabels map[string]string `json:"externalLabels,omitempty"` // Filter limits which metric data is sent to Cloud Monitoring (it doesn't apply to additional exports). Filter ExportFilters `json:"filter,omitempty"` // A reference to GCP service account credentials with which Prometheus collectors // are run. It needs to have metric write permissions for all project IDs to which // data is written. // Within GKE, this can typically be left empty if the compute default // service account has the required permissions. Credentials *corev1.SecretKeySelector `json:"credentials,omitempty"` // Configuration to scrape the metric endpoints of the Kubelets. KubeletScraping *KubeletScraping `json:"kubeletScraping,omitempty"` // Compression enables compression of metrics collection data Compression CompressionType `json:"compression,omitempty"` }
CollectionSpec specifies how the operator configures collection of metric data.
func (*CollectionSpec) DeepCopy ¶
func (in *CollectionSpec) DeepCopy() *CollectionSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CollectionSpec.
func (*CollectionSpec) DeepCopyInto ¶
func (in *CollectionSpec) DeepCopyInto(out *CollectionSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CollectionSpec) ScrapeConfigs ¶ added in v0.13.0
func (c *CollectionSpec) ScrapeConfigs() ([]*promconfig.ScrapeConfig, error)
type CompressionType ¶ added in v0.5.0
type CompressionType string
+kubebuilder:validation:Enum=none;gzip
const CompressionGzip CompressionType = "gzip"
const CompressionNone CompressionType = "none"
type ConfigSpec ¶ added in v0.8.0
type ConfigSpec struct { // Compression enables compression of the config data propagated by the operator to collectors // and the rule-evaluator. It is recommended to use the gzip option when using a large number of // ClusterPodMonitoring, PodMonitoring, GlobalRules, ClusterRules, and/or Rules. Compression CompressionType `json:"compression,omitempty"` }
ConfigSpec holds configurations for the Prometheus configuration.
func (*ConfigSpec) DeepCopy ¶ added in v0.8.0
func (in *ConfigSpec) DeepCopy() *ConfigSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigSpec.
func (*ConfigSpec) DeepCopyInto ¶ added in v0.8.0
func (in *ConfigSpec) DeepCopyInto(out *ConfigSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExportFilters ¶
type ExportFilters struct { // A list of Prometheus time series matchers. Every time series must match at least one // of the matchers to be exported. This field can be used equivalently to the match[] // parameter of the Prometheus federation endpoint to selectively export data. // Example: `["{job!='foobar'}", "{__name__!~'container_foo.*|container_bar.*'}"]` MatchOneOf []string `json:"matchOneOf,omitempty"` }
ExportFilters provides mechanisms to filter the scraped data that's sent to GMP.
func (*ExportFilters) DeepCopy ¶
func (in *ExportFilters) DeepCopy() *ExportFilters
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExportFilters.
func (*ExportFilters) DeepCopyInto ¶
func (in *ExportFilters) DeepCopyInto(out *ExportFilters)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExportSpec ¶ added in v0.12.0
type ExportSpec struct { // The URL of the endpoint that supports Prometheus Remote Write to export samples to. URL string `json:"url"` }
type GlobalRules ¶
type GlobalRules struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Specification of rules to record and alert on. Spec RulesSpec `json:"spec"` // Most recently observed status of the resource. // +optional Status RulesStatus `json:"status"` }
GlobalRules defines Prometheus alerting and recording rules that are scoped to all data in the queried project. If the project_id or location labels are not preserved by the rule, they default to the values of the cluster.
+genclient +genclient:nonNamespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:resource:scope=Cluster +kubebuilder:subresource:status +kubebuilder:storageversion
func (*GlobalRules) DeepCopy ¶
func (in *GlobalRules) DeepCopy() *GlobalRules
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRules.
func (*GlobalRules) DeepCopyInto ¶
func (in *GlobalRules) DeepCopyInto(out *GlobalRules)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GlobalRules) DeepCopyObject ¶
func (in *GlobalRules) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*GlobalRules) GetMonitoringStatus ¶ added in v0.13.0
func (r *GlobalRules) GetMonitoringStatus() *MonitoringStatus
func (*GlobalRules) RuleGroupsConfig ¶ added in v0.13.0
func (r *GlobalRules) RuleGroupsConfig() (string, error)
func (*GlobalRules) ValidateCreate ¶ added in v0.13.0
func (r *GlobalRules) ValidateCreate() (admission.Warnings, error)
func (*GlobalRules) ValidateDelete ¶ added in v0.13.0
func (*GlobalRules) ValidateDelete() (admission.Warnings, error)
func (*GlobalRules) ValidateUpdate ¶ added in v0.13.0
type GlobalRulesList ¶
type GlobalRulesList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []GlobalRules `json:"items"` }
GlobalRulesList is a list of GlobalRules. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*GlobalRulesList) DeepCopy ¶
func (in *GlobalRulesList) DeepCopy() *GlobalRulesList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRulesList.
func (*GlobalRulesList) DeepCopyInto ¶
func (in *GlobalRulesList) DeepCopyInto(out *GlobalRulesList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*GlobalRulesList) DeepCopyObject ¶
func (in *GlobalRulesList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HTTPClientConfig ¶ added in v0.10.0
type HTTPClientConfig struct { // Authorization is the HTTP authorization credentials for the targets. // +optional Authorization *Auth `json:"authorization,omitempty"` // BasicAuth is the HTTP basic authentication credentials for the targets. // +optional BasicAuth *BasicAuth `json:"basicAuth,omitempty"` // TLS configures the scrape request's TLS settings. // +optional TLS *TLS `json:"tls,omitempty"` // OAuth2 is the OAuth2 client credentials used to fetch a token for the targets. // +optional OAuth2 *OAuth2 `json:"oauth2,omitempty"` ProxyConfig `json:",inline"` }
HTTPClientConfig stores HTTP-client configurations.
func (*HTTPClientConfig) DeepCopy ¶ added in v0.10.0
func (in *HTTPClientConfig) DeepCopy() *HTTPClientConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPClientConfig.
func (*HTTPClientConfig) DeepCopyInto ¶ added in v0.10.0
func (in *HTTPClientConfig) DeepCopyInto(out *HTTPClientConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HTTPClientConfig) ToPrometheusConfig ¶ added in v0.10.0
func (c *HTTPClientConfig) ToPrometheusConfig(m PodMonitoringCRD, pool PrometheusSecretConfigs) (config.HTTPClientConfig, error)
ToPrometheusConfig converts this object into the respective Prometheus configuration.
type KubeletScraping ¶
type KubeletScraping struct { // The interval at which the metric endpoints are scraped. Interval string `json:"interval"` // TLSInsecureSkipVerify disables verifying the target cert. // This can be useful for clusters provisioned with kubeadm. TLSInsecureSkipVerify bool `json:"tlsInsecureSkipVerify,omitempty"` }
KubeletScraping allows enabling scraping of the Kubelets' metric endpoints.
func (*KubeletScraping) DeepCopy ¶
func (in *KubeletScraping) DeepCopy() *KubeletScraping
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubeletScraping.
func (*KubeletScraping) DeepCopyInto ¶
func (in *KubeletScraping) DeepCopyInto(out *KubeletScraping)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LabelMapping ¶
type LabelMapping struct { // Kubernetes resource label to remap. From string `json:"from"` // Remapped Prometheus target label. // Defaults to the same name as `From`. To string `json:"to,omitempty"` }
LabelMapping specifies how to transfer a label from a Kubernetes resource onto a Prometheus target.
func (*LabelMapping) DeepCopy ¶
func (in *LabelMapping) DeepCopy() *LabelMapping
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LabelMapping.
func (*LabelMapping) DeepCopyInto ¶
func (in *LabelMapping) DeepCopyInto(out *LabelMapping)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ManagedAlertmanagerSpec ¶ added in v0.5.0
type ManagedAlertmanagerSpec struct { // ConfigSecret refers to the name of a single-key Secret in the public namespace that // holds the managed Alertmanager config file. ConfigSecret *corev1.SecretKeySelector `json:"configSecret,omitempty"` // ExternalURL is the URL under which Alertmanager is externally reachable (for example, if // Alertmanager is served via a reverse proxy). Used for generating relative and absolute // links back to Alertmanager itself. If the URL has a path portion, it will be used to // prefix all HTTP endpoints served by Alertmanager, otherwise relevant URL components will // be derived automatically. // // If no URL is provided, Alertmanager will point to the Google Cloud Metric Explorer page. ExternalURL string `json:"externalURL,omitempty"` }
ManagedAlertmanagerSpec holds configuration information for the managed Alertmanager instance.
func (*ManagedAlertmanagerSpec) DeepCopy ¶ added in v0.5.0
func (in *ManagedAlertmanagerSpec) DeepCopy() *ManagedAlertmanagerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ManagedAlertmanagerSpec.
func (*ManagedAlertmanagerSpec) DeepCopyInto ¶ added in v0.5.0
func (in *ManagedAlertmanagerSpec) DeepCopyInto(out *ManagedAlertmanagerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MonitoringCRD ¶ added in v0.10.0
type MonitoringCRD interface { client.Object // GetMonitoringStatus returns this CRD's status sub-resource, which must be // available at the top-level. GetMonitoringStatus() *MonitoringStatus }
type MonitoringCondition ¶
type MonitoringCondition struct { Type MonitoringConditionType `json:"type"` // Status of the condition, one of True, False, Unknown. Status corev1.ConditionStatus `json:"status"` // The last time this condition was updated. // +optional LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"` // Last time the condition transitioned from one status to another. // +optional LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"` // The reason for the condition's last transition. // +optional Reason string `json:"reason,omitempty"` // A human-readable message indicating details about the transition. // +optional Message string `json:"message,omitempty"` }
MonitoringCondition describes the condition of a PodMonitoring.
func NewDefaultConditions ¶
func NewDefaultConditions(now metav1.Time) []MonitoringCondition
NewDefaultConditions returns a list of default conditions.
func (*MonitoringCondition) DeepCopy ¶
func (in *MonitoringCondition) DeepCopy() *MonitoringCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitoringCondition.
func (*MonitoringCondition) DeepCopyInto ¶
func (in *MonitoringCondition) DeepCopyInto(out *MonitoringCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MonitoringCondition) IsValid ¶ added in v0.13.0
func (cond *MonitoringCondition) IsValid() bool
type MonitoringConditionType ¶
type MonitoringConditionType string
MonitoringConditionType is the type of MonitoringCondition.
const ( // ConfigurationCreateSuccess indicates that the config generated from the // monitoring resource was created successfully. ConfigurationCreateSuccess MonitoringConditionType = "ConfigurationCreateSuccess" )
type MonitoringStatus ¶ added in v0.10.0
type MonitoringStatus struct { // The generation observed by the controller. // +optional ObservedGeneration int64 `json:"observedGeneration"` // Represents the latest available observations of a podmonitor's current state. Conditions []MonitoringCondition `json:"conditions,omitempty"` }
MonitoringStatus holds status information of a monitoring resource.
func (*MonitoringStatus) DeepCopy ¶ added in v0.10.0
func (in *MonitoringStatus) DeepCopy() *MonitoringStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MonitoringStatus.
func (*MonitoringStatus) DeepCopyInto ¶ added in v0.10.0
func (in *MonitoringStatus) DeepCopyInto(out *MonitoringStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*MonitoringStatus) SetMonitoringCondition ¶ added in v0.10.0
func (status *MonitoringStatus) SetMonitoringCondition(gen int64, now metav1.Time, cond *MonitoringCondition) bool
SetMonitoringCondition merges the provided valid condition if the resource generation changed or there is a status condition state transition.
type OAuth2 ¶ added in v0.12.0
type OAuth2 struct { // ClientID is the public identifier for the client. // +optional ClientID string `json:"clientID"` // ClientSecret uses the secret as the client secret token. // +optional ClientSecret *SecretSelector `json:"clientSecret,omitempty"` // Scopes represents the scopes for the token request. // +optional Scopes []string `json:"scopes,omitempty"` // TokenURL is the URL to fetch the token from. // +optional TokenURL string `json:"tokenURL"` // EndpointParams are additional parameters to append to the token URL. // +optional EndpointParams map[string]string `json:"endpointParams,omitempty"` // TLS configures the token request's TLS settings. // +optional TLS *TLS `json:"tlsConfig,omitempty"` ProxyConfig `json:",inline"` }
OAuth2 is the OAuth2 client configuration.
func (*OAuth2) DeepCopy ¶ added in v0.12.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuth2.
func (*OAuth2) DeepCopyInto ¶ added in v0.12.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OAuth2) ToPrometheusConfig ¶ added in v0.12.0
func (c *OAuth2) ToPrometheusConfig(m PodMonitoringCRD, pool PrometheusSecretConfigs) (*config.OAuth2, error)
ToPrometheusConfig converts this object into the respective Prometheus configuration.
type OperatorConfig ¶
type OperatorConfig struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Rules specifies how the operator configures and deploys rule-evaluator. Rules RuleEvaluatorSpec `json:"rules,omitempty"` // Collection specifies how the operator configures collection, including // scraping and an integrated export to Google Cloud Monitoring. Collection CollectionSpec `json:"collection,omitempty"` // Exports is an EXPERIMENTAL feature that specifies additional, optional endpoints to export to, // on top of Google Cloud Monitoring collection. // Note: To disable integrated export to Google Cloud Monitoring specify a non-matching filter in the "collection.filter" field. Exports []ExportSpec `json:"exports,omitempty"` // ManagedAlertmanager holds information for configuring the managed instance of Alertmanager. // +kubebuilder:default={configSecret: {name: alertmanager, key: alertmanager.yaml}} ManagedAlertmanager *ManagedAlertmanagerSpec `json:"managedAlertmanager,omitempty"` // Features holds configuration for optional managed-collection features. Features OperatorFeatures `json:"features,omitempty"` // Scaling contains configuration options for scaling GMP. Scaling ScalingSpec `json:"scaling,omitempty"` }
OperatorConfig defines configuration of the gmp-operator. +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:storageversion
func (*OperatorConfig) DeepCopy ¶
func (in *OperatorConfig) DeepCopy() *OperatorConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorConfig.
func (*OperatorConfig) DeepCopyInto ¶
func (in *OperatorConfig) DeepCopyInto(out *OperatorConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OperatorConfig) DeepCopyObject ¶
func (in *OperatorConfig) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*OperatorConfig) Validate ¶ added in v0.13.0
func (oc *OperatorConfig) Validate() error
type OperatorConfigList ¶
type OperatorConfigList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []OperatorConfig `json:"items"` }
OperatorConfigList is a list of OperatorConfigs. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*OperatorConfigList) DeepCopy ¶
func (in *OperatorConfigList) DeepCopy() *OperatorConfigList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorConfigList.
func (*OperatorConfigList) DeepCopyInto ¶
func (in *OperatorConfigList) DeepCopyInto(out *OperatorConfigList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OperatorConfigList) DeepCopyObject ¶
func (in *OperatorConfigList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type OperatorConfigValidator ¶ added in v0.13.0
func (*OperatorConfigValidator) ValidateCreate ¶ added in v0.13.0
func (*OperatorConfigValidator) ValidateDelete ¶ added in v0.13.0
func (*OperatorConfigValidator) ValidateUpdate ¶ added in v0.13.0
type OperatorFeatures ¶ added in v0.7.0
type OperatorFeatures struct { // Configuration of target status reporting. TargetStatus TargetStatusSpec `json:"targetStatus,omitempty"` // Settings for the collector configuration propagation. Config ConfigSpec `json:"config,omitempty"` }
OperatorFeatures holds configuration for optional managed-collection features.
func (*OperatorFeatures) DeepCopy ¶ added in v0.7.0
func (in *OperatorFeatures) DeepCopy() *OperatorFeatures
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OperatorFeatures.
func (*OperatorFeatures) DeepCopyInto ¶ added in v0.7.0
func (in *OperatorFeatures) DeepCopyInto(out *OperatorFeatures)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodMonitoring ¶
type PodMonitoring struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Specification of desired Pod selection for target discovery by // Prometheus. Spec PodMonitoringSpec `json:"spec"` // Most recently observed status of the resource. // +optional Status PodMonitoringStatus `json:"status"` }
PodMonitoring defines monitoring for a set of pods, scoped to pods within the PodMonitoring's namespace. +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:subresource:status +kubebuilder:storageversion
func (*PodMonitoring) DeepCopy ¶
func (in *PodMonitoring) DeepCopy() *PodMonitoring
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodMonitoring.
func (*PodMonitoring) DeepCopyInto ¶
func (in *PodMonitoring) DeepCopyInto(out *PodMonitoring)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodMonitoring) DeepCopyObject ¶
func (in *PodMonitoring) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*PodMonitoring) Default ¶ added in v0.13.0
func (p *PodMonitoring) Default()
Default implements admission.Defaulter.
func (*PodMonitoring) GetEndpoints ¶ added in v0.10.0
func (p *PodMonitoring) GetEndpoints() []ScrapeEndpoint
func (*PodMonitoring) GetKey ¶ added in v0.6.1
func (p *PodMonitoring) GetKey() string
func (*PodMonitoring) GetMonitoringStatus ¶ added in v0.10.0
func (p *PodMonitoring) GetMonitoringStatus() *MonitoringStatus
func (*PodMonitoring) GetPodMonitoringStatus ¶ added in v0.10.0
func (p *PodMonitoring) GetPodMonitoringStatus() *PodMonitoringStatus
func (*PodMonitoring) IsNamespaceScoped ¶ added in v0.12.0
func (p *PodMonitoring) IsNamespaceScoped() bool
func (*PodMonitoring) ScrapeConfigs ¶
func (p *PodMonitoring) ScrapeConfigs(projectID, location, cluster string, pool PrometheusSecretConfigs) (res []*promconfig.ScrapeConfig, err error)
ScrapeConfigs generates Prometheus scrape configs for the PodMonitoring.
func (*PodMonitoring) UpdateDefault ¶ added in v0.13.0
func (p *PodMonitoring) UpdateDefault() bool
UpdateDefault defaults any unset fields, returning true if the object was updated.
func (*PodMonitoring) ValidateCreate ¶
func (p *PodMonitoring) ValidateCreate() (admission.Warnings, error)
func (*PodMonitoring) ValidateDelete ¶
func (p *PodMonitoring) ValidateDelete() (admission.Warnings, error)
func (*PodMonitoring) ValidateUpdate ¶
type PodMonitoringCRD ¶ added in v0.10.0
type PodMonitoringCRD interface { MonitoringCRD // IsNamespaceScoped returns true for PodMonitoring and false for ClusterPodMonitoring. // This is used for namespace tenancy isolation (e.g. for secrets). IsNamespaceScoped() bool // GetKey returns a unique identifier for this CRD. GetKey() string // GetEndpoints returns the endpoints scraped by this CRD. GetEndpoints() []ScrapeEndpoint // GetPodMonitoringStatus returns this CRD's status sub-resource, which must // be available at the top-level. GetPodMonitoringStatus() *PodMonitoringStatus }
PodMonitoringCRD represents a Kubernetes CRD that monitors Pod endpoints.
type PodMonitoringList ¶
type PodMonitoringList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []PodMonitoring `json:"items"` }
PodMonitoringList is a list of PodMonitorings. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*PodMonitoringList) DeepCopy ¶
func (in *PodMonitoringList) DeepCopy() *PodMonitoringList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodMonitoringList.
func (*PodMonitoringList) DeepCopyInto ¶
func (in *PodMonitoringList) DeepCopyInto(out *PodMonitoringList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodMonitoringList) DeepCopyObject ¶
func (in *PodMonitoringList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type PodMonitoringSpec ¶
type PodMonitoringSpec struct { // Label selector that specifies which pods are selected for this monitoring // configuration. Selector metav1.LabelSelector `json:"selector"` // The endpoints to scrape on the selected pods. Endpoints []ScrapeEndpoint `json:"endpoints"` // Labels to add to the Prometheus target for discovered endpoints. // The `instance` label is always set to `<pod_name>:<port>` or `<node_name>:<port>` // if the scraped pod is controlled by a DaemonSet. TargetLabels TargetLabels `json:"targetLabels,omitempty"` // Limits to apply at scrape time. Limits *ScrapeLimits `json:"limits,omitempty"` // FilterRunning will drop any pods that are in the "Failed" or "Succeeded" // pod lifecycle. // See: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase FilterRunning *bool `json:"filterRunning,omitempty"` }
PodMonitoringSpec contains specification parameters for PodMonitoring.
func (*PodMonitoringSpec) DeepCopy ¶
func (in *PodMonitoringSpec) DeepCopy() *PodMonitoringSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodMonitoringSpec.
func (*PodMonitoringSpec) DeepCopyInto ¶
func (in *PodMonitoringSpec) DeepCopyInto(out *PodMonitoringSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodMonitoringStatus ¶
type PodMonitoringStatus struct { MonitoringStatus `json:",inline"` // Represents the latest available observations of target state for each ScrapeEndpoint. EndpointStatuses []ScrapeEndpointStatus `json:"endpointStatuses,omitempty"` }
PodMonitoringStatus holds status information of a PodMonitoring resource.
func (*PodMonitoringStatus) DeepCopy ¶
func (in *PodMonitoringStatus) DeepCopy() *PodMonitoringStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodMonitoringStatus.
func (*PodMonitoringStatus) DeepCopyInto ¶
func (in *PodMonitoringStatus) DeepCopyInto(out *PodMonitoringStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PrometheusSecretConfigs ¶ added in v0.12.0
type PrometheusSecretConfigs map[string]secrets.KubernetesSecretConfig
PrometheusSecretConfigs allows quick gathering of SecretConfigs for Prometheus configuration.
func (PrometheusSecretConfigs) DeepCopy ¶ added in v0.12.0
func (in PrometheusSecretConfigs) DeepCopy() PrometheusSecretConfigs
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusSecretConfigs.
func (PrometheusSecretConfigs) DeepCopyInto ¶ added in v0.12.0
func (in PrometheusSecretConfigs) DeepCopyInto(out *PrometheusSecretConfigs)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (PrometheusSecretConfigs) SecretConfigs ¶ added in v0.12.0
func (p PrometheusSecretConfigs) SecretConfigs() []secrets.SecretConfig
SecretConfigs returns an unordered list of secrets.SecretConfig.
func (PrometheusSecretConfigs) Set ¶ added in v0.12.0
func (p PrometheusSecretConfigs) Set(ref string, c secrets.KubernetesSecretConfig)
Set inserts kubernetes.SecretConfig for given reference (in form of <namespace>/<name>/<key>). Insertion will be deduplicated if needed.
type ProxyConfig ¶ added in v0.10.0
type ProxyConfig struct { // ProxyURL is the HTTP proxy server to use to connect to the targets. // // Encoded passwords are not supported. // +optional ProxyURL string `json:"proxyUrl,omitempty"` }
ProxyConfig specifies the proxy HTTP configuration.
func (*ProxyConfig) DeepCopy ¶ added in v0.10.0
func (in *ProxyConfig) DeepCopy() *ProxyConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyConfig.
func (*ProxyConfig) DeepCopyInto ¶ added in v0.10.0
func (in *ProxyConfig) DeepCopyInto(out *ProxyConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ProxyConfig) ToPrometheusConfig ¶ added in v0.10.0
func (c *ProxyConfig) ToPrometheusConfig() (config.URL, error)
ToPrometheusConfig converts this object into the respective Prometheus configuration.
type RelabelingRule ¶
type RelabelingRule struct { // The source labels select values from existing labels. Their content is concatenated // using the configured separator and matched against the configured regular expression // for the replace, keep, and drop actions. SourceLabels []string `json:"sourceLabels,omitempty"` // Separator placed between concatenated source label values. Defaults to ';'. Separator string `json:"separator,omitempty"` // Label to which the resulting value is written in a replace action. // It is mandatory for replace actions. Regex capture groups are available. TargetLabel string `json:"targetLabel,omitempty"` // Regular expression against which the extracted value is matched. Defaults to '(.*)'. Regex string `json:"regex,omitempty"` // Modulus to take of the hash of the source label values. Modulus uint64 `json:"modulus,omitempty"` // Replacement value against which a regex replace is performed if the // regular expression matches. Regex capture groups are available. Defaults to '$1'. Replacement string `json:"replacement,omitempty"` // Action to perform based on regex matching. Defaults to 'replace'. Action string `json:"action,omitempty"` }
RelabelingRule defines a single Prometheus relabeling rule.
func (*RelabelingRule) DeepCopy ¶
func (in *RelabelingRule) DeepCopy() *RelabelingRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RelabelingRule.
func (*RelabelingRule) DeepCopyInto ¶
func (in *RelabelingRule) DeepCopyInto(out *RelabelingRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Rule ¶
type Rule struct { // Record the result of the expression to this metric name. // Only one of `record` and `alert` must be set. Record string `json:"record,omitempty"` // Name of the alert to evaluate the expression as. // Only one of `record` and `alert` must be set. Alert string `json:"alert,omitempty"` // The PromQL expression to evaluate. Expr string `json:"expr"` // The duration to wait before a firing alert produced by this rule is sent to Alertmanager. // Only valid if `alert` is set. For string `json:"for,omitempty"` // A set of labels to attach to the result of the query expression. Labels map[string]string `json:"labels,omitempty"` // A set of annotations to attach to alerts produced by the query expression. // Only valid if `alert` is set. Annotations map[string]string `json:"annotations,omitempty"` }
Rule is a single rule in the Prometheus format: https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/
func (*Rule) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule.
func (*Rule) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RuleEvaluatorSpec ¶
type RuleEvaluatorSpec struct { // ExternalLabels specifies external labels that are attached to any rule // results and alerts produced by rules. The precedence behavior matches that // of Prometheus. ExternalLabels map[string]string `json:"externalLabels,omitempty"` // QueryProjectID is the GCP project ID to evaluate rules against. // If left blank, the rule-evaluator will try attempt to infer the Project ID // from the environment. QueryProjectID string `json:"queryProjectID,omitempty"` // The base URL used for the generator URL in the alert notification payload. // Should point to an instance of a query frontend that gives access to queryProjectID. GeneratorURL string `json:"generatorUrl,omitempty"` // Alerting contains how the rule-evaluator configures alerting. Alerting AlertingSpec `json:"alerting,omitempty"` // A reference to GCP service account credentials with which the rule // evaluator container is run. It needs to have metric read permissions // against queryProjectId and metric write permissions against all projects // to which rule results are written. // Within GKE, this can typically be left empty if the compute default // service account has the required permissions. Credentials *corev1.SecretKeySelector `json:"credentials,omitempty"` }
RuleEvaluatorSpec defines configuration for deploying rule-evaluator.
func (*RuleEvaluatorSpec) DeepCopy ¶
func (in *RuleEvaluatorSpec) DeepCopy() *RuleEvaluatorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleEvaluatorSpec.
func (*RuleEvaluatorSpec) DeepCopyInto ¶
func (in *RuleEvaluatorSpec) DeepCopyInto(out *RuleEvaluatorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RuleGroup ¶
type RuleGroup struct { // The name of the rule group. Name string `json:"name"` // The interval at which to evaluate the rules. Must be a valid Prometheus duration. Interval string `json:"interval"` // A list of rules that are executed sequentially as part of this group. Rules []Rule `json:"rules"` }
RuleGroup declares rules in the Prometheus format: https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/
func (*RuleGroup) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleGroup.
func (*RuleGroup) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Rules ¶
type Rules struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Specification of rules to record and alert on. Spec RulesSpec `json:"spec"` // Most recently observed status of the resource. // +optional Status RulesStatus `json:"status"` }
Rules defines Prometheus alerting and recording rules that are scoped to the namespace of the resource. Only metric data from this namespace is processed and all rule results have their project_id, cluster, and namespace label preserved for query processing. If the location label is not preserved by the rule, it defaults to the cluster's location.
+genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:subresource:status +kubebuilder:storageversion
func (*Rules) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rules.
func (*Rules) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Rules) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Rules) GetMonitoringStatus ¶ added in v0.13.0
func (r *Rules) GetMonitoringStatus() *MonitoringStatus
func (*Rules) RuleGroupsConfig ¶ added in v0.13.0
func (*Rules) ValidateCreate ¶ added in v0.13.0
func (*Rules) ValidateDelete ¶ added in v0.13.0
type RulesList ¶
type RulesList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []Rules `json:"items"` }
RulesList is a list of Rules. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*RulesList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RulesList.
func (*RulesList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RulesList) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type RulesSpec ¶
type RulesSpec struct { // A list of Prometheus rule groups. Groups []RuleGroup `json:"groups"` }
RulesSpec contains specification parameters for a Rules resource.
func (*RulesSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RulesSpec.
func (*RulesSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RulesStatus ¶
type RulesStatus struct {
MonitoringStatus `json:",inline"`
}
RulesStatus contains status information for a Rules resource.
func (*RulesStatus) DeepCopy ¶
func (in *RulesStatus) DeepCopy() *RulesStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RulesStatus.
func (*RulesStatus) DeepCopyInto ¶
func (in *RulesStatus) DeepCopyInto(out *RulesStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SampleGroup ¶ added in v0.6.1
type SampleGroup struct { // Targets emitting the error message. SampleTargets []SampleTarget `json:"sampleTargets,omitempty"` // Total count of similar errors. // +optional Count *int32 `json:"count,omitempty"` }
func (*SampleGroup) DeepCopy ¶ added in v0.6.1
func (in *SampleGroup) DeepCopy() *SampleGroup
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SampleGroup.
func (*SampleGroup) DeepCopyInto ¶ added in v0.6.1
func (in *SampleGroup) DeepCopyInto(out *SampleGroup)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SampleTarget ¶ added in v0.6.1
type SampleTarget struct { // The label set, keys and values, of the target. Labels prommodel.LabelSet `json:"labels,omitempty"` // Error message. LastError *string `json:"lastError,omitempty"` // Scrape duration in seconds. LastScrapeDurationSeconds string `json:"lastScrapeDurationSeconds,omitempty"` // Health status. Health string `json:"health,omitempty"` }
func (*SampleTarget) DeepCopy ¶ added in v0.6.1
func (in *SampleTarget) DeepCopy() *SampleTarget
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SampleTarget.
func (*SampleTarget) DeepCopyInto ¶ added in v0.6.1
func (in *SampleTarget) DeepCopyInto(out *SampleTarget)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ScalingSpec ¶ added in v0.13.0
type ScalingSpec struct {
VPA VPASpec `json:"vpa,omitempty"`
}
ScalingSpec defines configuration options for scaling GMP.
type ScrapeEndpoint ¶
type ScrapeEndpoint struct { // Name or number of the port to scrape. // The container metadata label is only populated if the port is referenced by name // because port numbers are not unique across containers. Port intstr.IntOrString `json:"port"` // Protocol scheme to use to scrape. Scheme string `json:"scheme,omitempty"` // HTTP path to scrape metrics from. Defaults to "/metrics". Path string `json:"path,omitempty"` // HTTP GET params to use when scraping. Params map[string][]string `json:"params,omitempty"` // Interval at which to scrape metrics. Must be a valid Prometheus duration. // +kubebuilder:validation:Pattern="^((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?|0)$" // +kubebuilder:default="1m" Interval string `json:"interval,omitempty"` // Timeout for metrics scrapes. Must be a valid Prometheus duration. // Must not be larger than the scrape interval. Timeout string `json:"timeout,omitempty"` // Relabeling rules for metrics scraped from this endpoint. Relabeling rules that // override protected target labels (project_id, location, cluster, namespace, job, // instance, top_level_controller, top_level_controller_type, or __address__) are // not permitted. The labelmap action is not permitted in general. MetricRelabeling []RelabelingRule `json:"metricRelabeling,omitempty"` // Prometheus HTTP client configuration. HTTPClientConfig `json:",inline"` }
ScrapeEndpoint specifies a Prometheus metrics endpoint to scrape.
func (*ScrapeEndpoint) DeepCopy ¶
func (in *ScrapeEndpoint) DeepCopy() *ScrapeEndpoint
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScrapeEndpoint.
func (*ScrapeEndpoint) DeepCopyInto ¶
func (in *ScrapeEndpoint) DeepCopyInto(out *ScrapeEndpoint)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ScrapeEndpointStatus ¶ added in v0.6.1
type ScrapeEndpointStatus struct { // The name of the ScrapeEndpoint. Name string `json:"name"` // Total number of active targets. ActiveTargets int64 `json:"activeTargets,omitempty"` // Total number of active, unhealthy targets. UnhealthyTargets int64 `json:"unhealthyTargets,omitempty"` // Last time this status was updated. LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"` // A fixed sample of targets grouped by error type. SampleGroups []SampleGroup `json:"sampleGroups,omitempty"` // Fraction of collectors included in status, bounded [0,1]. // Ideally, this should always be 1. Anything less can // be considered a problem and should be investigated. CollectorsFraction string `json:"collectorsFraction,omitempty"` }
func (*ScrapeEndpointStatus) DeepCopy ¶ added in v0.6.1
func (in *ScrapeEndpointStatus) DeepCopy() *ScrapeEndpointStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScrapeEndpointStatus.
func (*ScrapeEndpointStatus) DeepCopyInto ¶ added in v0.6.1
func (in *ScrapeEndpointStatus) DeepCopyInto(out *ScrapeEndpointStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ScrapeLimits ¶
type ScrapeLimits struct { // Maximum number of samples accepted within a single scrape. // Uses Prometheus default if left unspecified. Samples uint64 `json:"samples,omitempty"` // Maximum number of labels accepted for a single sample. // Uses Prometheus default if left unspecified. Labels uint64 `json:"labels,omitempty"` // Maximum label name length. // Uses Prometheus default if left unspecified. LabelNameLength uint64 `json:"labelNameLength,omitempty"` // Maximum label value length. // Uses Prometheus default if left unspecified. LabelValueLength uint64 `json:"labelValueLength,omitempty"` }
ScrapeLimits limits applied to scraped targets.
func (*ScrapeLimits) DeepCopy ¶
func (in *ScrapeLimits) DeepCopy() *ScrapeLimits
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScrapeLimits.
func (*ScrapeLimits) DeepCopyInto ¶
func (in *ScrapeLimits) DeepCopyInto(out *ScrapeLimits)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ScrapeNodeEndpoint ¶ added in v0.12.0
type ScrapeNodeEndpoint struct { // Protocol scheme to use to scrape. Scheme string `json:"scheme,omitempty"` // HTTP path to scrape metrics from. Defaults to "/metrics". Path string `json:"path,omitempty"` // HTTP GET params to use when scraping. Params map[string][]string `json:"params,omitempty"` // Interval at which to scrape metrics. Must be a valid Prometheus duration. // +kubebuilder:validation:Pattern="^((([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?|0)$" // +kubebuilder:default="1m" Interval string `json:"interval,omitempty"` // Timeout for metrics scrapes. Must be a valid Prometheus duration. // Must not be larger then the scrape interval. Timeout string `json:"timeout,omitempty"` // Relabeling rules for metrics scraped from this endpoint. Relabeling rules that // override protected target labels (project_id, location, cluster, namespace, job, // instance, or __address__) are not permitted. The labelmap action is not permitted // in general. MetricRelabeling []RelabelingRule `json:"metricRelabeling,omitempty"` // TLS configures the scrape request's TLS settings. // +optional TLS *ClusterNodeTLS `json:"tls,omitempty"` }
ScrapeNodeEndpoint specifies a Prometheus metrics endpoint on a node to scrape. It contains all the fields used in the ScrapeEndpoint except for port and HTTPClientConfig.
func (*ScrapeNodeEndpoint) DeepCopy ¶ added in v0.12.0
func (in *ScrapeNodeEndpoint) DeepCopy() *ScrapeNodeEndpoint
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScrapeNodeEndpoint.
func (*ScrapeNodeEndpoint) DeepCopyInto ¶ added in v0.12.0
func (in *ScrapeNodeEndpoint) DeepCopyInto(out *ScrapeNodeEndpoint)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretKeySelector ¶ added in v0.12.0
type SecretKeySelector struct { // Name of the secret to select from. Name string `json:"name"` // Key of the secret to select from. Must be a valid secret key. Key string `json:"key"` // Namespace of the secret to select from. // If empty the parent resource namespace will be chosen. // +optional // +kubebuilder:field:scope=Cluster Namespace string `json:"namespace,omitempty"` }
SecretKeySelector represents selector for Kubernetes secret. It's similar to k8s.io/api/core/v1.SecretKeySelector, but allows cross namespace selections.
func (*SecretKeySelector) DeepCopy ¶ added in v0.12.0
func (in *SecretKeySelector) DeepCopy() *SecretKeySelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesSecretKeySelector.
func (*SecretKeySelector) DeepCopyInto ¶ added in v0.12.0
func (in *SecretKeySelector) DeepCopyInto(out *SecretKeySelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretOrConfigMap ¶
type SecretOrConfigMap struct { // Secret containing data to use for the targets. Secret *corev1.SecretKeySelector `json:"secret,omitempty"` // ConfigMap containing data to use for the targets. ConfigMap *corev1.ConfigMapKeySelector `json:"configMap,omitempty"` }
SecretOrConfigMap allows to specify data as a Secret or ConfigMap. Fields are mutually exclusive. Taking inspiration from prometheus-operator: https://github.com/prometheus-operator/prometheus-operator/blob/2c81b0cf6a5673e08057499a08ddce396b19dda4/Documentation/api.md#secretorconfigmap
func (*SecretOrConfigMap) DeepCopy ¶
func (in *SecretOrConfigMap) DeepCopy() *SecretOrConfigMap
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretOrConfigMap.
func (*SecretOrConfigMap) DeepCopyInto ¶
func (in *SecretOrConfigMap) DeepCopyInto(out *SecretOrConfigMap)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SecretSelector ¶ added in v0.12.0
type SecretSelector struct { // Secret represents reference to a given key from certain Secret in a given namespace. // +optional Secret *SecretKeySelector `json:"secret,omitempty"` }
SecretSelector references a secret from a secret provider e.g. Kubernetes Secret. Only one provider can be used at a time.
func (*SecretSelector) DeepCopy ¶ added in v0.12.0
func (in *SecretSelector) DeepCopy() *SecretSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretSelector.
func (*SecretSelector) DeepCopyInto ¶ added in v0.12.0
func (in *SecretSelector) DeepCopyInto(out *SecretSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TLS ¶ added in v0.10.0
type TLS struct { // ServerName is used to verify the hostname for the targets. // +optional ServerName string `json:"serverName,omitempty"` // InsecureSkipVerify disables target certificate validation. // +optional InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"` // MinVersion is the minimum TLS version. Accepted values: TLS10 (TLS 1.0), TLS11 (TLS 1.1), // TLS12 (TLS 1.2), TLS13 (TLS 1.3). // // If unset, Prometheus will use Go default minimum version, which is TLS 1.2. // See MinVersion in https://pkg.go.dev/crypto/tls#Config. // +optional MinVersion string `json:"minVersion,omitempty"` // MaxVersion is the maximum TLS version. Accepted values: TLS10 (TLS 1.0), TLS11 (TLS 1.1), // TLS12 (TLS 1.2), TLS13 (TLS 1.3). // // If unset, Prometheus will use Go default minimum version, which is TLS 1.2. // See MinVersion in https://pkg.go.dev/crypto/tls#Config. // +optional MaxVersion string `json:"maxVersion,omitempty"` CA *SecretSelector `json:"ca,omitempty"` // Cert uses the secret as the certificate for client authentication to the server. // +optional Cert *SecretSelector `json:"cert,omitempty"` // Key uses the secret as the private key for client authentication to the server. // +optional Key *SecretSelector `json:"key,omitempty"` }
TLS specifies TLS configuration used for HTTP requests.
func (*TLS) DeepCopy ¶ added in v0.10.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLS.
func (*TLS) DeepCopyInto ¶ added in v0.10.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TLS) ToPrometheusConfig ¶ added in v0.10.0
func (c *TLS) ToPrometheusConfig(m PodMonitoringCRD, pool PrometheusSecretConfigs) (*config.TLSConfig, error)
ToPrometheusConfig converts this object into the respective Prometheus configuration.
type TLSConfig ¶
type TLSConfig struct { // Struct containing the CA cert to use for the targets. CA *SecretOrConfigMap `json:"ca,omitempty"` // Struct containing the client cert file for the targets. Cert *SecretOrConfigMap `json:"cert,omitempty"` // Secret containing the client key file for the targets. KeySecret *corev1.SecretKeySelector `json:"keySecret,omitempty"` // Used to verify the hostname for the targets. ServerName string `json:"serverName,omitempty"` // Disable target certificate validation. InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"` // Minimum TLS version. Accepted values: TLS10 (TLS 1.0), TLS11 (TLS 1.1), TLS12 (TLS 1.2), TLS13 (TLS 1.3). // If unset, Prometheus will use Go default minimum version, which is TLS 1.2. // See MinVersion in https://pkg.go.dev/crypto/tls#Config. MinVersion string `json:"minVersion,omitempty"` // Maximum TLS version. Accepted values: TLS10 (TLS 1.0), TLS11 (TLS 1.1), TLS12 (TLS 1.2), TLS13 (TLS 1.3). // If unset, Prometheus will use Go default minimum version, which is TLS 1.2. // See MinVersion in https://pkg.go.dev/crypto/tls#Config. MaxVersion string `json:"maxVersion,omitempty"` }
TLSConfig specifies TLS configuration parameters from Kubernetes resources.
func (*TLSConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSConfig.
func (*TLSConfig) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TargetLabels ¶
type TargetLabels struct { // Pod metadata labels that are set on all scraped targets. // Permitted keys are `pod`, `container`, and `node` for PodMonitoring and // `pod`, `container`, `node`, and `namespace` for ClusterPodMonitoring. The `container` // label is only populated if the scrape port is referenced by name. // Defaults to [pod, container, top_level_controller_name, top_level_controller_type] for // PodMonitoring and [namespace, pod, container, top_level_controller_name, top_level_controller_type] // for ClusterPodMonitoring. // If set to null, it will be interpreted as the empty list for PodMonitoring // and to [namespace] for ClusterPodMonitoring. This is for backwards-compatibility // only. Metadata *[]string `json:"metadata,omitempty"` // Labels to transfer from the Kubernetes Pod to Prometheus target labels. // Mappings are applied in order. FromPod []LabelMapping `json:"fromPod,omitempty"` }
TargetLabels configures labels for the discovered Prometheus targets.
func (*TargetLabels) DeepCopy ¶
func (in *TargetLabels) DeepCopy() *TargetLabels
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetLabels.
func (*TargetLabels) DeepCopyInto ¶
func (in *TargetLabels) DeepCopyInto(out *TargetLabels)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TargetStatusSpec ¶ added in v0.7.0
type TargetStatusSpec struct { // Enable target status reporting. Enabled bool `json:"enabled,omitempty"` }
TargetStatusSpec holds configuration for target status reporting.
func (*TargetStatusSpec) DeepCopy ¶ added in v0.7.0
func (in *TargetStatusSpec) DeepCopy() *TargetStatusSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetStatusSpec.
func (*TargetStatusSpec) DeepCopyInto ¶ added in v0.7.0
func (in *TargetStatusSpec) DeepCopyInto(out *TargetStatusSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VPASpec ¶ added in v0.13.0
type VPASpec struct { // Enabled configures whether the operator configures Vertical Pod Autoscaling for the collector pods. // In GKE, installing Vertical Pod Autoscaling requires a cluster restart, and therefore it also results in an operator restart. // In other environments, the operator may need to be restarted to enable VPA to run the following check again and watch for the objects. Enabled bool `json:"enabled,omitempty"` }
VPASpec defines configuration options for vertical pod autoscaling.