Documentation
¶
Index ¶
- Constants
- Variables
- func Resource(resource string) schema.GroupResource
- type APIServerConfig
- type AlertingSpec
- type Alertmanager
- func (in *Alertmanager) DeepCopy() *Alertmanager
- func (in *Alertmanager) DeepCopyInto(out *Alertmanager)
- func (l *Alertmanager) DeepCopyObject() runtime.Object
- func (a *Alertmanager) ExpectedReplicas() int
- func (a *Alertmanager) SetAvailableReplicas(i int)
- func (a *Alertmanager) SetReplicas(i int)
- func (a *Alertmanager) SetUnavailableReplicas(i int)
- func (a *Alertmanager) SetUpdatedReplicas(i int)
- type AlertmanagerConfigMatcherStrategy
- type AlertmanagerConfiguration
- type AlertmanagerEndpoints
- type AlertmanagerGlobalConfig
- type AlertmanagerList
- type AlertmanagerSpec
- type AlertmanagerStatus
- type AlertmanagerWebSpec
- type ArbitraryFSAccessThroughSMsConfig
- type Argument
- type AttachMetadata
- type Authorization
- type AuthorizationValidationError
- type BasicAuth
- type ByteSize
- type CommonPrometheusFields
- type Condition
- type ConditionStatus
- type ConditionType
- type Duration
- type EmbeddedObjectMetadata
- type EmbeddedPersistentVolumeClaim
- type Endpoint
- type Exemplars
- type GlobalSMTPConfig
- type GoDuration
- type HTTPConfig
- type HostAlias
- type HostPort
- type LabelName
- type MetadataConfig
- type NamespaceSelector
- type NonEmptyDuration
- type OAuth2
- type OAuth2ValidationError
- type ObjectReference
- type PodMetricsEndpoint
- type PodMetricsEndpointTLSConfig
- type PodMonitor
- type PodMonitorList
- type PodMonitorSpec
- type Probe
- type ProbeList
- type ProbeSpec
- type ProbeTLSConfig
- type ProbeTargetIngress
- type ProbeTargetStaticConfig
- type ProbeTargets
- type ProbeTargetsValidationError
- type ProberSpec
- type Prometheus
- func (in *Prometheus) DeepCopy() *Prometheus
- func (in *Prometheus) DeepCopyInto(out *Prometheus)
- func (l *Prometheus) DeepCopyObject() runtime.Object
- func (l *Prometheus) GetCommonPrometheusFields() CommonPrometheusFields
- func (l *Prometheus) GetStatus() PrometheusStatus
- func (l *Prometheus) GetTypeMeta() metav1.TypeMeta
- func (l *Prometheus) SetCommonPrometheusFields(f CommonPrometheusFields)
- type PrometheusInterface
- type PrometheusList
- type PrometheusRule
- type PrometheusRuleExcludeConfig
- type PrometheusRuleList
- type PrometheusRuleSpec
- type PrometheusSpec
- type PrometheusStatus
- type PrometheusTracingConfig
- type PrometheusWebSpec
- type QuerySpec
- type QueueConfig
- type RelabelConfig
- type RemoteReadSpec
- type RemoteWriteSpec
- type Rule
- type RuleGroup
- type Rules
- type RulesAlert
- type SafeAuthorization
- type SafeTLSConfig
- type SecretOrConfigMap
- type SecretOrConfigMapValidationError
- type ServiceMonitor
- type ServiceMonitorList
- type ServiceMonitorSpec
- type ShardStatus
- type Sigv4
- type StorageSpec
- type TLSConfig
- type TLSConfigValidationError
- type TSDBSpec
- type ThanosRuler
- func (in *ThanosRuler) DeepCopy() *ThanosRuler
- func (in *ThanosRuler) DeepCopyInto(out *ThanosRuler)
- func (l *ThanosRuler) DeepCopyObject() runtime.Object
- func (tr *ThanosRuler) ExpectedReplicas() int
- func (tr *ThanosRuler) SetAvailableReplicas(i int)
- func (tr *ThanosRuler) SetReplicas(i int)
- func (tr *ThanosRuler) SetUnavailableReplicas(i int)
- func (tr *ThanosRuler) SetUpdatedReplicas(i int)
- type ThanosRulerList
- type ThanosRulerSpec
- type ThanosRulerStatus
- type ThanosSpec
- type WebConfigFileFields
- type WebHTTPConfig
- type WebHTTPHeaders
- type WebTLSConfig
- type WebTLSConfigError
Constants ¶
const ( AlertmanagersKind = "Alertmanager" AlertmanagerName = "alertmanagers" AlertManagerKindKey = "alertmanager" )
const ( PodMonitorsKind = "PodMonitor" PodMonitorName = "podmonitors" PodMonitorKindKey = "podmonitor" )
const ( ProbesKind = "Probe" ProbeName = "probes" ProbeKindKey = "probe" )
const ( PrometheusesKind = "Prometheus" PrometheusName = "prometheuses" PrometheusKindKey = "prometheus" )
const ( PrometheusRuleKind = "PrometheusRule" PrometheusRuleName = "prometheusrules" PrometheusRuleKindKey = "prometheusrule" )
const ( ServiceMonitorsKind = "ServiceMonitor" ServiceMonitorName = "servicemonitors" ServiceMonitorKindKey = "servicemonitor" )
const ( ThanosRulerKind = "ThanosRuler" ThanosRulerName = "thanosrulers" ThanosRulerKindKey = "thanosrulers" )
const (
Version = "v1"
)
Variables ¶
var ( // localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes. SchemeBuilder runtime.SchemeBuilder AddToScheme = localSchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: monitoring.GroupName, Version: Version}
SchemeGroupVersion is the group version used to register these objects
Functions ¶
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource
Types ¶
type APIServerConfig ¶
type APIServerConfig struct { // Kubernetes API address consisting of a hostname or IP address followed // by an optional port number. Host string `json:"host"` // BasicAuth configuration for the API server. // // Cannot be set at the same time as `authorization`, `bearerToken`, or // `bearerTokenFile`. // // +optional BasicAuth *BasicAuth `json:"basicAuth,omitempty"` // File to read bearer token for accessing apiserver. // // Cannot be set at the same time as `basicAuth`, `authorization`, or `bearerToken`. // // *Deprecated: this will be removed in a future release. Prefer using `authorization`.* BearerTokenFile string `json:"bearerTokenFile,omitempty"` // TLS Config to use for the API server. // // +optional TLSConfig *TLSConfig `json:"tlsConfig,omitempty"` // Authorization section for the API server. // // Cannot be set at the same time as `basicAuth`, `bearerToken`, or // `bearerTokenFile`. // // +optional Authorization *Authorization `json:"authorization,omitempty"` // *Warning: this field shouldn't be used because the token value appears // in clear-text. Prefer using `authorization`.* // // *Deprecated: this will be removed in a future release.* BearerToken string `json:"bearerToken,omitempty"` }
APIServerConfig defines how the Prometheus server connects to the Kubernetes API server.
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config
+k8s:openapi-gen=true
func (*APIServerConfig) DeepCopy ¶
func (in *APIServerConfig) DeepCopy() *APIServerConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServerConfig.
func (*APIServerConfig) DeepCopyInto ¶
func (in *APIServerConfig) DeepCopyInto(out *APIServerConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AlertingSpec ¶
type AlertingSpec struct { // AlertmanagerEndpoints Prometheus should fire alerts against. Alertmanagers []AlertmanagerEndpoints `json:"alertmanagers"` }
AlertingSpec defines parameters for alerting configuration of Prometheus servers. +k8s:openapi-gen=true
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 Alertmanager ¶
type Alertmanager struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Specification of the desired behavior of the Alertmanager cluster. More info: // https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status Spec AlertmanagerSpec `json:"spec"` // Most recent observed status of the Alertmanager cluster. Read-only. // More info: // https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status Status AlertmanagerStatus `json:"status,omitempty"` }
Alertmanager describes an Alertmanager cluster.
func (*Alertmanager) DeepCopy ¶
func (in *Alertmanager) DeepCopy() *Alertmanager
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Alertmanager.
func (*Alertmanager) DeepCopyInto ¶
func (in *Alertmanager) DeepCopyInto(out *Alertmanager)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Alertmanager) DeepCopyObject ¶
func (l *Alertmanager) DeepCopyObject() runtime.Object
DeepCopyObject implements the runtime.Object interface.
func (*Alertmanager) ExpectedReplicas ¶ added in v0.65.0
func (a *Alertmanager) ExpectedReplicas() int
func (*Alertmanager) SetAvailableReplicas ¶ added in v0.65.0
func (a *Alertmanager) SetAvailableReplicas(i int)
func (*Alertmanager) SetReplicas ¶ added in v0.65.0
func (a *Alertmanager) SetReplicas(i int)
func (*Alertmanager) SetUnavailableReplicas ¶ added in v0.65.0
func (a *Alertmanager) SetUnavailableReplicas(i int)
func (*Alertmanager) SetUpdatedReplicas ¶ added in v0.65.0
func (a *Alertmanager) SetUpdatedReplicas(i int)
type AlertmanagerConfigMatcherStrategy ¶ added in v0.61.0
type AlertmanagerConfigMatcherStrategy struct { // If set to `OnNamespace`, the operator injects a label matcher matching the namespace of the AlertmanagerConfig object for all its routes and inhibition rules. // `None` will not add any additional matchers other than the ones specified in the AlertmanagerConfig. // Default is `OnNamespace`. // +kubebuilder:validation:Enum="OnNamespace";"None" // +kubebuilder:default:="OnNamespace" Type string `json:"type,omitempty"` }
AlertmanagerConfigMatcherStrategy defines the strategy used by AlertmanagerConfig objects to match alerts.
func (*AlertmanagerConfigMatcherStrategy) DeepCopy ¶ added in v0.61.0
func (in *AlertmanagerConfigMatcherStrategy) DeepCopy() *AlertmanagerConfigMatcherStrategy
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerConfigMatcherStrategy.
func (*AlertmanagerConfigMatcherStrategy) DeepCopyInto ¶ added in v0.61.0
func (in *AlertmanagerConfigMatcherStrategy) DeepCopyInto(out *AlertmanagerConfigMatcherStrategy)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AlertmanagerConfiguration ¶ added in v0.55.0
type AlertmanagerConfiguration struct { // The name of the AlertmanagerConfig resource which is used to generate the Alertmanager configuration. // It must be defined in the same namespace as the Alertmanager object. // The operator will not enforce a `namespace` label for routes and inhibition rules. // +kubebuilder:validation:MinLength=1 Name string `json:"name,omitempty"` // Defines the global parameters of the Alertmanager configuration. // +optional Global *AlertmanagerGlobalConfig `json:"global,omitempty"` // Custom notification templates. // +optional Templates []SecretOrConfigMap `json:"templates,omitempty"` }
AlertmanagerConfiguration defines the Alertmanager configuration. +k8s:openapi-gen=true
func (*AlertmanagerConfiguration) DeepCopy ¶ added in v0.55.0
func (in *AlertmanagerConfiguration) DeepCopy() *AlertmanagerConfiguration
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerConfiguration.
func (*AlertmanagerConfiguration) DeepCopyInto ¶ added in v0.55.0
func (in *AlertmanagerConfiguration) DeepCopyInto(out *AlertmanagerConfiguration)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AlertmanagerEndpoints ¶
type AlertmanagerEndpoints struct { // Namespace of the Endpoints object. Namespace string `json:"namespace"` // Name of the Endpoints object in the namespace. Name string `json:"name"` // Port on which the Alertmanager API is exposed. 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. // // +optional TLSConfig *TLSConfig `json:"tlsConfig,omitempty"` // BasicAuth configuration for Alertmanager. // // Cannot be set at the same time as `bearerTokenFile`, or `authorization`. // // +optional BasicAuth *BasicAuth `json:"basicAuth,omitempty"` // File to read bearer token for Alertmanager. // // Cannot be set at the same time as `basicAuth`, or `authorization`. // // *Deprecated: this will be removed in a future release. Prefer using `authorization`.* BearerTokenFile string `json:"bearerTokenFile,omitempty"` // Authorization section for Alertmanager. // // Cannot be set at the same time as `basicAuth`, or `bearerTokenFile`. // // +optional Authorization *SafeAuthorization `json:"authorization,omitempty"` // Version of the Alertmanager API that Prometheus 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. // // +optional Timeout *Duration `json:"timeout,omitempty"` // Whether to enable HTTP2. // // +optional EnableHttp2 *bool `json:"enableHttp2,omitempty"` }
AlertmanagerEndpoints defines a selection of a single Endpoints object containing Alertmanager IPs to fire alerts against. +k8s:openapi-gen=true
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 AlertmanagerGlobalConfig ¶ added in v0.59.0
type AlertmanagerGlobalConfig struct { // Configures global SMTP parameters. // +optional SMTPConfig *GlobalSMTPConfig `json:"smtp,omitempty"` // ResolveTimeout is the default value used by alertmanager if the alert does // not include EndsAt, after this time passes it can declare the alert as resolved if it has not been updated. // This has no impact on alerts from Prometheus, as they always include EndsAt. ResolveTimeout Duration `json:"resolveTimeout,omitempty"` // HTTP client configuration. HTTPConfig *HTTPConfig `json:"httpConfig,omitempty"` // The default Slack API URL. SlackAPIURL *v1.SecretKeySelector `json:"slackApiUrl,omitempty"` // The default OpsGenie API URL. OpsGenieAPIURL *v1.SecretKeySelector `json:"opsGenieApiUrl,omitempty"` // The default OpsGenie API Key. OpsGenieAPIKey *v1.SecretKeySelector `json:"opsGenieApiKey,omitempty"` // The default Pagerduty URL. PagerdutyURL *string `json:"pagerdutyUrl,omitempty"` }
AlertmanagerGlobalConfig configures parameters that are valid in all other configuration contexts. See https://prometheus.io/docs/alerting/latest/configuration/#configuration-file
func (*AlertmanagerGlobalConfig) DeepCopy ¶ added in v0.59.0
func (in *AlertmanagerGlobalConfig) DeepCopy() *AlertmanagerGlobalConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerGlobalConfig.
func (*AlertmanagerGlobalConfig) DeepCopyInto ¶ added in v0.59.0
func (in *AlertmanagerGlobalConfig) DeepCopyInto(out *AlertmanagerGlobalConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AlertmanagerList ¶
type AlertmanagerList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata // More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata,omitempty"` // List of Alertmanagers Items []Alertmanager `json:"items"` }
AlertmanagerList is a list of Alertmanagers. +k8s:openapi-gen=true
func (*AlertmanagerList) DeepCopy ¶
func (in *AlertmanagerList) DeepCopy() *AlertmanagerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerList.
func (*AlertmanagerList) DeepCopyInto ¶
func (in *AlertmanagerList) DeepCopyInto(out *AlertmanagerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AlertmanagerList) DeepCopyObject ¶
func (l *AlertmanagerList) DeepCopyObject() runtime.Object
DeepCopyObject implements the runtime.Object interface.
type AlertmanagerSpec ¶
type AlertmanagerSpec struct { // PodMetadata configures Labels and Annotations which are propagated to the alertmanager pods. PodMetadata *EmbeddedObjectMetadata `json:"podMetadata,omitempty"` // Image if specified has precedence over baseImage, tag and sha // combinations. Specifying the version is still necessary to ensure the // Prometheus Operator knows what version of Alertmanager is being // configured. Image *string `json:"image,omitempty"` // Image pull policy for the 'alertmanager', 'init-config-reloader' and 'config-reloader' containers. // See https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy for more details. // +kubebuilder:validation:Enum="";Always;Never;IfNotPresent ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy,omitempty"` // Version the cluster should be on. Version string `json:"version,omitempty"` // Tag of Alertmanager container image to be deployed. Defaults to the value of `version`. // Version is ignored if Tag is set. // Deprecated: use 'image' instead. The image tag can be specified // as part of the image URL. Tag string `json:"tag,omitempty"` // SHA of Alertmanager container image to be deployed. Defaults to the value of `version`. // Similar to a tag, but the SHA explicitly deploys an immutable container image. // Version and Tag are ignored if SHA is set. // Deprecated: use 'image' instead. The image digest can be specified // as part of the image URL. SHA string `json:"sha,omitempty"` // Base image that is used to deploy pods, without tag. // Deprecated: use 'image' instead BaseImage string `json:"baseImage,omitempty"` // An optional list of references to secrets in the same namespace // to use for pulling prometheus and alertmanager images from registries // see http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets,omitempty"` // Secrets is a list of Secrets in the same namespace as the Alertmanager // object, which shall be mounted into the Alertmanager Pods. // Each Secret is added to the StatefulSet definition as a volume named `secret-<secret-name>`. // The Secrets are mounted into `/etc/alertmanager/secrets/<secret-name>` in the 'alertmanager' container. Secrets []string `json:"secrets,omitempty"` // ConfigMaps is a list of ConfigMaps in the same namespace as the Alertmanager // object, which shall be mounted into the Alertmanager Pods. // Each ConfigMap is added to the StatefulSet definition as a volume named `configmap-<configmap-name>`. // The ConfigMaps are mounted into `/etc/alertmanager/configmaps/<configmap-name>` in the 'alertmanager' container. ConfigMaps []string `json:"configMaps,omitempty"` // ConfigSecret is the name of a Kubernetes Secret in the same namespace as the // Alertmanager object, which contains the configuration for this Alertmanager // instance. If empty, it defaults to `alertmanager-<alertmanager-name>`. // // The Alertmanager configuration should be available under the // `alertmanager.yaml` key. Additional keys from the original secret are // copied to the generated secret and mounted into the // `/etc/alertmanager/config` directory in the `alertmanager` container. // // If either the secret or the `alertmanager.yaml` key is missing, the // operator provisions a minimal Alertmanager configuration with one empty // receiver (effectively dropping alert notifications). ConfigSecret string `json:"configSecret,omitempty"` // Log level for Alertmanager to be configured with. //+kubebuilder:validation:Enum="";debug;info;warn;error LogLevel string `json:"logLevel,omitempty"` // Log format for Alertmanager to be configured with. //+kubebuilder:validation:Enum="";logfmt;json LogFormat string `json:"logFormat,omitempty"` // Size is the expected size of the alertmanager cluster. The controller will // eventually make the size of the running cluster equal to the expected // size. Replicas *int32 `json:"replicas,omitempty"` // Time duration Alertmanager shall retain data for. Default is '120h', // and must match the regular expression `[0-9]+(ms|s|m|h)` (milliseconds seconds minutes hours). // +kubebuilder:default:="120h" Retention GoDuration `json:"retention,omitempty"` // Storage is the definition of how storage will be used by the Alertmanager // instances. Storage *StorageSpec `json:"storage,omitempty"` // Volumes allows configuration of additional volumes on the output StatefulSet definition. // Volumes specified will be appended to other volumes that are generated as a result of // StorageSpec objects. Volumes []v1.Volume `json:"volumes,omitempty"` // VolumeMounts allows configuration of additional VolumeMounts on the output StatefulSet definition. // VolumeMounts specified will be appended to other VolumeMounts in the alertmanager container, // that are generated as a result of StorageSpec objects. VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"` // The external URL the Alertmanager instances will be available under. This is // necessary to generate correct URLs. This is necessary if Alertmanager is not // served from root of a DNS name. ExternalURL string `json:"externalUrl,omitempty"` // The route prefix Alertmanager registers HTTP handlers for. This is useful, // if using ExternalURL and a proxy is rewriting HTTP routes of a request, // and the actual ExternalURL is still true, but the server serves requests // under a different route prefix. For example for use with `kubectl proxy`. RoutePrefix string `json:"routePrefix,omitempty"` // If set to true all actions on the underlying managed objects are not // goint to be performed, except for delete actions. Paused bool `json:"paused,omitempty"` // Define which Nodes the Pods are scheduled on. NodeSelector map[string]string `json:"nodeSelector,omitempty"` // Define resources requests and limits for single Pods. Resources v1.ResourceRequirements `json:"resources,omitempty"` // If specified, the pod's scheduling constraints. Affinity *v1.Affinity `json:"affinity,omitempty"` // If specified, the pod's tolerations. Tolerations []v1.Toleration `json:"tolerations,omitempty"` // If specified, the pod's topology spread constraints. TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` // SecurityContext holds pod-level security attributes and common container settings. // This defaults to the default PodSecurityContext. SecurityContext *v1.PodSecurityContext `json:"securityContext,omitempty"` // ServiceAccountName is the name of the ServiceAccount to use to run the // Prometheus Pods. ServiceAccountName string `json:"serviceAccountName,omitempty"` // ListenLocal makes the Alertmanager server listen on loopback, so that it // does not bind against the Pod IP. Note this is only for the Alertmanager // UI, not the gossip communication. ListenLocal bool `json:"listenLocal,omitempty"` // Containers allows injecting additional containers. This is meant to // allow adding an authentication proxy to an Alertmanager pod. // Containers described here modify an operator generated container if they // share the same name and modifications are done via a strategic merge // patch. The current container names are: `alertmanager` and // `config-reloader`. Overriding containers is entirely outside the scope // of what the maintainers will support and by doing so, you accept that // this behaviour may break at any time without notice. Containers []v1.Container `json:"containers,omitempty"` // InitContainers allows adding initContainers to the pod definition. Those can be used to e.g. // fetch secrets for injection into the Alertmanager configuration from external sources. Any // errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ // InitContainers described here modify an operator // generated init containers if they share the same name and modifications are // done via a strategic merge patch. The current init container name is: // `init-config-reloader`. Overriding init containers is entirely outside the // scope of what the maintainers will support and by doing so, you accept that // this behaviour may break at any time without notice. InitContainers []v1.Container `json:"initContainers,omitempty"` // Priority class assigned to the Pods PriorityClassName string `json:"priorityClassName,omitempty"` // AdditionalPeers allows injecting a set of additional Alertmanagers to peer with to form a highly available cluster. AdditionalPeers []string `json:"additionalPeers,omitempty"` // ClusterAdvertiseAddress is the explicit address to advertise in cluster. // Needs to be provided for non RFC1918 [1] (public) addresses. // [1] RFC1918: https://tools.ietf.org/html/rfc1918 ClusterAdvertiseAddress string `json:"clusterAdvertiseAddress,omitempty"` // Interval between gossip attempts. ClusterGossipInterval GoDuration `json:"clusterGossipInterval,omitempty"` // Interval between pushpull attempts. ClusterPushpullInterval GoDuration `json:"clusterPushpullInterval,omitempty"` // Timeout for cluster peering. ClusterPeerTimeout GoDuration `json:"clusterPeerTimeout,omitempty"` // Port name used for the pods and governing service. // Defaults to `web`. // +kubebuilder:default:="web" PortName string `json:"portName,omitempty"` // ForceEnableClusterMode ensures Alertmanager does not deactivate the cluster mode when running with a single replica. // Use case is e.g. spanning an Alertmanager cluster across Kubernetes clusters with a single replica in each. ForceEnableClusterMode bool `json:"forceEnableClusterMode,omitempty"` // AlertmanagerConfigs to be selected for to merge and configure Alertmanager with. AlertmanagerConfigSelector *metav1.LabelSelector `json:"alertmanagerConfigSelector,omitempty"` // The AlertmanagerConfigMatcherStrategy defines how AlertmanagerConfig objects match the alerts. // In the future more options may be added. AlertmanagerConfigMatcherStrategy AlertmanagerConfigMatcherStrategy `json:"alertmanagerConfigMatcherStrategy,omitempty"` // Namespaces to be selected for AlertmanagerConfig discovery. If nil, only // check own namespace. AlertmanagerConfigNamespaceSelector *metav1.LabelSelector `json:"alertmanagerConfigNamespaceSelector,omitempty"` // Minimum number of seconds for which a newly created pod should be ready // without any of its container crashing for it to be considered available. // Defaults to 0 (pod will be considered available as soon as it is ready) // This is an alpha field from kubernetes 1.22 until 1.24 which requires enabling the StatefulSetMinReadySeconds feature gate. // +optional MinReadySeconds *uint32 `json:"minReadySeconds,omitempty"` // Pods' hostAliases configuration // +listType=map // +listMapKey=ip HostAliases []HostAlias `json:"hostAliases,omitempty"` // Defines the web command line flags when starting Alertmanager. Web *AlertmanagerWebSpec `json:"web,omitempty"` // EXPERIMENTAL: alertmanagerConfiguration specifies the configuration of Alertmanager. // If defined, it takes precedence over the `configSecret` field. // This field may change in future releases. AlertmanagerConfiguration *AlertmanagerConfiguration `json:"alertmanagerConfiguration,omitempty"` // AutomountServiceAccountToken indicates whether a service account token should be automatically mounted in the pod. // If the service account has `automountServiceAccountToken: true`, set the field to `false` to opt out of automounting API credentials. // +optional AutomountServiceAccountToken *bool `json:"automountServiceAccountToken,omitempty"` }
AlertmanagerSpec is a specification of the desired behavior of the Alertmanager cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status +k8s:openapi-gen=true
func (*AlertmanagerSpec) DeepCopy ¶
func (in *AlertmanagerSpec) DeepCopy() *AlertmanagerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerSpec.
func (*AlertmanagerSpec) DeepCopyInto ¶
func (in *AlertmanagerSpec) DeepCopyInto(out *AlertmanagerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AlertmanagerStatus ¶
type AlertmanagerStatus struct { // Represents whether any actions on the underlying managed objects are // being performed. Only delete actions will be performed. Paused bool `json:"paused"` // Total number of non-terminated pods targeted by this Alertmanager // object (their labels match the selector). Replicas int32 `json:"replicas"` // Total number of non-terminated pods targeted by this Alertmanager // object that have the desired version spec. UpdatedReplicas int32 `json:"updatedReplicas"` // Total number of available pods (ready for at least minReadySeconds) // targeted by this Alertmanager cluster. AvailableReplicas int32 `json:"availableReplicas"` UnavailableReplicas int32 `json:"unavailableReplicas"` // The current state of the Alertmanager object. // +listType=map // +listMapKey=type // +optional Conditions []Condition `json:"conditions,omitempty"` }
AlertmanagerStatus is the most recent observed status of the Alertmanager cluster. Read-only. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status +k8s:openapi-gen=true
func (*AlertmanagerStatus) DeepCopy ¶
func (in *AlertmanagerStatus) DeepCopy() *AlertmanagerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerStatus.
func (*AlertmanagerStatus) DeepCopyInto ¶
func (in *AlertmanagerStatus) DeepCopyInto(out *AlertmanagerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AlertmanagerWebSpec ¶ added in v0.58.0
type AlertmanagerWebSpec struct { WebConfigFileFields `json:",inline"` // Maximum number of GET requests processed concurrently. This corresponds to the // Alertmanager's `--web.get-concurrency` flag. // +optional GetConcurrency *uint32 `json:"getConcurrency,omitempty"` // Timeout for HTTP requests. This corresponds to the Alertmanager's // `--web.timeout` flag. // +optional Timeout *uint32 `json:"timeout,omitempty"` }
AlertmanagerWebSpec defines the web command line flags when starting Alertmanager. +k8s:openapi-gen=true
func (*AlertmanagerWebSpec) DeepCopy ¶ added in v0.58.0
func (in *AlertmanagerWebSpec) DeepCopy() *AlertmanagerWebSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerWebSpec.
func (*AlertmanagerWebSpec) DeepCopyInto ¶ added in v0.58.0
func (in *AlertmanagerWebSpec) DeepCopyInto(out *AlertmanagerWebSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ArbitraryFSAccessThroughSMsConfig ¶
type ArbitraryFSAccessThroughSMsConfig struct {
Deny bool `json:"deny,omitempty"`
}
ArbitraryFSAccessThroughSMsConfig enables users to configure, whether a service monitor selected by the Prometheus instance is allowed to use arbitrary files on the file system of the Prometheus container. This is the case when e.g. a service monitor specifies a BearerTokenFile in an endpoint. A malicious user could create a service monitor selecting arbitrary secret files in the Prometheus container. Those secrets would then be sent with a scrape request by Prometheus to a malicious target. Denying the above would prevent the attack, users can instead use the BearerTokenSecret field.
func (*ArbitraryFSAccessThroughSMsConfig) DeepCopy ¶
func (in *ArbitraryFSAccessThroughSMsConfig) DeepCopy() *ArbitraryFSAccessThroughSMsConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArbitraryFSAccessThroughSMsConfig.
func (*ArbitraryFSAccessThroughSMsConfig) DeepCopyInto ¶
func (in *ArbitraryFSAccessThroughSMsConfig) DeepCopyInto(out *ArbitraryFSAccessThroughSMsConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Argument ¶ added in v0.59.0
type Argument struct { // Name of the argument, e.g. "scrape.discovery-reload-interval". // +kubebuilder:validation:MinLength=1 Name string `json:"name"` // Argument value, e.g. 30s. Can be empty for name-only arguments (e.g. --storage.tsdb.no-lockfile) Value string `json:"value,omitempty"` }
Argument as part of the AdditionalArgs list. +k8s:openapi-gen=true
func (*Argument) DeepCopy ¶ added in v0.59.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Argument.
func (*Argument) DeepCopyInto ¶ added in v0.59.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type AttachMetadata ¶ added in v0.57.0
type AttachMetadata struct { // When set to true, Prometheus must have permissions to get Nodes. Node bool `json:"node,omitempty"` }
func (*AttachMetadata) DeepCopy ¶ added in v0.57.0
func (in *AttachMetadata) DeepCopy() *AttachMetadata
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AttachMetadata.
func (*AttachMetadata) DeepCopyInto ¶ added in v0.57.0
func (in *AttachMetadata) DeepCopyInto(out *AttachMetadata)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Authorization ¶ added in v0.50.0
type Authorization struct { SafeAuthorization `json:",inline"` // File to read a secret from, mutually exclusive with `credentials`. CredentialsFile string `json:"credentialsFile,omitempty"` }
func (*Authorization) DeepCopy ¶ added in v0.50.0
func (in *Authorization) DeepCopy() *Authorization
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Authorization.
func (*Authorization) DeepCopyInto ¶ added in v0.50.0
func (in *Authorization) DeepCopyInto(out *Authorization)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Authorization) Validate ¶ added in v0.50.0
func (c *Authorization) Validate() error
Validate semantically validates the given Authorization section.
type AuthorizationValidationError ¶ added in v0.50.0
type AuthorizationValidationError struct {
// contains filtered or unexported fields
}
AuthorizationValidationError is returned by Authorization.Validate() on semantically invalid configurations. +k8s:openapi-gen=false
func (*AuthorizationValidationError) DeepCopy ¶ added in v0.50.0
func (in *AuthorizationValidationError) DeepCopy() *AuthorizationValidationError
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AuthorizationValidationError.
func (*AuthorizationValidationError) DeepCopyInto ¶ added in v0.50.0
func (in *AuthorizationValidationError) DeepCopyInto(out *AuthorizationValidationError)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*AuthorizationValidationError) Error ¶ added in v0.50.0
func (e *AuthorizationValidationError) Error() string
type BasicAuth ¶
type BasicAuth struct { // The secret in the service monitor namespace that contains the username // for authentication. Username v1.SecretKeySelector `json:"username,omitempty"` // The secret in the service monitor namespace that contains the password // for authentication. Password v1.SecretKeySelector `json:"password,omitempty"` }
BasicAuth allow an endpoint to authenticate over basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints +k8s:openapi-gen=true
func (*BasicAuth) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicAuth.
func (*BasicAuth) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ByteSize ¶ added in v0.56.0
type ByteSize string
ByteSize is a valid memory size type based on powers-of-2, so 1KB is 1024B. Supported units: B, KB, KiB, MB, MiB, GB, GiB, TB, TiB, PB, PiB, EB, EiB Ex: `512MB`. +kubebuilder:validation:Pattern:="(^0|([0-9]*[.])?[0-9]+((K|M|G|T|E|P)i?)?B)$"
type CommonPrometheusFields ¶ added in v0.55.0
type CommonPrometheusFields struct { // PodMetadata configures labels and annotations which are propagated to the Prometheus pods. PodMetadata *EmbeddedObjectMetadata `json:"podMetadata,omitempty"` // ServiceMonitors to be selected for target discovery. An empty label // selector matches all objects. A null label selector matches no objects. // // If `spec.serviceMonitorSelector`, `spec.podMonitorSelector`, `spec.probeSelector` // and `spec.scrapeConfigSelector` are null, the Prometheus configuration is unmanaged. // The Prometheus operator will ensure that the Prometheus configuration's // Secret exists, but it is the responsibility of the user to provide the raw // gzipped Prometheus configuration under the `prometheus.yaml.gz` key. // This behavior is *deprecated* and will be removed in the next major version // of the custom resource definition. It is recommended to use // `spec.additionalScrapeConfigs` instead. ServiceMonitorSelector *metav1.LabelSelector `json:"serviceMonitorSelector,omitempty"` // Namespaces to match for ServicedMonitors discovery. An empty label selector // matches all namespaces. A null label selector matches the current // namespace only. ServiceMonitorNamespaceSelector *metav1.LabelSelector `json:"serviceMonitorNamespaceSelector,omitempty"` // *Experimental* PodMonitors to be selected for target discovery. An empty // label selector matches all objects. A null label selector matches no // objects. // // If `spec.serviceMonitorSelector`, `spec.podMonitorSelector`, `spec.probeSelector` // and `spec.scrapeConfigSelector` are null, the Prometheus configuration is unmanaged. // The Prometheus operator will ensure that the Prometheus configuration's // Secret exists, but it is the responsibility of the user to provide the raw // gzipped Prometheus configuration under the `prometheus.yaml.gz` key. // This behavior is *deprecated* and will be removed in the next major version // of the custom resource definition. It is recommended to use // `spec.additionalScrapeConfigs` instead. PodMonitorSelector *metav1.LabelSelector `json:"podMonitorSelector,omitempty"` // Namespaces to match for PodMonitors discovery. An empty label selector // matches all namespaces. A null label selector matches the current // namespace only. PodMonitorNamespaceSelector *metav1.LabelSelector `json:"podMonitorNamespaceSelector,omitempty"` // *Experimental* Probes to be selected for target discovery. An empty // label selector matches all objects. A null label selector matches no // objects. // // If `spec.serviceMonitorSelector`, `spec.podMonitorSelector`, `spec.probeSelector` // and `spec.scrapeConfigSelector` are null, the Prometheus configuration is unmanaged. // The Prometheus operator will ensure that the Prometheus configuration's // Secret exists, but it is the responsibility of the user to provide the raw // gzipped Prometheus configuration under the `prometheus.yaml.gz` key. // This behavior is *deprecated* and will be removed in the next major version // of the custom resource definition. It is recommended to use // `spec.additionalScrapeConfigs` instead. ProbeSelector *metav1.LabelSelector `json:"probeSelector,omitempty"` // *Experimental* Namespaces to match for Probe discovery. An empty label // selector matches all namespaces. A null label selector matches the // current namespace only. ProbeNamespaceSelector *metav1.LabelSelector `json:"probeNamespaceSelector,omitempty"` // *Experimental* ScrapeConfigs to be selected for target discovery. An // empty label selector matches all objects. A null label selector matches // no objects. // // If `spec.serviceMonitorSelector`, `spec.podMonitorSelector`, `spec.probeSelector` // and `spec.scrapeConfigSelector` are null, the Prometheus configuration is unmanaged. // The Prometheus operator will ensure that the Prometheus configuration's // Secret exists, but it is the responsibility of the user to provide the raw // gzipped Prometheus configuration under the `prometheus.yaml.gz` key. // This behavior is *deprecated* and will be removed in the next major version // of the custom resource definition. It is recommended to use // `spec.additionalScrapeConfigs` instead. ScrapeConfigSelector *metav1.LabelSelector `json:"scrapeConfigSelector,omitempty"` // Namespaces to match for ScrapeConfig discovery. An empty label selector // matches all namespaces. A null label selector matches the current // current namespace only. ScrapeConfigNamespaceSelector *metav1.LabelSelector `json:"scrapeConfigNamespaceSelector,omitempty"` // Version of Prometheus being deployed. The operator uses this information // to generate the Prometheus StatefulSet + configuration files. // // If not specified, the operator assumes the latest upstream version of // Prometheus available at the time when the version of the operator was // released. Version string `json:"version,omitempty"` // When a Prometheus deployment is paused, no actions except for deletion // will be performed on the underlying objects. Paused bool `json:"paused,omitempty"` // Container image name for Prometheus. If specified, it takes precedence // over the `spec.baseImage`, `spec.tag` and `spec.sha` fields. // // Specifying `spec.version` is still necessary to ensure the Prometheus // Operator knows which version of Prometheus is being configured. // // If neither `spec.image` nor `spec.baseImage` are defined, the operator // will use the latest upstream version of Prometheus available at the time // when the operator was released. // // +optional Image *string `json:"image,omitempty"` // Image pull policy for the 'prometheus', 'init-config-reloader' and 'config-reloader' containers. // See https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy for more details. // +kubebuilder:validation:Enum="";Always;Never;IfNotPresent ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy,omitempty"` // An optional list of references to Secrets in the same namespace // to use for pulling images from registries. // See http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets,omitempty"` // Number of replicas of each shard to deploy for a Prometheus deployment. // `spec.replicas` multiplied by `spec.shards` is the total number of Pods // created. // // Default: 1 // +optional Replicas *int32 `json:"replicas,omitempty"` // EXPERIMENTAL: Number of shards to distribute targets onto. `spec.replicas` // multiplied by `spec.shards` is the total number of Pods created. // // Note that scaling down shards will not reshard data onto remaining // instances, it must be manually moved. Increasing shards will not reshard // data either but it will continue to be available from the same // instances. To query globally, use Thanos sidecar and Thanos querier or // remote write data to a central location. // // Sharding is performed on the content of the `__address__` target meta-label // for PodMonitors and ServiceMonitors and `__param_target__` for Probes. // // Default: 1 // +optional Shards *int32 `json:"shards,omitempty"` // Name of Prometheus external label used to denote the replica name. // The external label will _not_ be added when the field is set to the // empty string (`""`). // // Default: "prometheus_replica" // +optional ReplicaExternalLabelName *string `json:"replicaExternalLabelName,omitempty"` // Name of Prometheus external label used to denote the Prometheus instance // name. The external label will _not_ be added when the field is set to // the empty string (`""`). // // Default: "prometheus" // +optional PrometheusExternalLabelName *string `json:"prometheusExternalLabelName,omitempty"` // Log level for Prometheus and the config-reloader sidecar. //+kubebuilder:validation:Enum="";debug;info;warn;error LogLevel string `json:"logLevel,omitempty"` // Log format for Log level for Prometheus and the config-reloader sidecar. //+kubebuilder:validation:Enum="";logfmt;json LogFormat string `json:"logFormat,omitempty"` // Interval between consecutive scrapes. // // Default: "30s" // +kubebuilder:default:="30s" ScrapeInterval Duration `json:"scrapeInterval,omitempty"` // Number of seconds to wait until a scrape request times out. ScrapeTimeout Duration `json:"scrapeTimeout,omitempty"` // The labels to add to any time series or alerts when communicating with // external systems (federation, remote storage, Alertmanager). // Labels defined by `spec.replicaExternalLabelName` and // `spec.prometheusExternalLabelName` take precedence over this list. ExternalLabels map[string]string `json:"externalLabels,omitempty"` // Enable Prometheus to be used as a receiver for the Prometheus remote // write protocol. // // WARNING: This is not considered an efficient way of ingesting samples. // Use it with caution for specific low-volume use cases. // It is not suitable for replacing the ingestion via scraping and turning // Prometheus into a push-based metrics collection system. // For more information see https://prometheus.io/docs/prometheus/latest/querying/api/#remote-write-receiver // // It requires Prometheus >= v2.33.0. EnableRemoteWriteReceiver bool `json:"enableRemoteWriteReceiver,omitempty"` // Enable access to Prometheus feature flags. By default, no features are enabled. // // Enabling features which are disabled by default is entirely outside the // scope of what the maintainers will support and by doing so, you accept // that this behaviour may break at any time without notice. // // For more information see https://prometheus.io/docs/prometheus/latest/feature_flags/ EnableFeatures []string `json:"enableFeatures,omitempty"` // The external URL under which the Prometheus service is externally // available. This is necessary to generate correct URLs (for instance if // Prometheus is accessible behind an Ingress resource). ExternalURL string `json:"externalUrl,omitempty"` // The route prefix Prometheus registers HTTP handlers for. // // This is useful when using `spec.externalURL`, and a proxy is rewriting // HTTP routes of a request, and the actual ExternalURL is still true, but // the server serves requests under a different route prefix. For example // for use with `kubectl proxy`. RoutePrefix string `json:"routePrefix,omitempty"` // Storage defines the storage used by Prometheus. Storage *StorageSpec `json:"storage,omitempty"` // Volumes allows the configuration of additional volumes on the output // StatefulSet definition. Volumes specified will be appended to other // volumes that are generated as a result of StorageSpec objects. Volumes []v1.Volume `json:"volumes,omitempty"` // VolumeMounts allows the configuration of additional VolumeMounts. // // VolumeMounts will be appended to other VolumeMounts in the 'prometheus' // container, that are generated as a result of StorageSpec objects. VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"` // Defines the configuration of the Prometheus web server. Web *PrometheusWebSpec `json:"web,omitempty"` // Defines the resources requests and limits of the 'prometheus' container. Resources v1.ResourceRequirements `json:"resources,omitempty"` // Defines on which Nodes the Pods are scheduled. NodeSelector map[string]string `json:"nodeSelector,omitempty"` // ServiceAccountName is the name of the ServiceAccount to use to run the // Prometheus Pods. ServiceAccountName string `json:"serviceAccountName,omitempty"` // Secrets is a list of Secrets in the same namespace as the Prometheus // object, which shall be mounted into the Prometheus Pods. // Each Secret is added to the StatefulSet definition as a volume named `secret-<secret-name>`. // The Secrets are mounted into /etc/prometheus/secrets/<secret-name> in the 'prometheus' container. Secrets []string `json:"secrets,omitempty"` // ConfigMaps is a list of ConfigMaps in the same namespace as the Prometheus // object, which shall be mounted into the Prometheus Pods. // Each ConfigMap is added to the StatefulSet definition as a volume named `configmap-<configmap-name>`. // The ConfigMaps are mounted into /etc/prometheus/configmaps/<configmap-name> in the 'prometheus' container. ConfigMaps []string `json:"configMaps,omitempty"` // Defines the Pods' affinity scheduling rules if specified. // +optional Affinity *v1.Affinity `json:"affinity,omitempty"` // Defines the Pods' tolerations if specified. // +optional Tolerations []v1.Toleration `json:"tolerations,omitempty"` // Defines the pod's topology spread constraints if specified. //+optional TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` // Defines the list of remote write configurations. // +optional RemoteWrite []RemoteWriteSpec `json:"remoteWrite,omitempty"` // SecurityContext holds pod-level security attributes and common container settings. // This defaults to the default PodSecurityContext. // +optional SecurityContext *v1.PodSecurityContext `json:"securityContext,omitempty"` // When true, the Prometheus server listens on the loopback address // instead of the Pod IP's address. ListenLocal bool `json:"listenLocal,omitempty"` // Containers allows injecting additional containers or modifying operator // generated containers. This can be used to allow adding an authentication // proxy to the Pods or to change the behavior of an operator generated // container. Containers described here modify an operator generated // container if they share the same name and modifications are done via a // strategic merge patch. // // The names of containers managed by the operator are: // * `prometheus` // * `config-reloader` // * `thanos-sidecar` // // Overriding containers is entirely outside the scope of what the // maintainers will support and by doing so, you accept that this behaviour // may break at any time without notice. // +optional Containers []v1.Container `json:"containers,omitempty"` // InitContainers allows injecting initContainers to the Pod definition. Those // can be used to e.g. fetch secrets for injection into the Prometheus // configuration from external sources. Any errors during the execution of // an initContainer will lead to a restart of the Pod. More info: // https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ // InitContainers described here modify an operator generated init // containers if they share the same name and modifications are done via a // strategic merge patch. // // The names of init container name managed by the operator are: // * `init-config-reloader`. // // Overriding init containers is entirely outside the scope of what the // maintainers will support and by doing so, you accept that this behaviour // may break at any time without notice. // +optional InitContainers []v1.Container `json:"initContainers,omitempty"` // AdditionalScrapeConfigs allows specifying a key of a Secret containing // additional Prometheus scrape configurations. Scrape configurations // specified are appended to the configurations generated by the Prometheus // Operator. Job configurations specified must have the form as specified // in the official Prometheus documentation: // https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config. // As scrape configs are appended, the user is responsible to make sure it // is valid. Note that using this feature may expose the possibility to // break upgrades of Prometheus. It is advised to review Prometheus release // notes to ensure that no incompatible scrape configs are going to break // Prometheus after the upgrade. // +optional AdditionalScrapeConfigs *v1.SecretKeySelector `json:"additionalScrapeConfigs,omitempty"` // APIServerConfig allows specifying a host and auth methods to access the // Kuberntees API server. // If null, Prometheus is assumed to run inside of the cluster: it will // discover the API servers automatically and use the Pod's CA certificate // and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount/. // +optional APIServerConfig *APIServerConfig `json:"apiserverConfig,omitempty"` // Priority class assigned to the Pods. PriorityClassName string `json:"priorityClassName,omitempty"` // Port name used for the pods and governing service. // Default: "web" // +kubebuilder:default:="web" PortName string `json:"portName,omitempty"` // When true, ServiceMonitor, PodMonitor and Probe object are forbidden to // reference arbitrary files on the file system of the 'prometheus' // container. // When a ServiceMonitor's endpoint specifies a `bearerTokenFile` value // (e.g. '/var/run/secrets/kubernetes.io/serviceaccount/token'), a // malicious target can get access to the Prometheus service account's // token in the Prometheus' scrape request. Setting // `spec.arbitraryFSAccessThroughSM` to 'true' would prevent the attack. // Users should instead provide the credentials using the // `spec.bearerTokenSecret` field. ArbitraryFSAccessThroughSMs ArbitraryFSAccessThroughSMsConfig `json:"arbitraryFSAccessThroughSMs,omitempty"` // When true, Prometheus resolves label conflicts by renaming the labels in // the scraped data to "exported_<label value>" for all targets created // from service and pod monitors. // Otherwise the HonorLabels field of the service or pod monitor applies. OverrideHonorLabels bool `json:"overrideHonorLabels,omitempty"` // When true, Prometheus ignores the timestamps for all the targets created // from service and pod monitors. // Otherwise the HonorTimestamps field of the service or pod monitor applies. OverrideHonorTimestamps bool `json:"overrideHonorTimestamps,omitempty"` // When true, `spec.namespaceSelector` from all PodMonitor, ServiceMonitor // and Probe objects will be ignored. They will only discover targets // within the namespace of the PodMonitor, ServiceMonitor and Probe // objec. IgnoreNamespaceSelectors bool `json:"ignoreNamespaceSelectors,omitempty"` // When not empty, a label will be added to // // 1. All metrics scraped from `ServiceMonitor`, `PodMonitor`, `Probe` and `ScrapeConfig` objects. // 2. All metrics generated from recording rules defined in `PrometheusRule` objects. // 3. All alerts generated from alerting rules defined in `PrometheusRule` objects. // 4. All vector selectors of PromQL expressions defined in `PrometheusRule` objects. // // The label will not added for objects referenced in `spec.excludedFromEnforcement`. // // The label's name is this field's value. // The label's value is the namespace of the `ServiceMonitor`, // `PodMonitor`, `Probe` or `PrometheusRule` object. EnforcedNamespaceLabel string `json:"enforcedNamespaceLabel,omitempty"` // When defined, enforcedSampleLimit specifies a global limit on the number // of scraped samples that will be accepted. This overrides any // `spec.sampleLimit` set by ServiceMonitor, PodMonitor, Probe objects // unless `spec.sampleLimit` is greater than zero and less than than // `spec.enforcedSampleLimit`. // // It is meant to be used by admins to keep the overall number of // samples/series under a desired limit. // // +optional EnforcedSampleLimit *uint64 `json:"enforcedSampleLimit,omitempty"` // When defined, enforcedTargetLimit specifies a global limit on the number // of scraped targets. The value overrides any `spec.targetLimit` set by // ServiceMonitor, PodMonitor, Probe objects unless `spec.targetLimit` is // greater than zero and less than `spec.enforcedTargetLimit`. // // It is meant to be used by admins to to keep the overall number of // targets under a desired limit. // // +optional EnforcedTargetLimit *uint64 `json:"enforcedTargetLimit,omitempty"` // When defined, enforcedLabelLimit specifies a global limit on the number // of labels per sample. The value overrides any `spec.labelLimit` set by // ServiceMonitor, PodMonitor, Probe objects unless `spec.labelLimit` is // greater than zero and less than `spec.enforcedLabelLimit`. // // It requires Prometheus >= v2.27.0. // // +optional EnforcedLabelLimit *uint64 `json:"enforcedLabelLimit,omitempty"` // When defined, enforcedLabelNameLengthLimit specifies a global limit on the length // of labels name per sample. The value overrides any `spec.labelNameLengthLimit` set by // ServiceMonitor, PodMonitor, Probe objects unless `spec.labelNameLengthLimit` is // greater than zero and less than `spec.enforcedLabelNameLengthLimit`. // // It requires Prometheus >= v2.27.0. // // +optional EnforcedLabelNameLengthLimit *uint64 `json:"enforcedLabelNameLengthLimit,omitempty"` // When not null, enforcedLabelValueLengthLimit defines a global limit on the length // of labels value per sample. The value overrides any `spec.labelValueLengthLimit` set by // ServiceMonitor, PodMonitor, Probe objects unless `spec.labelValueLengthLimit` is // greater than zero and less than `spec.enforcedLabelValueLengthLimit`. // // It requires Prometheus >= v2.27.0. // // +optional EnforcedLabelValueLengthLimit *uint64 `json:"enforcedLabelValueLengthLimit,omitempty"` // When defined, enforcedKeepDroppedTargets specifies a global limit on the number of targets // dropped by relabeling that will be kept in memory. The value overrides // any `spec.keepDroppedTargets` set by // ServiceMonitor, PodMonitor, Probe objects unless `spec.keepDroppedTargets` is // greater than zero and less than `spec.enforcedKeepDroppedTargets`. // // It requires Prometheus >= v2.47.0. // // +optional EnforcedKeepDroppedTargets *uint64 `json:"enforcedKeepDroppedTargets,omitempty"` // When defined, enforcedBodySizeLimit specifies a global limit on the size // of uncompressed response body that will be accepted by Prometheus. // Targets responding with a body larger than this many bytes will cause // the scrape to fail. // // It requires Prometheus >= v2.28.0. EnforcedBodySizeLimit ByteSize `json:"enforcedBodySizeLimit,omitempty"` // Minimum number of seconds for which a newly created Pod should be ready // without any of its container crashing for it to be considered available. // Defaults to 0 (pod will be considered available as soon as it is ready) // // This is an alpha field from kubernetes 1.22 until 1.24 which requires // enabling the StatefulSetMinReadySeconds feature gate. // // +optional MinReadySeconds *uint32 `json:"minReadySeconds,omitempty"` // Optional list of hosts and IPs that will be injected into the Pod's // hosts file if specified. // // +listType=map // +listMapKey=ip // +optional HostAliases []HostAlias `json:"hostAliases,omitempty"` // AdditionalArgs allows setting additional arguments for the 'prometheus' container. // // It is intended for e.g. activating hidden flags which are not supported by // the dedicated configuration options yet. The arguments are passed as-is to the // Prometheus container which may cause issues if they are invalid or not supported // by the given Prometheus version. // // In case of an argument conflict (e.g. an argument which is already set by the // operator itself) or when providing an invalid argument, the reconciliation will // fail and an error will be logged. // // +optional AdditionalArgs []Argument `json:"additionalArgs,omitempty"` // Configures compression of the write-ahead log (WAL) using Snappy. // // WAL compression is enabled by default for Prometheus >= 2.20.0 // // Requires Prometheus v2.11.0 and above. // // +optional WALCompression *bool `json:"walCompression,omitempty"` // List of references to PodMonitor, ServiceMonitor, Probe and PrometheusRule objects // to be excluded from enforcing a namespace label of origin. // // It is only applicable if `spec.enforcedNamespaceLabel` set to true. // // +optional ExcludedFromEnforcement []ObjectReference `json:"excludedFromEnforcement,omitempty"` // Use the host's network namespace if true. // // Make sure to understand the security implications if you want to enable // it (https://kubernetes.io/docs/concepts/configuration/overview/). // // When hostNetwork is enabled, this will set the DNS policy to // `ClusterFirstWithHostNet` automatically. HostNetwork bool `json:"hostNetwork,omitempty"` // PodTargetLabels are appended to the `spec.podTargetLabels` field of all // PodMonitor and ServiceMonitor objects. // // +optional PodTargetLabels []string `json:"podTargetLabels,omitempty"` // EXPERIMENTAL: TracingConfig configures tracing in Prometheus. This is an // experimental feature, it may change in any upcoming release in a // breaking way. // // +optional TracingConfig *PrometheusTracingConfig `json:"tracingConfig,omitempty"` // BodySizeLimit defines per-scrape on response body size. // Only valid in Prometheus versions 2.45.0 and newer. // // +optional BodySizeLimit *ByteSize `json:"bodySizeLimit,omitempty"` // SampleLimit defines per-scrape limit on number of scraped samples that will be accepted. // Only valid in Prometheus versions 2.45.0 and newer. // // +optional SampleLimit *uint64 `json:"sampleLimit,omitempty"` // TargetLimit defines a limit on the number of scraped targets that will be accepted. // Only valid in Prometheus versions 2.45.0 and newer. // // +optional TargetLimit *uint64 `json:"targetLimit,omitempty"` // Per-scrape limit on number of labels that will be accepted for a sample. // Only valid in Prometheus versions 2.45.0 and newer. // // +optional LabelLimit *uint64 `json:"labelLimit,omitempty"` // Per-scrape limit on length of labels name that will be accepted for a sample. // Only valid in Prometheus versions 2.45.0 and newer. // // +optional LabelNameLengthLimit *uint64 `json:"labelNameLengthLimit,omitempty"` // Per-scrape limit on length of labels value that will be accepted for a sample. // Only valid in Prometheus versions 2.45.0 and newer. // // +optional LabelValueLengthLimit *uint64 `json:"labelValueLengthLimit,omitempty"` // Per-scrape limit on the number of targets dropped by relabeling // that will be kept in memory. 0 means no limit. // // It requires Prometheus >= v2.47.0. // // +optional KeepDroppedTargets *uint64 `json:"keepDroppedTargets,omitempty"` }
CommonPrometheusFields are the options available to both the Prometheus server and agent. +k8s:deepcopy-gen=true
func (*CommonPrometheusFields) DeepCopy ¶ added in v0.55.0
func (in *CommonPrometheusFields) DeepCopy() *CommonPrometheusFields
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommonPrometheusFields.
func (*CommonPrometheusFields) DeepCopyInto ¶ added in v0.55.0
func (in *CommonPrometheusFields) DeepCopyInto(out *CommonPrometheusFields)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Condition ¶ added in v0.63.0
type Condition struct { // Type of the condition being reported. // +required Type ConditionType `json:"type"` // Status of the condition. // +required Status ConditionStatus `json:"status"` // lastTransitionTime is the time of the last update to the current status property. // +required LastTransitionTime metav1.Time `json:"lastTransitionTime"` // Reason for the condition's last transition. // +optional Reason string `json:"reason,omitempty"` // Human-readable message indicating details for the condition's last transition. // +optional Message string `json:"message,omitempty"` // ObservedGeneration represents the .metadata.generation that the // condition was set based upon. For instance, if `.metadata.generation` is // currently 12, but the `.status.conditions[].observedGeneration` is 9, the // condition is out of date with respect to the current state of the // instance. ObservedGeneration int64 `json:"observedGeneration,omitempty"` }
Condition represents the state of the resources associated with the Prometheus, Alertmanager or ThanosRuler resource. +k8s:deepcopy-gen=true
func (*Condition) DeepCopy ¶ added in v0.63.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶ added in v0.63.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConditionStatus ¶ added in v0.63.0
type ConditionStatus string
const ( ConditionTrue ConditionStatus = "True" ConditionDegraded ConditionStatus = "Degraded" ConditionFalse ConditionStatus = "False" ConditionUnknown ConditionStatus = "Unknown" )
type ConditionType ¶ added in v0.63.0
type ConditionType string
const ( // Available indicates whether enough pods are ready to provide the // service. // The possible status values for this condition type are: // - True: all pods are running and ready, the service is fully available. // - Degraded: some pods aren't ready, the service is partially available. // - False: no pods are running, the service is totally unavailable. // - Unknown: the operator couldn't determine the condition status. Available ConditionType = "Available" // Reconciled indicates whether the operator has reconciled the state of // the underlying resources with the object's spec. // The possible status values for this condition type are: // - True: the reconciliation was successful. // - False: the reconciliation failed. // - Unknown: the operator couldn't determine the condition status. Reconciled ConditionType = "Reconciled" )
type Duration ¶ added in v0.56.0
type Duration string
Duration is a valid time duration that can be parsed by Prometheus model.ParseDuration() function. Supported units: y, w, d, h, m, s, ms Examples: `30s`, `1m`, `1h20m15s`, `15d` +kubebuilder:validation:Pattern:="^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$"
type EmbeddedObjectMetadata ¶
type EmbeddedObjectMetadata struct { // Name must be unique within a namespace. Is required when creating resources, although // some resources may allow a client to request the generation of an appropriate name // automatically. Name is primarily intended for creation idempotence and configuration // definition. // Cannot be updated. // More info: http://kubernetes.io/docs/user-guide/identifiers#names // +optional Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"` // Map of string keys and values that can be used to organize and categorize // (scope and select) objects. May match selectors of replication controllers // and services. // More info: http://kubernetes.io/docs/user-guide/labels // +optional Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"` // Annotations is an unstructured key value map stored with a resource that may be // set by external tools to store and retrieve arbitrary metadata. They are not // queryable and should be preserved when modifying objects. // More info: http://kubernetes.io/docs/user-guide/annotations // +optional Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,12,rep,name=annotations"` }
EmbeddedObjectMetadata contains a subset of the fields included in k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta Only fields which are relevant to embedded resources are included.
func (*EmbeddedObjectMetadata) DeepCopy ¶
func (in *EmbeddedObjectMetadata) DeepCopy() *EmbeddedObjectMetadata
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmbeddedObjectMetadata.
func (*EmbeddedObjectMetadata) DeepCopyInto ¶
func (in *EmbeddedObjectMetadata) DeepCopyInto(out *EmbeddedObjectMetadata)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EmbeddedPersistentVolumeClaim ¶
type EmbeddedPersistentVolumeClaim struct { metav1.TypeMeta `json:",inline"` // EmbeddedMetadata contains metadata relevant to an EmbeddedResource. EmbeddedObjectMetadata `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"` // Defines the desired characteristics of a volume requested by a pod author. // More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims // +optional Spec v1.PersistentVolumeClaimSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"` // *Deprecated: this field is never set.* // +optional Status v1.PersistentVolumeClaimStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"` }
EmbeddedPersistentVolumeClaim is an embedded version of k8s.io/api/core/v1.PersistentVolumeClaim. It contains TypeMeta and a reduced ObjectMeta.
func (*EmbeddedPersistentVolumeClaim) DeepCopy ¶
func (in *EmbeddedPersistentVolumeClaim) DeepCopy() *EmbeddedPersistentVolumeClaim
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmbeddedPersistentVolumeClaim.
func (*EmbeddedPersistentVolumeClaim) DeepCopyInto ¶
func (in *EmbeddedPersistentVolumeClaim) DeepCopyInto(out *EmbeddedPersistentVolumeClaim)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Endpoint ¶
type Endpoint struct { // Name of the service port this endpoint refers to. Mutually exclusive with targetPort. Port string `json:"port,omitempty"` // Name or number of the target port of the Pod behind the Service, the port must be specified with container port property. Mutually exclusive with port. TargetPort *intstr.IntOrString `json:"targetPort,omitempty"` // HTTP path to scrape for metrics. // If empty, Prometheus uses the default value (e.g. `/metrics`). Path string `json:"path,omitempty"` // HTTP scheme to use for scraping. // `http` and `https` are the expected values unless you rewrite the `__scheme__` label via relabeling. // If empty, Prometheus uses the default value `http`. // +kubebuilder:validation:Enum=http;https Scheme string `json:"scheme,omitempty"` // Optional HTTP URL parameters Params map[string][]string `json:"params,omitempty"` // Interval at which metrics should be scraped // If not specified Prometheus' global scrape interval is used. Interval Duration `json:"interval,omitempty"` // Timeout after which the scrape is ended // If not specified, the Prometheus global scrape timeout is used unless it is less than `Interval` in which the latter is used. ScrapeTimeout Duration `json:"scrapeTimeout,omitempty"` // TLS configuration to use when scraping the endpoint TLSConfig *TLSConfig `json:"tlsConfig,omitempty"` // File to read bearer token for scraping targets. BearerTokenFile string `json:"bearerTokenFile,omitempty"` // Secret to mount to read bearer token for scraping targets. The secret // needs to be in the same namespace as the service monitor and accessible by // the Prometheus Operator. //+ optional BearerTokenSecret *v1.SecretKeySelector `json:"bearerTokenSecret,omitempty"` // Authorization section for this endpoint Authorization *SafeAuthorization `json:"authorization,omitempty"` // HonorLabels chooses the metric's labels on collisions with target labels. HonorLabels bool `json:"honorLabels,omitempty"` // HonorTimestamps controls whether Prometheus respects the timestamps present in scraped data. HonorTimestamps *bool `json:"honorTimestamps,omitempty"` // BasicAuth allow an endpoint to authenticate over basic authentication // More info: https://prometheus.io/docs/operating/configuration/#endpoints BasicAuth *BasicAuth `json:"basicAuth,omitempty"` // OAuth2 for the URL. Only valid in Prometheus versions 2.27.0 and newer. OAuth2 *OAuth2 `json:"oauth2,omitempty"` // MetricRelabelConfigs to apply to samples before ingestion. MetricRelabelConfigs []*RelabelConfig `json:"metricRelabelings,omitempty"` // RelabelConfigs to apply to samples before scraping. // Prometheus Operator automatically adds relabelings for a few standard Kubernetes fields. // The original scrape job's name is available via the `__tmp_prometheus_job_name` label. // More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config RelabelConfigs []*RelabelConfig `json:"relabelings,omitempty"` // ProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint. ProxyURL *string `json:"proxyUrl,omitempty"` // FollowRedirects configures whether scrape requests follow HTTP 3xx redirects. FollowRedirects *bool `json:"followRedirects,omitempty"` // Whether to enable HTTP2. EnableHttp2 *bool `json:"enableHttp2,omitempty"` // Drop pods that are not running. (Failed, Succeeded). Enabled by default. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase FilterRunning *bool `json:"filterRunning,omitempty"` }
Endpoint defines a scrapeable endpoint serving Prometheus metrics. +k8s:openapi-gen=true
func (*Endpoint) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoint.
func (*Endpoint) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Exemplars ¶ added in v0.58.0
type Exemplars struct { // Maximum number of exemplars stored in memory for all series. // // exemplar-storage itself must be enabled using the `spec.enableFeature` // option for exemplars to be scraped in the first place. // // If not set, Prometheus uses its default value. A value of zero or less // than zero disables the storage. // // +optional MaxSize *int64 `json:"maxSize,omitempty"` }
func (*Exemplars) DeepCopy ¶ added in v0.58.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Exemplars.
func (*Exemplars) DeepCopyInto ¶ added in v0.58.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GlobalSMTPConfig ¶ added in v0.67.0
type GlobalSMTPConfig struct { // The default SMTP From header field. // +optional From *string `json:"from,omitempty"` // The default SMTP smarthost used for sending emails. // +optional SmartHost *HostPort `json:"smartHost,omitempty"` // The default hostname to identify to the SMTP server. // +optional Hello *string `json:"hello,omitempty"` // SMTP Auth using CRAM-MD5, LOGIN and PLAIN. If empty, Alertmanager doesn't authenticate to the SMTP server. // +optional AuthUsername *string `json:"authUsername,omitempty"` // SMTP Auth using LOGIN and PLAIN. // +optional AuthPassword *v1.SecretKeySelector `json:"authPassword,omitempty"` // SMTP Auth using PLAIN // +optional AuthIdentity *string `json:"authIdentity,omitempty"` // SMTP Auth using CRAM-MD5. // +optional AuthSecret *v1.SecretKeySelector `json:"authSecret,omitempty"` // The default SMTP TLS requirement. // Note that Go does not support unencrypted connections to remote SMTP endpoints. // +optional RequireTLS *bool `json:"requireTLS,omitempty"` }
GlobalSMTPConfig configures global SMTP parameters. See https://prometheus.io/docs/alerting/latest/configuration/#configuration-file
func (*GlobalSMTPConfig) DeepCopy ¶ added in v0.67.0
func (in *GlobalSMTPConfig) DeepCopy() *GlobalSMTPConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalSMTPConfig.
func (*GlobalSMTPConfig) DeepCopyInto ¶ added in v0.67.0
func (in *GlobalSMTPConfig) DeepCopyInto(out *GlobalSMTPConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type GoDuration ¶ added in v0.58.0
type GoDuration string
GoDuration is a valid time duration that can be parsed by Go's time.ParseDuration() function. Supported units: h, m, s, ms Examples: `45ms`, `30s`, `1m`, `1h20m15s` +kubebuilder:validation:Pattern:="^(0|(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$"
type HTTPConfig ¶ added in v0.59.0
type HTTPConfig struct { // Authorization header configuration for the client. // This is mutually exclusive with BasicAuth and is only available starting from Alertmanager v0.22+. // +optional Authorization *SafeAuthorization `json:"authorization,omitempty"` // BasicAuth for the client. // This is mutually exclusive with Authorization. If both are defined, BasicAuth takes precedence. // +optional BasicAuth *BasicAuth `json:"basicAuth,omitempty"` // OAuth2 client credentials used to fetch a token for the targets. // +optional OAuth2 *OAuth2 `json:"oauth2,omitempty"` // The secret's key that contains the bearer token to be used by the client // for authentication. // The secret needs to be in the same namespace as the Alertmanager // object and accessible by the Prometheus Operator. // +optional BearerTokenSecret *v1.SecretKeySelector `json:"bearerTokenSecret,omitempty"` // TLS configuration for the client. // +optional TLSConfig *SafeTLSConfig `json:"tlsConfig,omitempty"` // Optional proxy URL. // +optional ProxyURL string `json:"proxyURL,omitempty"` // FollowRedirects specifies whether the client should follow HTTP 3xx redirects. // +optional FollowRedirects *bool `json:"followRedirects,omitempty"` }
HTTPConfig defines a client HTTP configuration. See https://prometheus.io/docs/alerting/latest/configuration/#http_config
func (*HTTPConfig) DeepCopy ¶ added in v0.59.0
func (in *HTTPConfig) DeepCopy() *HTTPConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPConfig.
func (*HTTPConfig) DeepCopyInto ¶ added in v0.59.0
func (in *HTTPConfig) DeepCopyInto(out *HTTPConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HostAlias ¶ added in v0.57.0
type HostAlias struct { // IP address of the host file entry. // +kubebuilder:validation:Required IP string `json:"ip"` // Hostnames for the above IP address. // +kubebuilder:validation:Required Hostnames []string `json:"hostnames"` }
HostAlias holds the mapping between IP and hostnames that will be injected as an entry in the pod's hosts file.
func (*HostAlias) DeepCopy ¶ added in v0.57.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostAlias.
func (*HostAlias) DeepCopyInto ¶ added in v0.57.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HostPort ¶ added in v0.67.0
type HostPort struct { // Defines the host's address, it can be a DNS name or a literal IP address. // +kubebuilder:validation:MinLength=1 Host string `json:"host"` // Defines the host's port, it can be a literal port number or a port name. // +kubebuilder:validation:MinLength=1 Port string `json:"port"` }
HostPort represents a "host:port" network address.
func (*HostPort) DeepCopy ¶ added in v0.67.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostPort.
func (*HostPort) DeepCopyInto ¶ added in v0.67.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type LabelName ¶ added in v0.55.0
type LabelName string
LabelName is a valid Prometheus label name which may only contain ASCII letters, numbers, as well as underscores. +kubebuilder:validation:Pattern:="^[a-zA-Z_][a-zA-Z0-9_]*$"
type MetadataConfig ¶ added in v0.47.0
type MetadataConfig struct { // Defines whether metric metadata is sent to the remote storage or not. Send bool `json:"send,omitempty"` // Defines how frequently metric metadata is sent to the remote storage. SendInterval Duration `json:"sendInterval,omitempty"` }
MetadataConfig configures the sending of series metadata to the remote storage.
+k8s:openapi-gen=true
func (*MetadataConfig) DeepCopy ¶ added in v0.47.0
func (in *MetadataConfig) DeepCopy() *MetadataConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetadataConfig.
func (*MetadataConfig) DeepCopyInto ¶ added in v0.47.0
func (in *MetadataConfig) DeepCopyInto(out *MetadataConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NamespaceSelector ¶
type NamespaceSelector struct { // Boolean describing whether all namespaces are selected in contrast to a // list restricting them. Any bool `json:"any,omitempty"` // List of namespace names to select from. MatchNames []string `json:"matchNames,omitempty"` }
NamespaceSelector is a selector for selecting either all namespaces or a list of namespaces. If `any` is true, it takes precedence over `matchNames`. If `matchNames` is empty and `any` is false, it means that the objects are selected from the current namespace. +k8s:openapi-gen=true
func (*NamespaceSelector) DeepCopy ¶
func (in *NamespaceSelector) DeepCopy() *NamespaceSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceSelector.
func (*NamespaceSelector) DeepCopyInto ¶
func (in *NamespaceSelector) DeepCopyInto(out *NamespaceSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NonEmptyDuration ¶ added in v0.66.0
type NonEmptyDuration string
NonEmptyDuration is a valid time duration that can be parsed by Prometheus model.ParseDuration() function. Compared to Duration, NonEmptyDuration enforces a minimum length of 1. Supported units: y, w, d, h, m, s, ms Examples: `30s`, `1m`, `1h20m15s`, `15d` +kubebuilder:validation:Pattern:="^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$" +kubebuilder:validation:MinLength=1
type OAuth2 ¶ added in v0.50.0
type OAuth2 struct { // The secret or configmap containing the OAuth2 client id ClientID SecretOrConfigMap `json:"clientId"` // The secret containing the OAuth2 client secret ClientSecret v1.SecretKeySelector `json:"clientSecret"` // The URL to fetch the token from // +kubebuilder:validation:MinLength=1 TokenURL string `json:"tokenUrl"` // OAuth2 scopes used for the token request Scopes []string `json:"scopes,omitempty"` // Parameters to append to the token URL EndpointParams map[string]string `json:"endpointParams,omitempty"` }
OAuth2 allows an endpoint to authenticate with OAuth2. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#oauth2 +k8s:openapi-gen=true
func (*OAuth2) DeepCopy ¶ added in v0.50.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuth2.
func (*OAuth2) DeepCopyInto ¶ added in v0.50.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type OAuth2ValidationError ¶ added in v0.50.0
type OAuth2ValidationError struct {
// contains filtered or unexported fields
}
func (*OAuth2ValidationError) DeepCopy ¶ added in v0.50.0
func (in *OAuth2ValidationError) DeepCopy() *OAuth2ValidationError
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuth2ValidationError.
func (*OAuth2ValidationError) DeepCopyInto ¶ added in v0.50.0
func (in *OAuth2ValidationError) DeepCopyInto(out *OAuth2ValidationError)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*OAuth2ValidationError) Error ¶ added in v0.50.0
func (e *OAuth2ValidationError) Error() string
type ObjectReference ¶ added in v0.56.0
type ObjectReference struct { // Group of the referent. When not specified, it defaults to `monitoring.coreos.com` // +optional // +kubebuilder:default:="monitoring.coreos.com" // +kubebuilder:validation:Enum=monitoring.coreos.com Group string `json:"group"` // Resource of the referent. // +kubebuilder:validation:Required // +kubebuilder:validation:Enum=prometheusrules;servicemonitors;podmonitors;probes;scrapeconfigs Resource string `json:"resource"` // Namespace of the referent. // More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/ // +kubebuilder:validation:Required // +kubebuilder:validation:MinLength=1 Namespace string `json:"namespace"` // Name of the referent. When not set, all resources in the namespace are matched. // +optional Name string `json:"name,omitempty"` }
ObjectReference references a PodMonitor, ServiceMonitor, Probe or PrometheusRule object.
func (*ObjectReference) DeepCopy ¶ added in v0.56.0
func (in *ObjectReference) DeepCopy() *ObjectReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ObjectReference.
func (*ObjectReference) DeepCopyInto ¶ added in v0.56.0
func (in *ObjectReference) DeepCopyInto(out *ObjectReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ObjectReference) GroupKind ¶ added in v0.56.0
func (obj *ObjectReference) GroupKind() schema.GroupKind
func (*ObjectReference) GroupResource ¶ added in v0.56.0
func (obj *ObjectReference) GroupResource() schema.GroupResource
type PodMetricsEndpoint ¶
type PodMetricsEndpoint struct { // Name of the pod port this endpoint refers to. Mutually exclusive with targetPort. Port string `json:"port,omitempty"` // Deprecated: Use 'port' instead. TargetPort *intstr.IntOrString `json:"targetPort,omitempty"` // HTTP path to scrape for metrics. // If empty, Prometheus uses the default value (e.g. `/metrics`). Path string `json:"path,omitempty"` // HTTP scheme to use for scraping. // `http` and `https` are the expected values unless you rewrite the `__scheme__` label via relabeling. // If empty, Prometheus uses the default value `http`. // +kubebuilder:validation:Enum=http;https Scheme string `json:"scheme,omitempty"` // Optional HTTP URL parameters Params map[string][]string `json:"params,omitempty"` // Interval at which metrics should be scraped // If not specified Prometheus' global scrape interval is used. Interval Duration `json:"interval,omitempty"` // Timeout after which the scrape is ended // If not specified, the Prometheus global scrape interval is used. ScrapeTimeout Duration `json:"scrapeTimeout,omitempty"` // TLS configuration to use when scraping the endpoint. TLSConfig *PodMetricsEndpointTLSConfig `json:"tlsConfig,omitempty"` // Secret to mount to read bearer token for scraping targets. The secret // needs to be in the same namespace as the pod monitor and accessible by // the Prometheus Operator. BearerTokenSecret v1.SecretKeySelector `json:"bearerTokenSecret,omitempty"` // HonorLabels chooses the metric's labels on collisions with target labels. HonorLabels bool `json:"honorLabels,omitempty"` // HonorTimestamps controls whether Prometheus respects the timestamps present in scraped data. HonorTimestamps *bool `json:"honorTimestamps,omitempty"` // BasicAuth allow an endpoint to authenticate over basic authentication. // More info: https://prometheus.io/docs/operating/configuration/#endpoint BasicAuth *BasicAuth `json:"basicAuth,omitempty"` // OAuth2 for the URL. Only valid in Prometheus versions 2.27.0 and newer. OAuth2 *OAuth2 `json:"oauth2,omitempty"` // Authorization section for this endpoint Authorization *SafeAuthorization `json:"authorization,omitempty"` // MetricRelabelConfigs to apply to samples before ingestion. MetricRelabelConfigs []*RelabelConfig `json:"metricRelabelings,omitempty"` // RelabelConfigs to apply to samples before scraping. // Prometheus Operator automatically adds relabelings for a few standard Kubernetes fields. // The original scrape job's name is available via the `__tmp_prometheus_job_name` label. // More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config RelabelConfigs []*RelabelConfig `json:"relabelings,omitempty"` // ProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint. ProxyURL *string `json:"proxyUrl,omitempty"` // FollowRedirects configures whether scrape requests follow HTTP 3xx redirects. FollowRedirects *bool `json:"followRedirects,omitempty"` // Whether to enable HTTP2. EnableHttp2 *bool `json:"enableHttp2,omitempty"` // Drop pods that are not running. (Failed, Succeeded). Enabled by default. // More info: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#pod-phase FilterRunning *bool `json:"filterRunning,omitempty"` }
PodMetricsEndpoint defines a scrapeable endpoint of a Kubernetes Pod serving Prometheus metrics. +k8s:openapi-gen=true
func (*PodMetricsEndpoint) DeepCopy ¶
func (in *PodMetricsEndpoint) DeepCopy() *PodMetricsEndpoint
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodMetricsEndpoint.
func (*PodMetricsEndpoint) DeepCopyInto ¶
func (in *PodMetricsEndpoint) DeepCopyInto(out *PodMetricsEndpoint)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodMetricsEndpointTLSConfig ¶ added in v0.43.0
type PodMetricsEndpointTLSConfig struct {
SafeTLSConfig `json:",inline"`
}
PodMetricsEndpointTLSConfig specifies TLS configuration parameters. +k8s:openapi-gen=true
func (*PodMetricsEndpointTLSConfig) DeepCopy ¶ added in v0.43.0
func (in *PodMetricsEndpointTLSConfig) DeepCopy() *PodMetricsEndpointTLSConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodMetricsEndpointTLSConfig.
func (*PodMetricsEndpointTLSConfig) DeepCopyInto ¶ added in v0.43.0
func (in *PodMetricsEndpointTLSConfig) DeepCopyInto(out *PodMetricsEndpointTLSConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PodMonitor ¶
type PodMonitor struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Specification of desired Pod selection for target discovery by Prometheus. Spec PodMonitorSpec `json:"spec"` }
PodMonitor defines monitoring for a set of pods.
func (*PodMonitor) DeepCopy ¶
func (in *PodMonitor) DeepCopy() *PodMonitor
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodMonitor.
func (*PodMonitor) DeepCopyInto ¶
func (in *PodMonitor) DeepCopyInto(out *PodMonitor)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodMonitor) DeepCopyObject ¶
func (l *PodMonitor) DeepCopyObject() runtime.Object
DeepCopyObject implements the runtime.Object interface.
type PodMonitorList ¶
type PodMonitorList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata // More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata,omitempty"` // List of PodMonitors Items []*PodMonitor `json:"items"` }
PodMonitorList is a list of PodMonitors. +k8s:openapi-gen=true
func (*PodMonitorList) DeepCopy ¶
func (in *PodMonitorList) DeepCopy() *PodMonitorList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodMonitorList.
func (*PodMonitorList) DeepCopyInto ¶
func (in *PodMonitorList) DeepCopyInto(out *PodMonitorList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PodMonitorList) DeepCopyObject ¶
func (l *PodMonitorList) DeepCopyObject() runtime.Object
DeepCopyObject implements the runtime.Object interface.
type PodMonitorSpec ¶
type PodMonitorSpec struct { // The label to use to retrieve the job name from. JobLabel string `json:"jobLabel,omitempty"` // PodTargetLabels transfers labels on the Kubernetes Pod onto the target. PodTargetLabels []string `json:"podTargetLabels,omitempty"` // A list of endpoints allowed as part of this PodMonitor. PodMetricsEndpoints []PodMetricsEndpoint `json:"podMetricsEndpoints"` // Selector to select Pod objects. Selector metav1.LabelSelector `json:"selector"` // Selector to select which namespaces the Endpoints objects are discovered from. NamespaceSelector NamespaceSelector `json:"namespaceSelector,omitempty"` // SampleLimit defines per-scrape limit on number of scraped samples that will be accepted. SampleLimit *uint64 `json:"sampleLimit,omitempty"` // TargetLimit defines a limit on the number of scraped targets that will be accepted. // +optional TargetLimit *uint64 `json:"targetLimit,omitempty"` // Per-scrape limit on number of labels that will be accepted for a sample. // Only valid in Prometheus versions 2.27.0 and newer. // +optional LabelLimit *uint64 `json:"labelLimit,omitempty"` // Per-scrape limit on length of labels name that will be accepted for a sample. // Only valid in Prometheus versions 2.27.0 and newer. // +optional LabelNameLengthLimit *uint64 `json:"labelNameLengthLimit,omitempty"` // Per-scrape limit on length of labels value that will be accepted for a sample. // Only valid in Prometheus versions 2.27.0 and newer. // +optional LabelValueLengthLimit *uint64 `json:"labelValueLengthLimit,omitempty"` // Per-scrape limit on the number of targets dropped by relabeling // that will be kept in memory. 0 means no limit. // // It requires Prometheus >= v2.47.0. // // +optional KeepDroppedTargets *uint64 `json:"keepDroppedTargets,omitempty"` // Attaches node metadata to discovered targets. // Requires Prometheus v2.35.0 and above. AttachMetadata *AttachMetadata `json:"attachMetadata,omitempty"` }
PodMonitorSpec contains specification parameters for a PodMonitor. +k8s:openapi-gen=true
func (*PodMonitorSpec) DeepCopy ¶
func (in *PodMonitorSpec) DeepCopy() *PodMonitorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodMonitorSpec.
func (*PodMonitorSpec) DeepCopyInto ¶
func (in *PodMonitorSpec) DeepCopyInto(out *PodMonitorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Probe ¶
type Probe struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Specification of desired Ingress selection for target discovery by Prometheus. Spec ProbeSpec `json:"spec"` }
Probe defines monitoring for a set of static targets or ingresses.
func (*Probe) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Probe.
func (*Probe) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Probe) DeepCopyObject ¶
DeepCopyObject implements the runtime.Object interface.
type ProbeList ¶
type ProbeList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata // More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata,omitempty"` // List of Probes Items []*Probe `json:"items"` }
ProbeList is a list of Probes. +k8s:openapi-gen=true
func (*ProbeList) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProbeList.
func (*ProbeList) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ProbeList) DeepCopyObject ¶
DeepCopyObject implements the runtime.Object interface.
type ProbeSpec ¶
type ProbeSpec struct { // The job name assigned to scraped metrics by default. JobName string `json:"jobName,omitempty"` // Specification for the prober to use for probing targets. // The prober.URL parameter is required. Targets cannot be probed if left empty. ProberSpec ProberSpec `json:"prober,omitempty"` // The module to use for probing specifying how to probe the target. // Example module configuring in the blackbox exporter: // https://github.com/prometheus/blackbox_exporter/blob/master/example.yml Module string `json:"module,omitempty"` // Targets defines a set of static or dynamically discovered targets to probe. Targets ProbeTargets `json:"targets,omitempty"` // Interval at which targets are probed using the configured prober. // If not specified Prometheus' global scrape interval is used. Interval Duration `json:"interval,omitempty"` // Timeout for scraping metrics from the Prometheus exporter. // If not specified, the Prometheus global scrape timeout is used. ScrapeTimeout Duration `json:"scrapeTimeout,omitempty"` // TLS configuration to use when scraping the endpoint. TLSConfig *ProbeTLSConfig `json:"tlsConfig,omitempty"` // Secret to mount to read bearer token for scraping targets. The secret // needs to be in the same namespace as the probe and accessible by // the Prometheus Operator. BearerTokenSecret v1.SecretKeySelector `json:"bearerTokenSecret,omitempty"` // BasicAuth allow an endpoint to authenticate over basic authentication. // More info: https://prometheus.io/docs/operating/configuration/#endpoint BasicAuth *BasicAuth `json:"basicAuth,omitempty"` // OAuth2 for the URL. Only valid in Prometheus versions 2.27.0 and newer. OAuth2 *OAuth2 `json:"oauth2,omitempty"` // MetricRelabelConfigs to apply to samples before ingestion. MetricRelabelConfigs []*RelabelConfig `json:"metricRelabelings,omitempty"` // Authorization section for this endpoint Authorization *SafeAuthorization `json:"authorization,omitempty"` // SampleLimit defines per-scrape limit on number of scraped samples that will be accepted. // +optional SampleLimit *uint64 `json:"sampleLimit,omitempty"` // TargetLimit defines a limit on the number of scraped targets that will be accepted. // +optional TargetLimit *uint64 `json:"targetLimit,omitempty"` // Per-scrape limit on number of labels that will be accepted for a sample. // Only valid in Prometheus versions 2.27.0 and newer. // +optional LabelLimit *uint64 `json:"labelLimit,omitempty"` // Per-scrape limit on length of labels name that will be accepted for a sample. // Only valid in Prometheus versions 2.27.0 and newer. // +optional LabelNameLengthLimit *uint64 `json:"labelNameLengthLimit,omitempty"` // Per-scrape limit on length of labels value that will be accepted for a sample. // Only valid in Prometheus versions 2.27.0 and newer. // +optional LabelValueLengthLimit *uint64 `json:"labelValueLengthLimit,omitempty"` // Per-scrape limit on the number of targets dropped by relabeling // that will be kept in memory. 0 means no limit. // // It requires Prometheus >= v2.47.0. // // +optional KeepDroppedTargets *uint64 `json:"keepDroppedTargets,omitempty"` }
ProbeSpec contains specification parameters for a Probe. +k8s:openapi-gen=true
func (*ProbeSpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProbeSpec.
func (*ProbeSpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProbeTLSConfig ¶ added in v0.47.0
type ProbeTLSConfig struct {
SafeTLSConfig `json:",inline"`
}
ProbeTLSConfig specifies TLS configuration parameters for the prober. +k8s:openapi-gen=true
func (*ProbeTLSConfig) DeepCopy ¶ added in v0.47.0
func (in *ProbeTLSConfig) DeepCopy() *ProbeTLSConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProbeTLSConfig.
func (*ProbeTLSConfig) DeepCopyInto ¶ added in v0.47.0
func (in *ProbeTLSConfig) DeepCopyInto(out *ProbeTLSConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProbeTargetIngress ¶
type ProbeTargetIngress struct { // Selector to select the Ingress objects. Selector metav1.LabelSelector `json:"selector,omitempty"` // From which namespaces to select Ingress objects. NamespaceSelector NamespaceSelector `json:"namespaceSelector,omitempty"` // RelabelConfigs to apply to the label set of the target before it gets // scraped. // The original ingress address is available via the // `__tmp_prometheus_ingress_address` label. It can be used to customize the // probed URL. // The original scrape job's name is available via the `__tmp_prometheus_job_name` label. // More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config RelabelConfigs []*RelabelConfig `json:"relabelingConfigs,omitempty"` }
ProbeTargetIngress defines the set of Ingress objects considered for probing. The operator configures a target for each host/path combination of each ingress object. +k8s:openapi-gen=true
func (*ProbeTargetIngress) DeepCopy ¶
func (in *ProbeTargetIngress) DeepCopy() *ProbeTargetIngress
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProbeTargetIngress.
func (*ProbeTargetIngress) DeepCopyInto ¶
func (in *ProbeTargetIngress) DeepCopyInto(out *ProbeTargetIngress)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProbeTargetStaticConfig ¶
type ProbeTargetStaticConfig struct { // The list of hosts to probe. Targets []string `json:"static,omitempty"` // Labels assigned to all metrics scraped from the targets. Labels map[string]string `json:"labels,omitempty"` // RelabelConfigs to apply to the label set of the targets before it gets // scraped. // More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config RelabelConfigs []*RelabelConfig `json:"relabelingConfigs,omitempty"` }
ProbeTargetStaticConfig defines the set of static targets considered for probing. +k8s:openapi-gen=true
func (*ProbeTargetStaticConfig) DeepCopy ¶
func (in *ProbeTargetStaticConfig) DeepCopy() *ProbeTargetStaticConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProbeTargetStaticConfig.
func (*ProbeTargetStaticConfig) DeepCopyInto ¶
func (in *ProbeTargetStaticConfig) DeepCopyInto(out *ProbeTargetStaticConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProbeTargets ¶
type ProbeTargets struct { // staticConfig defines the static list of targets to probe and the // relabeling configuration. // If `ingress` is also defined, `staticConfig` takes precedence. // More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#static_config. StaticConfig *ProbeTargetStaticConfig `json:"staticConfig,omitempty"` // ingress defines the Ingress objects to probe and the relabeling // configuration. // If `staticConfig` is also defined, `staticConfig` takes precedence. Ingress *ProbeTargetIngress `json:"ingress,omitempty"` }
ProbeTargets defines how to discover the probed targets. One of the `staticConfig` or `ingress` must be defined. If both are defined, `staticConfig` takes precedence. +k8s:openapi-gen=true
func (*ProbeTargets) DeepCopy ¶
func (in *ProbeTargets) DeepCopy() *ProbeTargets
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProbeTargets.
func (*ProbeTargets) DeepCopyInto ¶
func (in *ProbeTargets) DeepCopyInto(out *ProbeTargets)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ProbeTargets) Validate ¶ added in v0.55.0
func (it *ProbeTargets) Validate() error
Validate semantically validates the given ProbeTargets.
type ProbeTargetsValidationError ¶ added in v0.55.0
type ProbeTargetsValidationError struct {
// contains filtered or unexported fields
}
ProbeTargetsValidationError is returned by ProbeTargets.Validate() on semantically invalid configurations. +k8s:openapi-gen=false
func (*ProbeTargetsValidationError) DeepCopy ¶ added in v0.55.0
func (in *ProbeTargetsValidationError) DeepCopy() *ProbeTargetsValidationError
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProbeTargetsValidationError.
func (*ProbeTargetsValidationError) DeepCopyInto ¶ added in v0.55.0
func (in *ProbeTargetsValidationError) DeepCopyInto(out *ProbeTargetsValidationError)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ProbeTargetsValidationError) Error ¶ added in v0.55.0
func (e *ProbeTargetsValidationError) Error() string
type ProberSpec ¶
type ProberSpec struct { // Mandatory URL of the prober. URL string `json:"url"` // HTTP scheme to use for scraping. // `http` and `https` are the expected values unless you rewrite the `__scheme__` label via relabeling. // If empty, Prometheus uses the default value `http`. // +kubebuilder:validation:Enum=http;https Scheme string `json:"scheme,omitempty"` // Path to collect metrics from. // Defaults to `/probe`. // +kubebuilder:default:="/probe" Path string `json:"path,omitempty"` // Optional ProxyURL. ProxyURL string `json:"proxyUrl,omitempty"` }
ProberSpec contains specification parameters for the Prober used for probing. +k8s:openapi-gen=true
func (*ProberSpec) DeepCopy ¶
func (in *ProberSpec) DeepCopy() *ProberSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProberSpec.
func (*ProberSpec) DeepCopyInto ¶
func (in *ProberSpec) DeepCopyInto(out *ProberSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Prometheus ¶
type Prometheus struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Specification of the desired behavior of the Prometheus cluster. More info: // https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status Spec PrometheusSpec `json:"spec"` // Most recent observed status of the Prometheus cluster. Read-only. // More info: // https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status Status PrometheusStatus `json:"status,omitempty"` }
Prometheus defines a Prometheus deployment.
func (*Prometheus) DeepCopy ¶
func (in *Prometheus) DeepCopy() *Prometheus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Prometheus.
func (*Prometheus) DeepCopyInto ¶
func (in *Prometheus) DeepCopyInto(out *Prometheus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Prometheus) DeepCopyObject ¶
func (l *Prometheus) DeepCopyObject() runtime.Object
DeepCopyObject implements the runtime.Object interface.
func (*Prometheus) GetCommonPrometheusFields ¶ added in v0.64.0
func (l *Prometheus) GetCommonPrometheusFields() CommonPrometheusFields
func (*Prometheus) GetStatus ¶ added in v0.66.0
func (l *Prometheus) GetStatus() PrometheusStatus
func (*Prometheus) GetTypeMeta ¶ added in v0.64.0
func (l *Prometheus) GetTypeMeta() metav1.TypeMeta
func (*Prometheus) SetCommonPrometheusFields ¶ added in v0.64.0
func (l *Prometheus) SetCommonPrometheusFields(f CommonPrometheusFields)
type PrometheusInterface ¶ added in v0.64.0
type PrometheusInterface interface { metav1.ObjectMetaAccessor GetTypeMeta() metav1.TypeMeta GetCommonPrometheusFields() CommonPrometheusFields SetCommonPrometheusFields(CommonPrometheusFields) GetStatus() PrometheusStatus }
PrometheusInterface is used by Prometheus and PrometheusAgent to share common methods, e.g. config generation. +k8s:deepcopy-gen=false
type PrometheusList ¶
type PrometheusList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata // More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata,omitempty"` // List of Prometheuses Items []*Prometheus `json:"items"` }
PrometheusList is a list of Prometheuses. +k8s:openapi-gen=true
func (*PrometheusList) DeepCopy ¶
func (in *PrometheusList) DeepCopy() *PrometheusList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusList.
func (*PrometheusList) DeepCopyInto ¶
func (in *PrometheusList) DeepCopyInto(out *PrometheusList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PrometheusList) DeepCopyObject ¶
func (l *PrometheusList) DeepCopyObject() runtime.Object
DeepCopyObject implements the runtime.Object interface.
type PrometheusRule ¶
type PrometheusRule struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Specification of desired alerting rule definitions for Prometheus. Spec PrometheusRuleSpec `json:"spec"` }
PrometheusRule defines recording and alerting rules for a Prometheus instance
func (*PrometheusRule) DeepCopy ¶
func (in *PrometheusRule) DeepCopy() *PrometheusRule
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusRule.
func (*PrometheusRule) DeepCopyInto ¶
func (in *PrometheusRule) DeepCopyInto(out *PrometheusRule)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PrometheusRule) DeepCopyObject ¶
func (f *PrometheusRule) DeepCopyObject() runtime.Object
DeepCopyObject implements the runtime.Object interface.
type PrometheusRuleExcludeConfig ¶
type PrometheusRuleExcludeConfig struct { // Namespace of the excluded PrometheusRule object. RuleNamespace string `json:"ruleNamespace"` // Name of the excluded PrometheusRule object. RuleName string `json:"ruleName"` }
PrometheusRuleExcludeConfig enables users to configure excluded PrometheusRule names and their namespaces to be ignored while enforcing namespace label for alerts and metrics.
func (*PrometheusRuleExcludeConfig) DeepCopy ¶
func (in *PrometheusRuleExcludeConfig) DeepCopy() *PrometheusRuleExcludeConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusRuleExcludeConfig.
func (*PrometheusRuleExcludeConfig) DeepCopyInto ¶
func (in *PrometheusRuleExcludeConfig) DeepCopyInto(out *PrometheusRuleExcludeConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PrometheusRuleList ¶
type PrometheusRuleList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata // More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata,omitempty"` // List of Rules Items []*PrometheusRule `json:"items"` }
PrometheusRuleList is a list of PrometheusRules. +k8s:openapi-gen=true
func (*PrometheusRuleList) DeepCopy ¶
func (in *PrometheusRuleList) DeepCopy() *PrometheusRuleList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusRuleList.
func (*PrometheusRuleList) DeepCopyInto ¶
func (in *PrometheusRuleList) DeepCopyInto(out *PrometheusRuleList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PrometheusRuleList) DeepCopyObject ¶
func (l *PrometheusRuleList) DeepCopyObject() runtime.Object
DeepCopyObject implements the runtime.Object interface.
type PrometheusRuleSpec ¶
type PrometheusRuleSpec struct { // Content of Prometheus rule file // +listType=map // +listMapKey=name Groups []RuleGroup `json:"groups,omitempty"` }
PrometheusRuleSpec contains specification parameters for a Rule. +k8s:openapi-gen=true
func (*PrometheusRuleSpec) DeepCopy ¶
func (in *PrometheusRuleSpec) DeepCopy() *PrometheusRuleSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusRuleSpec.
func (*PrometheusRuleSpec) DeepCopyInto ¶
func (in *PrometheusRuleSpec) DeepCopyInto(out *PrometheusRuleSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PrometheusSpec ¶
type PrometheusSpec struct { CommonPrometheusFields `json:",inline"` // *Deprecated: use 'spec.image' instead.* BaseImage string `json:"baseImage,omitempty"` // *Deprecated: use 'spec.image' instead. The image's tag can be specified // as part of the image name.* Tag string `json:"tag,omitempty"` // *Deprecated: use 'spec.image' instead. The image's digest can be // specified as part of the image name.* SHA string `json:"sha,omitempty"` // How long to retain the Prometheus data. // // Default: "24h" if `spec.retention` and `spec.retentionSize` are empty. Retention Duration `json:"retention,omitempty"` // Maximum number of bytes used by the Prometheus data. RetentionSize ByteSize `json:"retentionSize,omitempty"` // When true, the Prometheus compaction is disabled. DisableCompaction bool `json:"disableCompaction,omitempty"` // Defines the configuration of the Prometheus rules' engine. Rules Rules `json:"rules,omitempty"` // Defines the list of PrometheusRule objects to which the namespace label // enforcement doesn't apply. // This is only relevant when `spec.enforcedNamespaceLabel` is set to true. // *Deprecated: use `spec.excludedFromEnforcement` instead.* // +optional PrometheusRulesExcludedFromEnforce []PrometheusRuleExcludeConfig `json:"prometheusRulesExcludedFromEnforce,omitempty"` // PrometheusRule objects to be selected for rule evaluation. An empty // label selector matches all objects. A null label selector matches no // objects. // +optional RuleSelector *metav1.LabelSelector `json:"ruleSelector,omitempty"` // Namespaces to match for PrometheusRule discovery. An empty label selector // matches all namespaces. A null label selector matches the current // namespace only. // +optional RuleNamespaceSelector *metav1.LabelSelector `json:"ruleNamespaceSelector,omitempty"` // QuerySpec defines the configuration of the Promethus query service. // +optional Query *QuerySpec `json:"query,omitempty"` // Defines the settings related to Alertmanager. // +optional Alerting *AlertingSpec `json:"alerting,omitempty"` // AdditionalAlertRelabelConfigs specifies a key of a Secret containing // additional Prometheus alert relabel configurations. The alert relabel // configurations are appended to the configuration generated by the // Prometheus Operator. They must be formatted according to the official // Prometheus documentation: // // https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs // // The user is responsible for making sure that the configurations are valid // // Note that using this feature may expose the possibility to break // upgrades of Prometheus. It is advised to review Prometheus release notes // to ensure that no incompatible alert relabel configs are going to break // Prometheus after the upgrade. // +optional AdditionalAlertRelabelConfigs *v1.SecretKeySelector `json:"additionalAlertRelabelConfigs,omitempty"` // AdditionalAlertManagerConfigs specifies a key of a Secret containing // additional Prometheus Alertmanager configurations. The Alertmanager // configurations are appended to the configuration generated by the // Prometheus Operator. They must be formatted according to the official // Prometheus documentation: // // https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alertmanager_config // // The user is responsible for making sure that the configurations are valid // // Note that using this feature may expose the possibility to break // upgrades of Prometheus. It is advised to review Prometheus release notes // to ensure that no incompatible AlertManager configs are going to break // Prometheus after the upgrade. // +optional AdditionalAlertManagerConfigs *v1.SecretKeySelector `json:"additionalAlertManagerConfigs,omitempty"` // Defines the list of remote read configurations. // +optional RemoteRead []RemoteReadSpec `json:"remoteRead,omitempty"` // Defines the configuration of the optional Thanos sidecar. // // This section is experimental, it may change significantly without // deprecation notice in any release. // +optional Thanos *ThanosSpec `json:"thanos,omitempty"` // queryLogFile specifies where the file to which PromQL queries are logged. // // If the filename has an empty path, e.g. 'query.log', The Prometheus Pods // will mount the file into an emptyDir volume at `/var/log/prometheus`. // If a full path is provided, e.g. '/var/log/prometheus/query.log', you // must mount a volume in the specified directory and it must be writable. // This is because the prometheus container runs with a read-only root // filesystem for security reasons. // Alternatively, the location can be set to a standard I/O stream, e.g. // `/dev/stdout`, to log query information to the default Prometheus log // stream. QueryLogFile string `json:"queryLogFile,omitempty"` // AllowOverlappingBlocks enables vertical compaction and vertical query // merge in Prometheus. // // *Deprecated: this flag has no effect for Prometheus >= 2.39.0 where overlapping blocks are enabled by default.* AllowOverlappingBlocks bool `json:"allowOverlappingBlocks,omitempty"` // Exemplars related settings that are runtime reloadable. // It requires to enable the `exemplar-storage` feature flag to be effective. // +optional Exemplars *Exemplars `json:"exemplars,omitempty"` // Interval between rule evaluations. // Default: "30s" // +kubebuilder:default:="30s" EvaluationInterval Duration `json:"evaluationInterval,omitempty"` // Enables access to the Prometheus web admin API. // // WARNING: Enabling the admin APIs enables mutating endpoints, to delete data, // shutdown Prometheus, and more. Enabling this should be done with care and the // user is advised to add additional authentication authorization via a proxy to // ensure only clients authorized to perform these actions can do so. // // For more information: // https://prometheus.io/docs/prometheus/latest/querying/api/#tsdb-admin-apis EnableAdminAPI bool `json:"enableAdminAPI,omitempty"` // Defines the runtime reloadable configuration of the timeseries database // (TSDB). TSDB TSDBSpec `json:"tsdb,omitempty"` }
PrometheusSpec is a specification of the desired behavior of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status +k8s:openapi-gen=true
func (*PrometheusSpec) DeepCopy ¶
func (in *PrometheusSpec) DeepCopy() *PrometheusSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusSpec.
func (*PrometheusSpec) DeepCopyInto ¶
func (in *PrometheusSpec) DeepCopyInto(out *PrometheusSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PrometheusStatus ¶
type PrometheusStatus struct { // Represents whether any actions on the underlying managed objects are // being performed. Only delete actions will be performed. Paused bool `json:"paused"` // Total number of non-terminated pods targeted by this Prometheus deployment // (their labels match the selector). Replicas int32 `json:"replicas"` // Total number of non-terminated pods targeted by this Prometheus deployment // that have the desired version spec. UpdatedReplicas int32 `json:"updatedReplicas"` // Total number of available pods (ready for at least minReadySeconds) // targeted by this Prometheus deployment. AvailableReplicas int32 `json:"availableReplicas"` UnavailableReplicas int32 `json:"unavailableReplicas"` // The current state of the Prometheus deployment. // +listType=map // +listMapKey=type // +optional Conditions []Condition `json:"conditions,omitempty"` // The list has one entry per shard. Each entry provides a summary of the shard status. // +listType=map // +listMapKey=shardID // +optional ShardStatuses []ShardStatus `json:"shardStatuses,omitempty"` }
PrometheusStatus is the most recent observed status of the Prometheus cluster. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status +k8s:openapi-gen=true
func (*PrometheusStatus) DeepCopy ¶
func (in *PrometheusStatus) DeepCopy() *PrometheusStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusStatus.
func (*PrometheusStatus) DeepCopyInto ¶
func (in *PrometheusStatus) DeepCopyInto(out *PrometheusStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PrometheusTracingConfig ¶ added in v0.66.0
type PrometheusTracingConfig struct { // Client used to export the traces. Supported values are `http` or `grpc`. //+kubebuilder:validation:Enum=http;grpc // +optional ClientType *string `json:"clientType"` // Endpoint to send the traces to. Should be provided in format <host>:<port>. // +kubebuilder:validation:MinLength:=1 // +required Endpoint string `json:"endpoint"` // Sets the probability a given trace will be sampled. Must be a float from 0 through 1. // +optional SamplingFraction *resource.Quantity `json:"samplingFraction"` // If disabled, the client will use a secure connection. // +optional Insecure *bool `json:"insecure"` // Key-value pairs to be used as headers associated with gRPC or HTTP requests. // +optional Headers map[string]string `json:"headers"` // Compression key for supported compression types. The only supported value is `gzip`. //+kubebuilder:validation:Enum=gzip // +optional Compression *string `json:"compression"` // Maximum time the exporter will wait for each batch export. // +optional Timeout *Duration `json:"timeout"` // TLS Config to use when sending traces. // +optional TLSConfig *TLSConfig `json:"tlsConfig"` }
func (*PrometheusTracingConfig) DeepCopy ¶ added in v0.66.0
func (in *PrometheusTracingConfig) DeepCopy() *PrometheusTracingConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusTracingConfig.
func (*PrometheusTracingConfig) DeepCopyInto ¶ added in v0.66.0
func (in *PrometheusTracingConfig) DeepCopyInto(out *PrometheusTracingConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type PrometheusWebSpec ¶ added in v0.58.0
type PrometheusWebSpec struct { WebConfigFileFields `json:",inline"` // The prometheus web page title. // +optional PageTitle *string `json:"pageTitle,omitempty"` // Defines the maximum number of simultaneous connections // A zero value means that Prometheus doesn't accept any incoming connection. // +kubebuilder:validation:Minimum:=0 // +optional MaxConnections *int32 `json:"maxConnections,omitempty"` }
PrometheusWebSpec defines the configuration of the Prometheus web server. +k8s:openapi-gen=true
func (*PrometheusWebSpec) DeepCopy ¶ added in v0.58.0
func (in *PrometheusWebSpec) DeepCopy() *PrometheusWebSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusWebSpec.
func (*PrometheusWebSpec) DeepCopyInto ¶ added in v0.58.0
func (in *PrometheusWebSpec) DeepCopyInto(out *PrometheusWebSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type QuerySpec ¶
type QuerySpec struct { // The delta difference allowed for retrieving metrics during expression evaluations. // +optional LookbackDelta *string `json:"lookbackDelta,omitempty"` // Number of concurrent queries that can be run at once. // +kubebuilder:validation:Minimum:=1 // +optional MaxConcurrency *int32 `json:"maxConcurrency,omitempty"` // Maximum number of samples a single query can load into memory. Note that // queries will fail if they would load more samples than this into memory, // so this also limits the number of samples a query can return. // +optional MaxSamples *int32 `json:"maxSamples,omitempty"` // Maximum time a query may take before being aborted. // +optional Timeout *Duration `json:"timeout,omitempty"` }
QuerySpec defines the query command line flags when starting Prometheus. +k8s:openapi-gen=true
func (*QuerySpec) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QuerySpec.
func (*QuerySpec) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type QueueConfig ¶
type QueueConfig struct { // Capacity is the number of samples to buffer per shard before we start // dropping them. Capacity int `json:"capacity,omitempty"` // MinShards is the minimum number of shards, i.e. amount of concurrency. MinShards int `json:"minShards,omitempty"` // MaxShards is the maximum number of shards, i.e. amount of concurrency. MaxShards int `json:"maxShards,omitempty"` // MaxSamplesPerSend is the maximum number of samples per send. MaxSamplesPerSend int `json:"maxSamplesPerSend,omitempty"` // BatchSendDeadline is the maximum time a sample will wait in buffer. BatchSendDeadline string `json:"batchSendDeadline,omitempty"` // MaxRetries is the maximum number of times to retry a batch on recoverable errors. MaxRetries int `json:"maxRetries,omitempty"` // MinBackoff is the initial retry delay. Gets doubled for every retry. MinBackoff string `json:"minBackoff,omitempty"` // MaxBackoff is the maximum retry delay. MaxBackoff string `json:"maxBackoff,omitempty"` // Retry upon receiving a 429 status code from the remote-write storage. // This is experimental feature and might change in the future. RetryOnRateLimit bool `json:"retryOnRateLimit,omitempty"` }
QueueConfig allows the tuning of remote write's queue_config parameters. This object is referenced in the RemoteWriteSpec object. +k8s:openapi-gen=true
func (*QueueConfig) DeepCopy ¶
func (in *QueueConfig) DeepCopy() *QueueConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new QueueConfig.
func (*QueueConfig) DeepCopyInto ¶
func (in *QueueConfig) DeepCopyInto(out *QueueConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RelabelConfig ¶
type RelabelConfig struct { // The source labels select values from existing labels. Their content is // concatenated using the configured Separator and matched against the // configured regular expression. // // +optional SourceLabels []LabelName `json:"sourceLabels,omitempty"` // Separator is the string between concatenated SourceLabels. Separator string `json:"separator,omitempty"` // Label to which the resulting string is written in a replacement. // // It is mandatory for `Replace`, `HashMod`, `Lowercase`, `Uppercase`, // `KeepEqual` and `DropEqual` actions. // // Regex capture groups are available. TargetLabel string `json:"targetLabel,omitempty"` // Regular expression against which the extracted value is matched. Regex string `json:"regex,omitempty"` // Modulus to take of the hash of the source label values. // // Only applicable when the action is `HashMod`. Modulus uint64 `json:"modulus,omitempty"` // Replacement value against which a Replace action is performed if the // regular expression matches. // // Regex capture groups are available. Replacement string `json:"replacement,omitempty"` // Action to perform based on the regex matching. // // `Uppercase` and `Lowercase` actions require Prometheus >= v2.36.0. // `DropEqual` and `KeepEqual` actions require Prometheus >= v2.41.0. // // Default: "Replace" // // +kubebuilder:validation:Enum=replace;Replace;keep;Keep;drop;Drop;hashmod;HashMod;labelmap;LabelMap;labeldrop;LabelDrop;labelkeep;LabelKeep;lowercase;Lowercase;uppercase;Uppercase;keepequal;KeepEqual;dropequal;DropEqual // +kubebuilder:default=replace Action string `json:"action,omitempty"` }
RelabelConfig allows dynamic rewriting of the label set for targets, alerts, scraped samples and remote write samples.
More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config
+k8s:openapi-gen=true
func (*RelabelConfig) DeepCopy ¶
func (in *RelabelConfig) DeepCopy() *RelabelConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RelabelConfig.
func (*RelabelConfig) DeepCopyInto ¶
func (in *RelabelConfig) DeepCopyInto(out *RelabelConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RemoteReadSpec ¶
type RemoteReadSpec struct { // The URL of the endpoint to query from. URL string `json:"url"` // The name of the remote read queue, it must be unique if specified. The // name is used in metrics and logging in order to differentiate read // configurations. // // It requires Prometheus >= v2.15.0. // Name string `json:"name,omitempty"` // An optional list of equality matchers which have to be present // in a selector to query the remote read endpoint. // +optional RequiredMatchers map[string]string `json:"requiredMatchers,omitempty"` // Timeout for requests to the remote read endpoint. RemoteTimeout Duration `json:"remoteTimeout,omitempty"` // Custom HTTP headers to be sent along with each remote read request. // Be aware that headers that are set by Prometheus itself can't be overwritten. // Only valid in Prometheus versions 2.26.0 and newer. // +optional Headers map[string]string `json:"headers,omitempty"` // Whether reads should be made for queries for time ranges that // the local storage should have complete data for. ReadRecent bool `json:"readRecent,omitempty"` // OAuth2 configuration for the URL. // // It requires Prometheus >= v2.27.0. // // Cannot be set at the same time as `authorization`, or `basicAuth`. // // +optional OAuth2 *OAuth2 `json:"oauth2,omitempty"` // BasicAuth configuration for the URL. // // Cannot be set at the same time as `authorization`, or `oauth2`. // // +optional BasicAuth *BasicAuth `json:"basicAuth,omitempty"` // File from which to read the bearer token for the URL. // // *Deprecated: this will be removed in a future release. Prefer using `authorization`.* BearerTokenFile string `json:"bearerTokenFile,omitempty"` // Authorization section for the URL. // // It requires Prometheus >= v2.26.0. // // Cannot be set at the same time as `basicAuth`, or `oauth2`. // // +optional Authorization *Authorization `json:"authorization,omitempty"` // *Warning: this field shouldn't be used because the token value appears // in clear-text. Prefer using `authorization`.* // // *Deprecated: this will be removed in a future release.* BearerToken string `json:"bearerToken,omitempty"` // TLS Config to use for the URL. // +optional TLSConfig *TLSConfig `json:"tlsConfig,omitempty"` // Optional ProxyURL. ProxyURL string `json:"proxyUrl,omitempty"` // Configure whether HTTP requests follow HTTP 3xx redirects. // // It requires Prometheus >= v2.26.0. // // +optional FollowRedirects *bool `json:"followRedirects,omitempty"` // Whether to use the external labels as selectors for the remote read endpoint. // // It requires Prometheus >= v2.34.0. // // +optional FilterExternalLabels *bool `json:"filterExternalLabels,omitempty"` }
RemoteReadSpec defines the configuration for Prometheus to read back samples from a remote endpoint. +k8s:openapi-gen=true
func (*RemoteReadSpec) DeepCopy ¶
func (in *RemoteReadSpec) DeepCopy() *RemoteReadSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemoteReadSpec.
func (*RemoteReadSpec) DeepCopyInto ¶
func (in *RemoteReadSpec) DeepCopyInto(out *RemoteReadSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RemoteWriteSpec ¶
type RemoteWriteSpec struct { // The URL of the endpoint to send samples to. URL string `json:"url"` // The name of the remote write queue, it must be unique if specified. The // name is used in metrics and logging in order to differentiate queues. // // It requires Prometheus >= v2.15.0. // Name string `json:"name,omitempty"` // Enables sending of exemplars over remote write. Note that // exemplar-storage itself must be enabled using the `spec.enableFeature` // option for exemplars to be scraped in the first place. // // It requires Prometheus >= v2.27.0. // // +optional SendExemplars *bool `json:"sendExemplars,omitempty"` // Enables sending of native histograms, also known as sparse histograms // over remote write. // // It requires Prometheus >= v2.40.0. // // +optional SendNativeHistograms *bool `json:"sendNativeHistograms,omitempty"` // Timeout for requests to the remote write endpoint. RemoteTimeout Duration `json:"remoteTimeout,omitempty"` // Custom HTTP headers to be sent along with each remote write request. // Be aware that headers that are set by Prometheus itself can't be overwritten. // // It requires Prometheus >= v2.25.0. // // +optional Headers map[string]string `json:"headers,omitempty"` // The list of remote write relabel configurations. // +optional WriteRelabelConfigs []RelabelConfig `json:"writeRelabelConfigs,omitempty"` // OAuth2 configuration for the URL. // // It requires Prometheus >= v2.27.0. // // Cannot be set at the same time as `sigv4`, `authorization`, or `basicAuth`. // +optional OAuth2 *OAuth2 `json:"oauth2,omitempty"` // BasicAuth configuration for the URL. // // Cannot be set at the same time as `sigv4`, `authorization`, or `oauth2`. // // +optional BasicAuth *BasicAuth `json:"basicAuth,omitempty"` // File from which to read bearer token for the URL. // // *Deprecated: this will be removed in a future release. Prefer using `authorization`.* BearerTokenFile string `json:"bearerTokenFile,omitempty"` // Authorization section for the URL. // // It requires Prometheus >= v2.26.0. // // Cannot be set at the same time as `sigv4`, `basicAuth`, or `oauth2`. // // +optional Authorization *Authorization `json:"authorization,omitempty"` // Sigv4 allows to configures AWS's Signature Verification 4 for the URL. // // It requires Prometheus >= v2.26.0. // // Cannot be set at the same time as `authorization`, `basicAuth`, or `oauth2`. // // +optional Sigv4 *Sigv4 `json:"sigv4,omitempty"` // *Warning: this field shouldn't be used because the token value appears // in clear-text. Prefer using `authorization`.* // // *Deprecated: this will be removed in a future release.* BearerToken string `json:"bearerToken,omitempty"` // TLS Config to use for the URL. // +optional TLSConfig *TLSConfig `json:"tlsConfig,omitempty"` // Optional ProxyURL. ProxyURL string `json:"proxyUrl,omitempty"` // QueueConfig allows tuning of the remote write queue parameters. // +optional QueueConfig *QueueConfig `json:"queueConfig,omitempty"` // MetadataConfig configures the sending of series metadata to the remote storage. // +optional MetadataConfig *MetadataConfig `json:"metadataConfig,omitempty"` }
RemoteWriteSpec defines the configuration to write samples from Prometheus to a remote endpoint. +k8s:openapi-gen=true
func (*RemoteWriteSpec) DeepCopy ¶
func (in *RemoteWriteSpec) DeepCopy() *RemoteWriteSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RemoteWriteSpec.
func (*RemoteWriteSpec) DeepCopyInto ¶
func (in *RemoteWriteSpec) DeepCopyInto(out *RemoteWriteSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Rule ¶
type Rule struct { // Name of the time series to output to. Must be a valid metric name. // Only one of `record` and `alert` must be set. Record string `json:"record,omitempty"` // Name of the alert. Must be a valid label value. // Only one of `record` and `alert` must be set. Alert string `json:"alert,omitempty"` // PromQL expression to evaluate. Expr intstr.IntOrString `json:"expr"` // Alerts are considered firing once they have been returned for this long. // +optional For *Duration `json:"for,omitempty"` // KeepFiringFor defines how long an alert will continue firing after the condition that triggered it has cleared. // +optional KeepFiringFor *NonEmptyDuration `json:"keep_firing_for,omitempty"` // Labels to add or overwrite. Labels map[string]string `json:"labels,omitempty"` // Annotations to add to each alert. // Only valid for alerting rules. Annotations map[string]string `json:"annotations,omitempty"` }
Rule describes an alerting or recording rule See Prometheus documentation: [alerting](https://www.prometheus.io/docs/prometheus/latest/configuration/alerting_rules/) or [recording](https://www.prometheus.io/docs/prometheus/latest/configuration/recording_rules/#recording-rules) rule +k8s:openapi-gen=true
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 RuleGroup ¶
type RuleGroup struct { // Name of the rule group. // +kubebuilder:validation:MinLength=1 Name string `json:"name"` // Interval determines how often rules in the group are evaluated. // +optional Interval *Duration `json:"interval,omitempty"` // List of alerting and recording rules. // +optional Rules []Rule `json:"rules,omitempty"` // PartialResponseStrategy is only used by ThanosRuler and will // be ignored by Prometheus instances. // More info: https://github.com/thanos-io/thanos/blob/main/docs/components/rule.md#partial-response // +kubebuilder:validation:Pattern="^(?i)(abort|warn)?$" PartialResponseStrategy string `json:"partial_response_strategy,omitempty"` // Limit the number of alerts an alerting rule and series a recording // rule can produce. // Limit is supported starting with Prometheus >= 2.31 and Thanos Ruler >= 0.24. // +optional Limit *int `json:"limit,omitempty"` }
RuleGroup is a list of sequentially evaluated recording and alerting rules. +k8s:openapi-gen=true
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 { // Defines the parameters of the Prometheus rules' engine. // // Any update to these parameters trigger a restart of the pods. Alert RulesAlert `json:"alert,omitempty"` }
+k8s:openapi-gen=true
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.
type RulesAlert ¶
type RulesAlert struct { // Max time to tolerate prometheus outage for restoring 'for' state of // alert. ForOutageTolerance string `json:"forOutageTolerance,omitempty"` // Minimum duration between alert and restored 'for' state. // // This is maintained only for alerts with a configured 'for' time greater // than the grace period. ForGracePeriod string `json:"forGracePeriod,omitempty"` // Minimum amount of time to wait before resending an alert to // Alertmanager. ResendDelay string `json:"resendDelay,omitempty"` }
+k8s:openapi-gen=true
func (*RulesAlert) DeepCopy ¶
func (in *RulesAlert) DeepCopy() *RulesAlert
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RulesAlert.
func (*RulesAlert) DeepCopyInto ¶
func (in *RulesAlert) DeepCopyInto(out *RulesAlert)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type SafeAuthorization ¶ added in v0.50.0
type SafeAuthorization struct { // Defines the authentication type. The value is case-insensitive. // // "Basic" is not a supported value. // // Default: "Bearer" Type string `json:"type,omitempty"` // Selects a key of a Secret in the namespace that contains the credentials for authentication. Credentials *v1.SecretKeySelector `json:"credentials,omitempty"` }
SafeAuthorization specifies a subset of the Authorization struct, that is safe for use because it doesn't provide access to the Prometheus container's filesystem.
+k8s:openapi-gen=true
func (*SafeAuthorization) DeepCopy ¶ added in v0.50.0
func (in *SafeAuthorization) DeepCopy() *SafeAuthorization
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SafeAuthorization.
func (*SafeAuthorization) DeepCopyInto ¶ added in v0.50.0
func (in *SafeAuthorization) DeepCopyInto(out *SafeAuthorization)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SafeAuthorization) Validate ¶ added in v0.50.0
func (c *SafeAuthorization) Validate() error
Validate semantically validates the given Authorization section.
type SafeTLSConfig ¶ added in v0.43.0
type SafeTLSConfig struct { // Certificate authority used when verifying server certificates. CA SecretOrConfigMap `json:"ca,omitempty"` // Client certificate to present when doing client-authentication. Cert SecretOrConfigMap `json:"cert,omitempty"` // Secret containing the client key file for the targets. KeySecret *v1.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"` }
SafeTLSConfig specifies safe TLS configuration parameters. +k8s:openapi-gen=true
func (*SafeTLSConfig) DeepCopy ¶ added in v0.43.0
func (in *SafeTLSConfig) DeepCopy() *SafeTLSConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SafeTLSConfig.
func (*SafeTLSConfig) DeepCopyInto ¶ added in v0.43.0
func (in *SafeTLSConfig) DeepCopyInto(out *SafeTLSConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SafeTLSConfig) Validate ¶ added in v0.43.0
func (c *SafeTLSConfig) Validate() error
Validate semantically validates the given SafeTLSConfig.
type SecretOrConfigMap ¶
type SecretOrConfigMap struct { // Secret containing data to use for the targets. Secret *v1.SecretKeySelector `json:"secret,omitempty"` // ConfigMap containing data to use for the targets. ConfigMap *v1.ConfigMapKeySelector `json:"configMap,omitempty"` }
SecretOrConfigMap allows to specify data as a Secret or ConfigMap. Fields are mutually exclusive.
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.
func (*SecretOrConfigMap) Validate ¶
func (c *SecretOrConfigMap) Validate() error
Validate semantically validates the given TLSConfig.
type SecretOrConfigMapValidationError ¶
type SecretOrConfigMapValidationError struct {
// contains filtered or unexported fields
}
SecretOrConfigMapValidationError is returned by SecretOrConfigMap.Validate() on semantically invalid configurations. +k8s:openapi-gen=false
func (*SecretOrConfigMapValidationError) DeepCopy ¶
func (in *SecretOrConfigMapValidationError) DeepCopy() *SecretOrConfigMapValidationError
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretOrConfigMapValidationError.
func (*SecretOrConfigMapValidationError) DeepCopyInto ¶
func (in *SecretOrConfigMapValidationError) DeepCopyInto(out *SecretOrConfigMapValidationError)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SecretOrConfigMapValidationError) Error ¶
func (e *SecretOrConfigMapValidationError) Error() string
type ServiceMonitor ¶
type ServiceMonitor struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Specification of desired Service selection for target discovery by // Prometheus. Spec ServiceMonitorSpec `json:"spec"` }
ServiceMonitor defines monitoring for a set of services.
func (*ServiceMonitor) DeepCopy ¶
func (in *ServiceMonitor) DeepCopy() *ServiceMonitor
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceMonitor.
func (*ServiceMonitor) DeepCopyInto ¶
func (in *ServiceMonitor) DeepCopyInto(out *ServiceMonitor)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ServiceMonitor) DeepCopyObject ¶
func (l *ServiceMonitor) DeepCopyObject() runtime.Object
DeepCopyObject implements the runtime.Object interface.
type ServiceMonitorList ¶
type ServiceMonitorList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata // More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata,omitempty"` // List of ServiceMonitors Items []*ServiceMonitor `json:"items"` }
ServiceMonitorList is a list of ServiceMonitors. +k8s:openapi-gen=true
func (*ServiceMonitorList) DeepCopy ¶
func (in *ServiceMonitorList) DeepCopy() *ServiceMonitorList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceMonitorList.
func (*ServiceMonitorList) DeepCopyInto ¶
func (in *ServiceMonitorList) DeepCopyInto(out *ServiceMonitorList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ServiceMonitorList) DeepCopyObject ¶
func (l *ServiceMonitorList) DeepCopyObject() runtime.Object
DeepCopyObject implements the runtime.Object interface.
type ServiceMonitorSpec ¶
type ServiceMonitorSpec struct { // JobLabel selects the label from the associated Kubernetes service which will be used as the `job` label for all metrics. // // For example: // If in `ServiceMonitor.spec.jobLabel: foo` and in `Service.metadata.labels.foo: bar`, // then the `job="bar"` label is added to all metrics. // // If the value of this field is empty or if the label doesn't exist for the given Service, the `job` label of the metrics defaults to the name of the Kubernetes Service. JobLabel string `json:"jobLabel,omitempty"` // TargetLabels transfers labels from the Kubernetes `Service` onto the created metrics. TargetLabels []string `json:"targetLabels,omitempty"` // PodTargetLabels transfers labels on the Kubernetes `Pod` onto the created metrics. PodTargetLabels []string `json:"podTargetLabels,omitempty"` // A list of endpoints allowed as part of this ServiceMonitor. Endpoints []Endpoint `json:"endpoints"` // Selector to select Endpoints objects. Selector metav1.LabelSelector `json:"selector"` // Selector to select which namespaces the Kubernetes Endpoints objects are discovered from. NamespaceSelector NamespaceSelector `json:"namespaceSelector,omitempty"` // SampleLimit defines per-scrape limit on number of scraped samples that will be accepted. // +optional SampleLimit *uint64 `json:"sampleLimit,omitempty"` // TargetLimit defines a limit on the number of scraped targets that will be accepted. // +optional TargetLimit *uint64 `json:"targetLimit,omitempty"` // Per-scrape limit on number of labels that will be accepted for a sample. // Only valid in Prometheus versions 2.27.0 and newer. // +optional LabelLimit *uint64 `json:"labelLimit,omitempty"` // Per-scrape limit on length of labels name that will be accepted for a sample. // Only valid in Prometheus versions 2.27.0 and newer. // +optional LabelNameLengthLimit *uint64 `json:"labelNameLengthLimit,omitempty"` // Per-scrape limit on length of labels value that will be accepted for a sample. // Only valid in Prometheus versions 2.27.0 and newer. // +optional LabelValueLengthLimit *uint64 `json:"labelValueLengthLimit,omitempty"` // Per-scrape limit on the number of targets dropped by relabeling // that will be kept in memory. 0 means no limit. // // It requires Prometheus >= v2.47.0. // // +optional KeepDroppedTargets *uint64 `json:"keepDroppedTargets,omitempty"` // Attaches node metadata to discovered targets. // Requires Prometheus v2.37.0 and above. AttachMetadata *AttachMetadata `json:"attachMetadata,omitempty"` }
ServiceMonitorSpec contains specification parameters for a ServiceMonitor. +k8s:openapi-gen=true
func (*ServiceMonitorSpec) DeepCopy ¶
func (in *ServiceMonitorSpec) DeepCopy() *ServiceMonitorSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceMonitorSpec.
func (*ServiceMonitorSpec) DeepCopyInto ¶
func (in *ServiceMonitorSpec) DeepCopyInto(out *ServiceMonitorSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ShardStatus ¶ added in v0.56.0
type ShardStatus struct { // Identifier of the shard. // +required ShardID string `json:"shardID"` // Total number of pods targeted by this shard. Replicas int32 `json:"replicas"` // Total number of non-terminated pods targeted by this shard // that have the desired spec. UpdatedReplicas int32 `json:"updatedReplicas"` // Total number of available pods (ready for at least minReadySeconds) // targeted by this shard. AvailableReplicas int32 `json:"availableReplicas"` UnavailableReplicas int32 `json:"unavailableReplicas"` }
func (*ShardStatus) DeepCopy ¶ added in v0.56.0
func (in *ShardStatus) DeepCopy() *ShardStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ShardStatus.
func (*ShardStatus) DeepCopyInto ¶ added in v0.56.0
func (in *ShardStatus) DeepCopyInto(out *ShardStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type Sigv4 ¶ added in v0.52.0
type Sigv4 struct { // Region is the AWS region. If blank, the region from the default credentials chain used. Region string `json:"region,omitempty"` // AccessKey is the AWS API key. If not specified, the environment variable // `AWS_ACCESS_KEY_ID` is used. // +optional AccessKey *v1.SecretKeySelector `json:"accessKey,omitempty"` // SecretKey is the AWS API secret. If not specified, the environment // variable `AWS_SECRET_ACCESS_KEY` is used. // +optional SecretKey *v1.SecretKeySelector `json:"secretKey,omitempty"` // Profile is the named AWS profile used to authenticate. Profile string `json:"profile,omitempty"` // RoleArn is the named AWS profile used to authenticate. RoleArn string `json:"roleArn,omitempty"` }
Sigv4 optionally configures AWS's Signature Verification 4 signing process to sign requests. +k8s:openapi-gen=true
func (*Sigv4) DeepCopy ¶ added in v0.52.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Sigv4.
func (*Sigv4) DeepCopyInto ¶ added in v0.52.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type StorageSpec ¶
type StorageSpec struct { // *Deprecated: subPath usage will be removed in a future release.* DisableMountSubPath bool `json:"disableMountSubPath,omitempty"` // EmptyDirVolumeSource to be used by the StatefulSet. // If specified, it takes precedence over `ephemeral` and `volumeClaimTemplate`. // More info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir EmptyDir *v1.EmptyDirVolumeSource `json:"emptyDir,omitempty"` // EphemeralVolumeSource to be used by the StatefulSet. // This is a beta field in k8s 1.21 and GA in 1.15. // For lower versions, starting with k8s 1.19, it requires enabling the GenericEphemeralVolume feature gate. // More info: https://kubernetes.io/docs/concepts/storage/ephemeral-volumes/#generic-ephemeral-volumes Ephemeral *v1.EphemeralVolumeSource `json:"ephemeral,omitempty"` // Defines the PVC spec to be used by the Prometheus StatefulSets. // The easiest way to use a volume that cannot be automatically provisioned // is to use a label selector alongside manually created PersistentVolumes. VolumeClaimTemplate EmbeddedPersistentVolumeClaim `json:"volumeClaimTemplate,omitempty"` }
StorageSpec defines the configured storage for a group Prometheus servers. If no storage option is specified, then by default an [EmptyDir](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir) will be used.
If multiple storage options are specified, priority will be given as follows:
- emptyDir
- ephemeral
- volumeClaimTemplate
+k8s:openapi-gen=true
func (*StorageSpec) DeepCopy ¶
func (in *StorageSpec) DeepCopy() *StorageSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageSpec.
func (*StorageSpec) DeepCopyInto ¶
func (in *StorageSpec) DeepCopyInto(out *StorageSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TLSConfig ¶
type TLSConfig struct { SafeTLSConfig `json:",inline"` // Path to the CA cert in the Prometheus container to use for the targets. CAFile string `json:"caFile,omitempty"` // Path to the client cert file in the Prometheus container for the targets. CertFile string `json:"certFile,omitempty"` // Path to the client key file in the Prometheus container for the targets. KeyFile string `json:"keyFile,omitempty"` }
TLSConfig extends the safe TLS configuration with file parameters. +k8s:openapi-gen=true
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 TLSConfigValidationError ¶
type TLSConfigValidationError struct {
// contains filtered or unexported fields
}
TLSConfigValidationError is returned by TLSConfig.Validate() on semantically invalid tls configurations. +k8s:openapi-gen=false
func (*TLSConfigValidationError) DeepCopy ¶
func (in *TLSConfigValidationError) DeepCopy() *TLSConfigValidationError
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSConfigValidationError.
func (*TLSConfigValidationError) DeepCopyInto ¶
func (in *TLSConfigValidationError) DeepCopyInto(out *TLSConfigValidationError)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TLSConfigValidationError) Error ¶
func (e *TLSConfigValidationError) Error() string
type TSDBSpec ¶ added in v0.60.0
type TSDBSpec struct { // Configures how old an out-of-order/out-of-bounds sample can be with // respect to the TSDB max time. // // An out-of-order/out-of-bounds sample is ingested into the TSDB as long as // the timestamp of the sample is >= (TSDB.MaxTime - outOfOrderTimeWindow). // // Out of order ingestion is an experimental feature. // // It requires Prometheus >= v2.39.0. OutOfOrderTimeWindow Duration `json:"outOfOrderTimeWindow,omitempty"` }
func (*TSDBSpec) DeepCopy ¶ added in v0.60.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TSDBSpec.
func (*TSDBSpec) DeepCopyInto ¶ added in v0.60.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ThanosRuler ¶
type ThanosRuler struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` // Specification of the desired behavior of the ThanosRuler cluster. More info: // https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status Spec ThanosRulerSpec `json:"spec"` // Most recent observed status of the ThanosRuler cluster. Read-only. // More info: // https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status Status ThanosRulerStatus `json:"status,omitempty"` }
ThanosRuler defines a ThanosRuler deployment.
func (*ThanosRuler) DeepCopy ¶
func (in *ThanosRuler) DeepCopy() *ThanosRuler
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosRuler.
func (*ThanosRuler) DeepCopyInto ¶
func (in *ThanosRuler) DeepCopyInto(out *ThanosRuler)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ThanosRuler) DeepCopyObject ¶
func (l *ThanosRuler) DeepCopyObject() runtime.Object
DeepCopyObject implements the runtime.Object interface.
func (*ThanosRuler) ExpectedReplicas ¶ added in v0.65.0
func (tr *ThanosRuler) ExpectedReplicas() int
func (*ThanosRuler) SetAvailableReplicas ¶ added in v0.65.0
func (tr *ThanosRuler) SetAvailableReplicas(i int)
func (*ThanosRuler) SetReplicas ¶ added in v0.65.0
func (tr *ThanosRuler) SetReplicas(i int)
func (*ThanosRuler) SetUnavailableReplicas ¶ added in v0.65.0
func (tr *ThanosRuler) SetUnavailableReplicas(i int)
func (*ThanosRuler) SetUpdatedReplicas ¶ added in v0.65.0
func (tr *ThanosRuler) SetUpdatedReplicas(i int)
type ThanosRulerList ¶
type ThanosRulerList struct { metav1.TypeMeta `json:",inline"` // Standard list metadata // More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata metav1.ListMeta `json:"metadata,omitempty"` // List of Prometheuses Items []*ThanosRuler `json:"items"` }
ThanosRulerList is a list of ThanosRulers. +k8s:openapi-gen=true
func (*ThanosRulerList) DeepCopy ¶
func (in *ThanosRulerList) DeepCopy() *ThanosRulerList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosRulerList.
func (*ThanosRulerList) DeepCopyInto ¶
func (in *ThanosRulerList) DeepCopyInto(out *ThanosRulerList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ThanosRulerList) DeepCopyObject ¶
func (l *ThanosRulerList) DeepCopyObject() runtime.Object
DeepCopyObject implements the runtime.Object interface.
type ThanosRulerSpec ¶
type ThanosRulerSpec struct { // Version of Thanos to be deployed. Version string `json:"version,omitempty"` // PodMetadata contains Labels and Annotations gets propagated to the thanos ruler pods. PodMetadata *EmbeddedObjectMetadata `json:"podMetadata,omitempty"` // Thanos container image URL. Image string `json:"image,omitempty"` // Image pull policy for the 'thanos', 'init-config-reloader' and 'config-reloader' containers. // See https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy for more details. // +kubebuilder:validation:Enum="";Always;Never;IfNotPresent ImagePullPolicy v1.PullPolicy `json:"imagePullPolicy,omitempty"` // An optional list of references to secrets in the same namespace // to use for pulling thanos images from registries // see http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets,omitempty"` // When a ThanosRuler deployment is paused, no actions except for deletion // will be performed on the underlying objects. Paused bool `json:"paused,omitempty"` // Number of thanos ruler instances to deploy. Replicas *int32 `json:"replicas,omitempty"` // Define which Nodes the Pods are scheduled on. NodeSelector map[string]string `json:"nodeSelector,omitempty"` // Resources defines the resource requirements for single Pods. // If not provided, no requests/limits will be set Resources v1.ResourceRequirements `json:"resources,omitempty"` // If specified, the pod's scheduling constraints. Affinity *v1.Affinity `json:"affinity,omitempty"` // If specified, the pod's tolerations. Tolerations []v1.Toleration `json:"tolerations,omitempty"` // If specified, the pod's topology spread constraints. TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"` // SecurityContext holds pod-level security attributes and common container settings. // This defaults to the default PodSecurityContext. SecurityContext *v1.PodSecurityContext `json:"securityContext,omitempty"` // Priority class assigned to the Pods PriorityClassName string `json:"priorityClassName,omitempty"` // ServiceAccountName is the name of the ServiceAccount to use to run the // Thanos Ruler Pods. ServiceAccountName string `json:"serviceAccountName,omitempty"` // Storage spec to specify how storage shall be used. Storage *StorageSpec `json:"storage,omitempty"` // Volumes allows configuration of additional volumes on the output StatefulSet definition. Volumes specified will // be appended to other volumes that are generated as a result of StorageSpec objects. Volumes []v1.Volume `json:"volumes,omitempty"` // VolumeMounts allows configuration of additional VolumeMounts on the output StatefulSet definition. // VolumeMounts specified will be appended to other VolumeMounts in the ruler container, // that are generated as a result of StorageSpec objects. VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"` // ObjectStorageConfig configures object storage in Thanos. // Alternative to ObjectStorageConfigFile, and lower order priority. ObjectStorageConfig *v1.SecretKeySelector `json:"objectStorageConfig,omitempty"` // ObjectStorageConfigFile specifies the path of the object storage configuration file. // When used alongside with ObjectStorageConfig, ObjectStorageConfigFile takes precedence. ObjectStorageConfigFile *string `json:"objectStorageConfigFile,omitempty"` // ListenLocal makes the Thanos ruler listen on loopback, so that it // does not bind against the Pod IP. ListenLocal bool `json:"listenLocal,omitempty"` // QueryEndpoints defines Thanos querier endpoints from which to query metrics. // Maps to the --query flag of thanos ruler. QueryEndpoints []string `json:"queryEndpoints,omitempty"` // Define configuration for connecting to thanos query instances. // If this is defined, the QueryEndpoints field will be ignored. // Maps to the `query.config` CLI argument. // Only available with thanos v0.11.0 and higher. QueryConfig *v1.SecretKeySelector `json:"queryConfig,omitempty"` // Define URLs to send alerts to Alertmanager. For Thanos v0.10.0 and higher, // AlertManagersConfig should be used instead. Note: this field will be ignored // if AlertManagersConfig is specified. // Maps to the `alertmanagers.url` arg. AlertManagersURL []string `json:"alertmanagersUrl,omitempty"` // Define configuration for connecting to alertmanager. Only available with thanos v0.10.0 // and higher. Maps to the `alertmanagers.config` arg. AlertManagersConfig *v1.SecretKeySelector `json:"alertmanagersConfig,omitempty"` // A label selector to select which PrometheusRules to mount for alerting and // recording. RuleSelector *metav1.LabelSelector `json:"ruleSelector,omitempty"` // Namespaces to be selected for Rules discovery. If unspecified, only // the same namespace as the ThanosRuler object is in is used. RuleNamespaceSelector *metav1.LabelSelector `json:"ruleNamespaceSelector,omitempty"` // EnforcedNamespaceLabel enforces adding a namespace label of origin for each alert // and metric that is user created. The label value will always be the namespace of the object that is // being created. EnforcedNamespaceLabel string `json:"enforcedNamespaceLabel,omitempty"` // List of references to PrometheusRule objects // to be excluded from enforcing a namespace label of origin. // Applies only if enforcedNamespaceLabel set to true. ExcludedFromEnforcement []ObjectReference `json:"excludedFromEnforcement,omitempty"` // PrometheusRulesExcludedFromEnforce - list of Prometheus rules to be excluded from enforcing // of adding namespace labels. Works only if enforcedNamespaceLabel set to true. // Make sure both ruleNamespace and ruleName are set for each pair // Deprecated: use excludedFromEnforcement instead. PrometheusRulesExcludedFromEnforce []PrometheusRuleExcludeConfig `json:"prometheusRulesExcludedFromEnforce,omitempty"` // Log level for ThanosRuler to be configured with. //+kubebuilder:validation:Enum="";debug;info;warn;error LogLevel string `json:"logLevel,omitempty"` // Log format for ThanosRuler to be configured with. //+kubebuilder:validation:Enum="";logfmt;json LogFormat string `json:"logFormat,omitempty"` // Port name used for the pods and governing service. // Defaults to `web`. // +kubebuilder:default:="web" PortName string `json:"portName,omitempty"` // Interval between consecutive evaluations. // +kubebuilder:default:="15s" EvaluationInterval Duration `json:"evaluationInterval,omitempty"` // Time duration ThanosRuler shall retain data for. Default is '24h', // and must match the regular expression `[0-9]+(ms|s|m|h|d|w|y)` (milliseconds seconds minutes hours days weeks years). // +kubebuilder:default:="24h" Retention Duration `json:"retention,omitempty"` // Containers allows injecting additional containers or modifying operator generated // containers. This can be used to allow adding an authentication proxy to a ThanosRuler pod or // to change the behavior of an operator generated container. Containers described here modify // an operator generated container if they share the same name and modifications are done via a // strategic merge patch. The current container names are: `thanos-ruler` and `config-reloader`. // Overriding containers is entirely outside the scope of what the maintainers will support and by doing // so, you accept that this behaviour may break at any time without notice. Containers []v1.Container `json:"containers,omitempty"` // InitContainers allows adding initContainers to the pod definition. Those can be used to e.g. // fetch secrets for injection into the ThanosRuler configuration from external sources. Any // errors during the execution of an initContainer will lead to a restart of the Pod. // More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ // Using initContainers for any use case other then secret fetching is entirely outside the scope // of what the maintainers will support and by doing so, you accept that this behaviour may break // at any time without notice. InitContainers []v1.Container `json:"initContainers,omitempty"` // TracingConfig configures tracing in Thanos. This is an experimental feature, it may change in any upcoming release in a breaking way. TracingConfig *v1.SecretKeySelector `json:"tracingConfig,omitempty"` // TracingConfig specifies the path of the tracing configuration file. // When used alongside with TracingConfig, TracingConfigFile takes precedence. TracingConfigFile string `json:"tracingConfigFile,omitempty"` // Labels configure the external label pairs to ThanosRuler. A default replica label // `thanos_ruler_replica` will be always added as a label with the value of the pod's name and it will be dropped in the alerts. Labels map[string]string `json:"labels,omitempty"` // AlertDropLabels configure the label names which should be dropped in ThanosRuler alerts. // The replica label `thanos_ruler_replica` will always be dropped in alerts. AlertDropLabels []string `json:"alertDropLabels,omitempty"` // The external URL the Thanos Ruler instances will be available under. This is // necessary to generate correct URLs. This is necessary if Thanos Ruler is not // served from root of a DNS name. ExternalPrefix string `json:"externalPrefix,omitempty"` // The route prefix ThanosRuler registers HTTP handlers for. This allows thanos UI to be served on a sub-path. RoutePrefix string `json:"routePrefix,omitempty"` // GRPCServerTLSConfig configures the gRPC server from which Thanos Querier reads // recorded rule data. // Note: Currently only the CAFile, CertFile, and KeyFile fields are supported. // Maps to the '--grpc-server-tls-*' CLI args. GRPCServerTLSConfig *TLSConfig `json:"grpcServerTlsConfig,omitempty"` // The external Query URL the Thanos Ruler will set in the 'Source' field // of all alerts. // Maps to the '--alert.query-url' CLI arg. AlertQueryURL string `json:"alertQueryUrl,omitempty"` // Minimum number of seconds for which a newly created pod should be ready // without any of its container crashing for it to be considered available. // Defaults to 0 (pod will be considered available as soon as it is ready) // This is an alpha field from kubernetes 1.22 until 1.24 which requires enabling the StatefulSetMinReadySeconds feature gate. // +optional MinReadySeconds *uint32 `json:"minReadySeconds,omitempty"` // AlertRelabelConfigs configures alert relabeling in ThanosRuler. // Alert relabel configurations must have the form as specified in the official Prometheus documentation: // https://prometheus.io/docs/prometheus/latest/configuration/configuration/#alert_relabel_configs // Alternative to AlertRelabelConfigFile, and lower order priority. AlertRelabelConfigs *v1.SecretKeySelector `json:"alertRelabelConfigs,omitempty"` // AlertRelabelConfigFile specifies the path of the alert relabeling configuration file. // When used alongside with AlertRelabelConfigs, alertRelabelConfigFile takes precedence. AlertRelabelConfigFile *string `json:"alertRelabelConfigFile,omitempty"` // Pods' hostAliases configuration // +listType=map // +listMapKey=ip HostAliases []HostAlias `json:"hostAliases,omitempty"` // AdditionalArgs allows setting additional arguments for the ThanosRuler container. // It is intended for e.g. activating hidden flags which are not supported by // the dedicated configuration options yet. The arguments are passed as-is to the // ThanosRuler container which may cause issues if they are invalid or not supported // by the given ThanosRuler version. // In case of an argument conflict (e.g. an argument which is already set by the // operator itself) or when providing an invalid argument the reconciliation will // fail and an error will be logged. AdditionalArgs []Argument `json:"additionalArgs,omitempty"` }
ThanosRulerSpec is a specification of the desired behavior of the ThanosRuler. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status +k8s:openapi-gen=true
func (*ThanosRulerSpec) DeepCopy ¶
func (in *ThanosRulerSpec) DeepCopy() *ThanosRulerSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosRulerSpec.
func (*ThanosRulerSpec) DeepCopyInto ¶
func (in *ThanosRulerSpec) DeepCopyInto(out *ThanosRulerSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ThanosRulerStatus ¶
type ThanosRulerStatus struct { // Represents whether any actions on the underlying managed objects are // being performed. Only delete actions will be performed. Paused bool `json:"paused"` // Total number of non-terminated pods targeted by this ThanosRuler deployment // (their labels match the selector). Replicas int32 `json:"replicas"` // Total number of non-terminated pods targeted by this ThanosRuler deployment // that have the desired version spec. UpdatedReplicas int32 `json:"updatedReplicas"` // Total number of available pods (ready for at least minReadySeconds) // targeted by this ThanosRuler deployment. AvailableReplicas int32 `json:"availableReplicas"` UnavailableReplicas int32 `json:"unavailableReplicas"` // The current state of the Alertmanager object. // +listType=map // +listMapKey=type // +optional Conditions []Condition `json:"conditions,omitempty"` }
ThanosRulerStatus is the most recent observed status of the ThanosRuler. Read-only. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status +k8s:openapi-gen=true
func (*ThanosRulerStatus) DeepCopy ¶
func (in *ThanosRulerStatus) DeepCopy() *ThanosRulerStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosRulerStatus.
func (*ThanosRulerStatus) DeepCopyInto ¶
func (in *ThanosRulerStatus) DeepCopyInto(out *ThanosRulerStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ThanosSpec ¶
type ThanosSpec struct { // Container image name for Thanos. If specified, it takes precedence over // the `spec.thanos.baseImage`, `spec.thanos.tag` and `spec.thanos.sha` // fields. // // Specifying `spec.thanos.version` is still necessary to ensure the // Prometheus Operator knows which version of Thanos is being configured. // // If neither `spec.thanos.image` nor `spec.thanos.baseImage` are defined, // the operator will use the latest upstream version of Thanos available at // the time when the operator was released. // // +optional Image *string `json:"image,omitempty"` // Version of Thanos being deployed. The operator uses this information // to generate the Prometheus StatefulSet + configuration files. // // If not specified, the operator assumes the latest upstream release of // Thanos available at the time when the version of the operator was // released. // // +optional Version *string `json:"version,omitempty"` // *Deprecated: use 'image' instead. The image's tag can be specified as // part of the image name.* // +optional Tag *string `json:"tag,omitempty"` // *Deprecated: use 'image' instead. The image digest can be specified // as part of the image name.* // +optional SHA *string `json:"sha,omitempty"` // *Deprecated: use 'image' instead.* // +optional BaseImage *string `json:"baseImage,omitempty"` // Defines the resources requests and limits of the Thanos sidecar. Resources v1.ResourceRequirements `json:"resources,omitempty"` // Defines the Thanos sidecar's configuration to upload TSDB blocks to object storage. // // More info: https://thanos.io/tip/thanos/storage.md/ // // objectStorageConfigFile takes precedence over this field. // +optional ObjectStorageConfig *v1.SecretKeySelector `json:"objectStorageConfig,omitempty"` // Defines the Thanos sidecar's configuration file to upload TSDB blocks to object storage. // // More info: https://thanos.io/tip/thanos/storage.md/ // // This field takes precedence over objectStorageConfig. // +optional ObjectStorageConfigFile *string `json:"objectStorageConfigFile,omitempty"` // *Deprecated: use `grpcListenLocal` and `httpListenLocal` instead.* ListenLocal bool `json:"listenLocal,omitempty"` // When true, the Thanos sidecar listens on the loopback interface instead // of the Pod IP's address for the gRPC endpoints. // // It has no effect if `listenLocal` is true. GRPCListenLocal bool `json:"grpcListenLocal,omitempty"` // When true, the Thanos sidecar listens on the loopback interface instead // of the Pod IP's address for the HTTP endpoints. // // It has no effect if `listenLocal` is true. HTTPListenLocal bool `json:"httpListenLocal,omitempty"` // Defines the tracing configuration for the Thanos sidecar. // // More info: https://thanos.io/tip/thanos/tracing.md/ // // This is an experimental feature, it may change in any upcoming release // in a breaking way. // // tracingConfigFile takes precedence over this field. // +optional TracingConfig *v1.SecretKeySelector `json:"tracingConfig,omitempty"` // Defines the tracing configuration file for the Thanos sidecar. // // More info: https://thanos.io/tip/thanos/tracing.md/ // // This is an experimental feature, it may change in any upcoming release // in a breaking way. // // This field takes precedence over tracingConfig. TracingConfigFile string `json:"tracingConfigFile,omitempty"` // Configures the TLS parameters for the gRPC server providing the StoreAPI. // // Note: Currently only the `caFile`, `certFile`, and `keyFile` fields are supported. // // +optional GRPCServerTLSConfig *TLSConfig `json:"grpcServerTlsConfig,omitempty"` // Log level for the Thanos sidecar. //+kubebuilder:validation:Enum="";debug;info;warn;error LogLevel string `json:"logLevel,omitempty"` // Log format for the Thanos sidecar. //+kubebuilder:validation:Enum="";logfmt;json LogFormat string `json:"logFormat,omitempty"` // Defines the start of time range limit served by the Thanos sidecar's StoreAPI. // The field's value should be a constant time in RFC3339 format or a time // duration relative to current time, such as -1d or 2h45m. Valid duration // units are ms, s, m, h, d, w, y. MinTime string `json:"minTime,omitempty"` // BlockDuration controls the size of TSDB blocks produced by Prometheus. // The default value is 2h to match the upstream Prometheus defaults. // // WARNING: Changing the block duration can impact the performance and // efficiency of the entire Prometheus/Thanos stack due to how it interacts // with memory and Thanos compactors. It is recommended to keep this value // set to a multiple of 120 times your longest scrape or rule interval. For // example, 30s * 120 = 1h. // // +kubebuilder:default:="2h" BlockDuration Duration `json:"blockSize,omitempty"` // ReadyTimeout is the maximum time that the Thanos sidecar will wait for // Prometheus to start. ReadyTimeout Duration `json:"readyTimeout,omitempty"` // How often to retrieve the Prometheus configuration. GetConfigInterval Duration `json:"getConfigInterval,omitempty"` // Maximum time to wait when retrieving the Prometheus configuration. GetConfigTimeout Duration `json:"getConfigTimeout,omitempty"` // VolumeMounts allows configuration of additional VolumeMounts for Thanos. // VolumeMounts specified will be appended to other VolumeMounts in the // 'thanos-sidecar' container. // +optional VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"` // AdditionalArgs allows setting additional arguments for the Thanos container. // The arguments are passed as-is to the Thanos container which may cause issues // if they are invalid or not supported the given Thanos version. // In case of an argument conflict (e.g. an argument which is already set by the // operator itself) or when providing an invalid argument, the reconciliation will // fail and an error will be logged. // +optional AdditionalArgs []Argument `json:"additionalArgs,omitempty"` }
ThanosSpec defines the configuration of the Thanos sidecar. +k8s:openapi-gen=true
func (*ThanosSpec) DeepCopy ¶
func (in *ThanosSpec) DeepCopy() *ThanosSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ThanosSpec.
func (*ThanosSpec) DeepCopyInto ¶
func (in *ThanosSpec) DeepCopyInto(out *ThanosSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WebConfigFileFields ¶ added in v0.59.0
type WebConfigFileFields struct { // Defines the TLS parameters for HTTPS. TLSConfig *WebTLSConfig `json:"tlsConfig,omitempty"` // Defines HTTP parameters for web server. HTTPConfig *WebHTTPConfig `json:"httpConfig,omitempty"` }
WebConfigFileFields defines the file content for --web.config.file flag. +k8s:deepcopy-gen=true
func (*WebConfigFileFields) DeepCopy ¶ added in v0.59.0
func (in *WebConfigFileFields) DeepCopy() *WebConfigFileFields
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebConfigFileFields.
func (*WebConfigFileFields) DeepCopyInto ¶ added in v0.59.0
func (in *WebConfigFileFields) DeepCopyInto(out *WebConfigFileFields)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WebHTTPConfig ¶ added in v0.59.0
type WebHTTPConfig struct { // Enable HTTP/2 support. Note that HTTP/2 is only supported with TLS. // When TLSConfig is not configured, HTTP/2 will be disabled. // Whenever the value of the field changes, a rolling update will be triggered. HTTP2 *bool `json:"http2,omitempty"` // List of headers that can be added to HTTP responses. Headers *WebHTTPHeaders `json:"headers,omitempty"` }
WebHTTPConfig defines HTTP parameters for web server. +k8s:openapi-gen=true
func (*WebHTTPConfig) DeepCopy ¶ added in v0.59.0
func (in *WebHTTPConfig) DeepCopy() *WebHTTPConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebHTTPConfig.
func (*WebHTTPConfig) DeepCopyInto ¶ added in v0.59.0
func (in *WebHTTPConfig) DeepCopyInto(out *WebHTTPConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WebHTTPHeaders ¶ added in v0.59.0
type WebHTTPHeaders struct { // Set the Content-Security-Policy header to HTTP responses. // Unset if blank. ContentSecurityPolicy string `json:"contentSecurityPolicy,omitempty"` // Set the X-Frame-Options header to HTTP responses. // Unset if blank. Accepted values are deny and sameorigin. // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Frame-Options //+kubebuilder:validation:Enum="";Deny;SameOrigin XFrameOptions string `json:"xFrameOptions,omitempty"` // Set the X-Content-Type-Options header to HTTP responses. // Unset if blank. Accepted value is nosniff. // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Content-Type-Options //+kubebuilder:validation:Enum="";NoSniff XContentTypeOptions string `json:"xContentTypeOptions,omitempty"` // Set the X-XSS-Protection header to all responses. // Unset if blank. // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-XSS-Protection XXSSProtection string `json:"xXSSProtection,omitempty"` // Set the Strict-Transport-Security header to HTTP responses. // Unset if blank. // Please make sure that you use this with care as this header might force // browsers to load Prometheus and the other applications hosted on the same // domain and subdomains over HTTPS. // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Strict-Transport-Security StrictTransportSecurity string `json:"strictTransportSecurity,omitempty"` }
WebHTTPHeaders defines the list of headers that can be added to HTTP responses. +k8s:openapi-gen=true
func (*WebHTTPHeaders) DeepCopy ¶ added in v0.59.0
func (in *WebHTTPHeaders) DeepCopy() *WebHTTPHeaders
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebHTTPHeaders.
func (*WebHTTPHeaders) DeepCopyInto ¶ added in v0.59.0
func (in *WebHTTPHeaders) DeepCopyInto(out *WebHTTPHeaders)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WebTLSConfig ¶ added in v0.49.0
type WebTLSConfig struct { // Secret containing the TLS key for the server. KeySecret v1.SecretKeySelector `json:"keySecret"` // Contains the TLS certificate for the server. Cert SecretOrConfigMap `json:"cert"` // Server policy for client authentication. Maps to ClientAuth Policies. // For more detail on clientAuth options: // https://golang.org/pkg/crypto/tls/#ClientAuthType ClientAuthType string `json:"clientAuthType,omitempty"` // Contains the CA certificate for client certificate authentication to the server. ClientCA SecretOrConfigMap `json:"client_ca,omitempty"` // Minimum TLS version that is acceptable. Defaults to TLS12. MinVersion string `json:"minVersion,omitempty"` // Maximum TLS version that is acceptable. Defaults to TLS13. MaxVersion string `json:"maxVersion,omitempty"` // List of supported cipher suites for TLS versions up to TLS 1.2. If empty, // Go default cipher suites are used. Available cipher suites are documented // in the go documentation: https://golang.org/pkg/crypto/tls/#pkg-constants CipherSuites []string `json:"cipherSuites,omitempty"` // Controls whether the server selects the // client's most preferred cipher suite, or the server's most preferred // cipher suite. If true then the server's preference, as expressed in // the order of elements in cipherSuites, is used. PreferServerCipherSuites *bool `json:"preferServerCipherSuites,omitempty"` // Elliptic curves that will be used in an ECDHE handshake, in preference // order. Available curves are documented in the go documentation: // https://golang.org/pkg/crypto/tls/#CurveID CurvePreferences []string `json:"curvePreferences,omitempty"` }
WebTLSConfig defines the TLS parameters for HTTPS. +k8s:openapi-gen=true
func (*WebTLSConfig) DeepCopy ¶ added in v0.49.0
func (in *WebTLSConfig) DeepCopy() *WebTLSConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTLSConfig.
func (*WebTLSConfig) DeepCopyInto ¶ added in v0.49.0
func (in *WebTLSConfig) DeepCopyInto(out *WebTLSConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WebTLSConfig) Validate ¶ added in v0.49.0
func (c *WebTLSConfig) Validate() error
type WebTLSConfigError ¶ added in v0.49.0
type WebTLSConfigError struct {
// contains filtered or unexported fields
}
WebTLSConfigError is returned by WebTLSConfig.Validate() on semantically invalid configurations. +k8s:openapi-gen=false
func (*WebTLSConfigError) DeepCopy ¶ added in v0.49.0
func (in *WebTLSConfigError) DeepCopy() *WebTLSConfigError
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebTLSConfigError.
func (*WebTLSConfigError) DeepCopyInto ¶ added in v0.49.0
func (in *WebTLSConfigError) DeepCopyInto(out *WebTLSConfigError)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*WebTLSConfigError) Error ¶ added in v0.49.0
func (e *WebTLSConfigError) Error() string