v1alpha1

package
v0.73.2 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 13 Imported by: 67

Documentation

Index

Constants

View Source
const (
	Version = "v1alpha1"

	AlertmanagerConfigKind    = "AlertmanagerConfig"
	AlertmanagerConfigName    = "alertmanagerconfigs"
	AlertmanagerConfigKindKey = "alertmanagerconfig"
)
View Source
const (
	PrometheusAgentsKind   = "PrometheusAgent"
	PrometheusAgentName    = "prometheusagents"
	PrometheusAgentKindKey = "prometheusagent"
)
View Source
const (
	ScrapeConfigsKind   = "ScrapeConfig"
	ScrapeConfigName    = "scrapeconfigs"
	ScrapeConfigKindKey = "scrapeconfig"
)

Variables

View Source
var (
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	AddToScheme = localSchemeBuilder.AddToScheme
)
View Source
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 AlertmanagerConfig

type AlertmanagerConfig struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec AlertmanagerConfigSpec `json:"spec"`
}

AlertmanagerConfig configures the Prometheus Alertmanager, specifying how alerts should be grouped, inhibited and notified to external systems.

func (*AlertmanagerConfig) DeepCopy

func (in *AlertmanagerConfig) DeepCopy() *AlertmanagerConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerConfig.

func (*AlertmanagerConfig) DeepCopyInto

func (in *AlertmanagerConfig) DeepCopyInto(out *AlertmanagerConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AlertmanagerConfig) DeepCopyObject

func (l *AlertmanagerConfig) DeepCopyObject() runtime.Object

DeepCopyObject implements the runtime.Object interface.

func (*AlertmanagerConfig) Hub added in v0.57.0

func (*AlertmanagerConfig) Hub()

Hub marks this type as a conversion hub.

type AlertmanagerConfigList

type AlertmanagerConfigList 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 AlertmanagerConfig
	Items []*AlertmanagerConfig `json:"items"`
}

AlertmanagerConfigList is a list of AlertmanagerConfig. +k8s:openapi-gen=true

func (*AlertmanagerConfigList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerConfigList.

func (*AlertmanagerConfigList) DeepCopyInto

func (in *AlertmanagerConfigList) DeepCopyInto(out *AlertmanagerConfigList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AlertmanagerConfigList) DeepCopyObject

func (l *AlertmanagerConfigList) DeepCopyObject() runtime.Object

DeepCopyObject implements the runtime.Object interface.

type AlertmanagerConfigSpec

type AlertmanagerConfigSpec struct {
	// The Alertmanager route definition for alerts matching the resource's
	// namespace. If present, it will be added to the generated Alertmanager
	// configuration as a first-level route.
	// +optional
	Route *Route `json:"route"`
	// List of receivers.
	// +optional
	Receivers []Receiver `json:"receivers"`
	// List of inhibition rules. The rules will only apply to alerts matching
	// the resource's namespace.
	// +optional
	InhibitRules []InhibitRule `json:"inhibitRules,omitempty"`
	// List of MuteTimeInterval specifying when the routes should be muted.
	// +optional
	MuteTimeIntervals []MuteTimeInterval `json:"muteTimeIntervals,omitempty"`
}

AlertmanagerConfigSpec is a specification of the desired behavior of the Alertmanager configuration. By definition, the Alertmanager configuration only applies to alerts for which the `namespace` label is equal to the namespace of the AlertmanagerConfig resource.

func (*AlertmanagerConfigSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerConfigSpec.

func (*AlertmanagerConfigSpec) DeepCopyInto

func (in *AlertmanagerConfigSpec) DeepCopyInto(out *AlertmanagerConfigSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AttachMetadata added in v0.71.0

type AttachMetadata struct {
	// Attaches node metadata to discovered targets.
	// When set to true, Prometheus must have the `get` permission on the
	// `Nodes` objects.
	// Only valid for Pod, Endpoint and Endpointslice roles.
	//
	// +optional
	Node *bool `json:"node,omitempty"`
}

func (*AttachMetadata) DeepCopy added in v0.71.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.71.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 AzureSDConfig added in v0.70.0

type AzureSDConfig struct {
	// The Azure environment.
	// +optional
	Environment *string `json:"environment,omitempty"`
	// # The authentication method, either OAuth or ManagedIdentity.
	// See https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview
	// +kubebuilder:validation:Enum=OAuth;ManagedIdentity
	// +optional
	AuthenticationMethod *string `json:"authenticationMethod,omitempty"`
	// The subscription ID. Always required.
	// +kubebuilder:validation:MinLength=1
	// +required
	SubscriptionID string `json:"subscriptionID"`
	// Optional tenant ID. Only required with the OAuth authentication method.
	// +optional
	TenantID *string `json:"tenantID,omitempty"`
	// Optional client ID. Only required with the OAuth authentication method.
	// +optional
	ClientID *string `json:"clientID,omitempty"`
	// Optional client secret. Only required with the OAuth authentication method.
	// +optional
	ClientSecret *corev1.SecretKeySelector `json:"clientSecret,omitempty"`
	// Optional resource group name. Limits discovery to this resource group.
	// +optional
	ResourceGroup *string `json:"resourceGroup,omitempty"`
	// RefreshInterval configures the refresh interval at which Prometheus will re-read the instance list.
	// +optional
	RefreshInterval *v1.Duration `json:"refreshInterval,omitempty"`
	// The port to scrape metrics from. If using the public IP address, this must
	// instead be specified in the relabeling rule.
	// +optional
	Port *int `json:"port"`
}

AzureSDConfig allow retrieving scrape targets from Azure VMs. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#azure_sd_config +k8s:openapi-gen=true

func (*AzureSDConfig) DeepCopy added in v0.70.0

func (in *AzureSDConfig) DeepCopy() *AzureSDConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AzureSDConfig.

func (*AzureSDConfig) DeepCopyInto added in v0.70.0

func (in *AzureSDConfig) DeepCopyInto(out *AzureSDConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ConsulSDConfig added in v0.67.0

type ConsulSDConfig struct {
	// A valid string consisting of a hostname or IP followed by an optional port number.
	// +kubebuilder:validation:MinLength=1
	// +required
	Server string `json:"server"`
	// Consul ACL TokenRef, if not provided it will use the ACL from the local Consul Agent.
	// +optional
	TokenRef *corev1.SecretKeySelector `json:"tokenRef,omitempty"`
	// Consul Datacenter name, if not provided it will use the local Consul Agent Datacenter.
	// +optional
	Datacenter *string `json:"datacenter,omitempty"`
	// Namespaces are only supported in Consul Enterprise.
	// +optional
	Namespace *string `json:"namespace,omitempty"`
	// Admin Partitions are only supported in Consul Enterprise.
	// +optional
	Partition *string `json:"partition,omitempty"`
	// HTTP Scheme default "http"
	// +kubebuilder:validation:Enum=HTTP;HTTPS
	// +optional
	Scheme *string `json:"scheme,omitempty"`
	// A list of services for which targets are retrieved. If omitted, all services are scraped.
	// +listType:=atomic
	// +optional
	Services []string `json:"services,omitempty"`
	// An optional list of tags used to filter nodes for a given service. Services must contain all tags in the list.
	//+listType:=atomic
	// +optional
	Tags []string `json:"tags,omitempty"`
	// The string by which Consul tags are joined into the tag label.
	// If unset, Prometheus uses its default value.
	// +optional
	TagSeparator *string `json:"tagSeparator,omitempty"`
	// Node metadata key/value pairs to filter nodes for a given service.
	// +mapType:=atomic
	// +optional
	NodeMeta map[string]string `json:"nodeMeta,omitempty"`
	// Allow stale Consul results (see https://www.consul.io/api/features/consistency.html). Will reduce load on Consul.
	// If unset, Prometheus uses its default value.
	// +optional
	AllowStale *bool `json:"allowStale,omitempty"`
	// The time after which the provided names are refreshed.
	// On large setup it might be a good idea to increase this value because the catalog will change all the time.
	// If unset, Prometheus uses its default value.
	// +optional
	RefreshInterval *v1.Duration `json:"refreshInterval,omitempty"`
	// BasicAuth information to authenticate against the Consul Server.
	// More info: https://prometheus.io/docs/operating/configuration/#endpoints
	// +optional
	BasicAuth *v1.BasicAuth `json:"basicAuth,omitempty"`
	// Authorization header configuration to authenticate against the Consul Server.
	// +optional
	Authorization *v1.SafeAuthorization `json:"authorization,omitempty"`
	// Optional OAuth 2.0 configuration.
	// +optional
	Oauth2 *v1.OAuth2 `json:"oauth2,omitempty"`
	// ProxyConfig allows customizing the proxy behaviour for this scrape config.
	// +optional
	v1.ProxyConfig `json:",inline"`
	// Configure whether HTTP requests follow HTTP 3xx redirects.
	// If unset, Prometheus uses its default value.
	// +optional
	FollowRedirects *bool `json:"followRedirects,omitempty"`
	// Whether to enable HTTP2.
	// If unset, Prometheus uses its default value.
	// +optional
	EnableHttp2 *bool `json:"enableHTTP2,omitempty"`
	// TLS Config
	// +optional
	TLSConfig *v1.SafeTLSConfig `json:"tlsConfig,omitempty"`
}

ConsulSDConfig defines a Consul service discovery configuration See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#consul_sd_config +k8s:openapi-gen=true

func (*ConsulSDConfig) DeepCopy added in v0.67.0

func (in *ConsulSDConfig) DeepCopy() *ConsulSDConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConsulSDConfig.

func (*ConsulSDConfig) DeepCopyInto added in v0.67.0

func (in *ConsulSDConfig) DeepCopyInto(out *ConsulSDConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DNSSDConfig added in v0.68.0

type DNSSDConfig struct {
	// A list of DNS domain names to be queried.
	// +kubebuilder:validation:MinItems:=1
	Names []string `json:"names"`
	// RefreshInterval configures the time after which the provided names are refreshed.
	// If not set, Prometheus uses its default value.
	// +optional
	RefreshInterval *v1.Duration `json:"refreshInterval,omitempty"`
	// The type of DNS query to perform. One of SRV, A, AAAA, MX or NS.
	// If not set, Prometheus uses its default value.
	//
	// When set to NS, It requires Prometheus >= 2.49.0.
	//
	// +kubebuilder:validation:Enum=SRV;A;AAAA;MX;NS
	// +optional
	Type *string `json:"type"`
	// The port number used if the query type is not SRV
	// Ignored for SRV records
	// +optional
	Port *int `json:"port"`
}

DNSSDConfig allows specifying a set of DNS domain names which are periodically queried to discover a list of targets. The DNS servers to be contacted are read from /etc/resolv.conf. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#dns_sd_config +k8s:openapi-gen=true

func (*DNSSDConfig) DeepCopy added in v0.68.0

func (in *DNSSDConfig) DeepCopy() *DNSSDConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DNSSDConfig.

func (*DNSSDConfig) DeepCopyInto added in v0.68.0

func (in *DNSSDConfig) DeepCopyInto(out *DNSSDConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DayOfMonthRange added in v0.53.0

type DayOfMonthRange struct {
	// Start of the inclusive range
	// +kubebuilder:validation:Minimum=-31
	// +kubebuilder:validation:Maximum=31
	Start int `json:"start,omitempty"`
	// End of the inclusive range
	// +kubebuilder:validation:Minimum=-31
	// +kubebuilder:validation:Maximum=31
	End int `json:"end,omitempty"`
}

DayOfMonthRange is an inclusive range of days of the month beginning at 1

func (*DayOfMonthRange) DeepCopy added in v0.53.0

func (in *DayOfMonthRange) DeepCopy() *DayOfMonthRange

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DayOfMonthRange.

func (*DayOfMonthRange) DeepCopyInto added in v0.53.0

func (in *DayOfMonthRange) DeepCopyInto(out *DayOfMonthRange)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (DayOfMonthRange) Validate added in v0.53.0

func (r DayOfMonthRange) Validate() error

Validate the DayOfMonthRange

type DigitalOceanSDConfig added in v0.72.0

type DigitalOceanSDConfig struct {
	// Authorization header configuration to authenticate against the DigitalOcean API.
	// Cannot be set at the same time as `oauth2`.
	// +optional
	Authorization *v1.SafeAuthorization `json:"authorization,omitempty"`
	// Optional OAuth 2.0 configuration.
	// Cannot be set at the same time as `authorization`.
	// +optional
	OAuth2 *v1.OAuth2 `json:"oauth2,omitempty"`
	// ProxyConfig allows customizing the proxy behaviour for this scrape config.
	// +optional
	v1.ProxyConfig `json:",inline"`
	// Configure whether HTTP requests follow HTTP 3xx redirects.
	// +optional
	FollowRedirects *bool `json:"followRedirects,omitempty"`
	// Whether to enable HTTP2.
	// +optional
	EnableHTTP2 *bool `json:"enableHTTP2,omitempty"`
	// TLS configuration applying to the target HTTP endpoint.
	// +optional
	TLSConfig *v1.SafeTLSConfig `json:"tlsConfig,omitempty"`
	// The port to scrape metrics from.
	// +optional
	Port *int `json:"port,omitempty"`
	// Refresh interval to re-read the instance list.
	// +optional
	RefreshInterval *v1.Duration `json:"refreshInterval,omitempty"`
}

DigitalOceanSDConfig allow retrieving scrape targets from DigitalOcean's Droplets API. This service discovery uses the public IPv4 address by default, by that can be changed with relabeling See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#digitalocean_sd_config +k8s:openapi-gen=true

func (*DigitalOceanSDConfig) DeepCopy added in v0.72.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DigitalOceanSDConfig.

func (*DigitalOceanSDConfig) DeepCopyInto added in v0.72.0

func (in *DigitalOceanSDConfig) DeepCopyInto(out *DigitalOceanSDConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DiscordConfig added in v0.67.0

type DiscordConfig struct {
	// Whether or not to notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"sendResolved,omitempty"`

	// The secret's key that contains the Discord webhook URL.
	// The secret needs to be in the same namespace as the AlertmanagerConfig
	// object and accessible by the Prometheus Operator.
	// +required
	APIURL v1.SecretKeySelector `json:"apiURL"`

	// The template of the message's title.
	// +optional
	Title *string `json:"title,omitempty"`

	// The template of the message's body.
	// +optional
	Message *string `json:"message,omitempty"`

	// HTTP client configuration.
	// +optional
	HTTPConfig *HTTPConfig `json:"httpConfig,omitempty"`
}

DiscordConfig configures notifications via Discord. See https://prometheus.io/docs/alerting/latest/configuration/#discord_config

func (*DiscordConfig) DeepCopy added in v0.67.0

func (in *DiscordConfig) DeepCopy() *DiscordConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DiscordConfig.

func (*DiscordConfig) DeepCopyInto added in v0.67.0

func (in *DiscordConfig) DeepCopyInto(out *DiscordConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DockerFilter added in v0.73.0

type DockerFilter struct {
	Name   string   `json:"name"`
	Values []string `json:"values"`
}

DockerFilter is the configuration to limit the discovery process to a subset of available resources.

func (*DockerFilter) DeepCopy added in v0.73.0

func (in *DockerFilter) DeepCopy() *DockerFilter

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerFilter.

func (*DockerFilter) DeepCopyInto added in v0.73.0

func (in *DockerFilter) DeepCopyInto(out *DockerFilter)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type DockerSDConfig added in v0.73.0

type DockerSDConfig struct {
	// Address of the docker daemon
	// +kubebuilder:validation:MinLength=1
	// +required
	Host string `json:"host"`
	// ProxyConfig allows customizing the proxy behaviour for this scrape config.
	// +optional
	v1.ProxyConfig `json:",inline"`
	// TLS configuration applying to the target HTTP endpoint.
	// +optional
	TLSConfig *v1.SafeTLSConfig `json:"tlsConfig,omitempty"`
	// The port to scrape metrics from.
	// +optional
	Port *int `json:"port,omitempty"`
	// The host to use if the container is in host networking mode.
	// +optional
	HostNetworkingHost *string `json:"hostNetworkingHost,omitempty"`
	// Optional filters to limit the discovery process to a subset of the available resources.
	// +optional
	Filters *[]DockerFilter `json:"filters,omitempty"`
	// Time after which the container is refreshed.
	// +optional
	RefreshInterval *v1.Duration `json:"refreshInterval,omitempty"`
	// BasicAuth information to use on every scrape request.
	// +optional
	BasicAuth *v1.BasicAuth `json:"basicAuth,omitempty"`
	// Authorization header configuration to authenticate against the Docker API.
	// Cannot be set at the same time as `oauth2`.
	// +optional
	Authorization *v1.SafeAuthorization `json:"authorization,omitempty"`
	// Optional OAuth 2.0 configuration.
	// Cannot be set at the same time as `authorization`.
	// +optional
	OAuth2 *v1.OAuth2 `json:"oauth2,omitempty"`
	// Configure whether HTTP requests follow HTTP 3xx redirects.
	// +optional
	FollowRedirects *bool `json:"followRedirects,omitempty"`
	// Whether to enable HTTP2.
	// +optional
	EnableHTTP2 *bool `json:"enableHTTP2,omitempty"`
}

Docker SD configurations allow retrieving scrape targets from Docker Engine hosts. This SD discovers "containers" and will create a target for each network IP and port the container is configured to expose. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#docker_sd_config +k8s:openapi-gen=true

func (*DockerSDConfig) DeepCopy added in v0.73.0

func (in *DockerSDConfig) DeepCopy() *DockerSDConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerSDConfig.

func (*DockerSDConfig) DeepCopyInto added in v0.73.0

func (in *DockerSDConfig) DeepCopyInto(out *DockerSDConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EC2Filter added in v0.69.0

type EC2Filter struct {
	Name   string   `json:"name"`
	Values []string `json:"values"`
}

EC2Filter is the configuration for filtering EC2 instances.

func (*EC2Filter) DeepCopy added in v0.69.0

func (in *EC2Filter) DeepCopy() *EC2Filter

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EC2Filter.

func (*EC2Filter) DeepCopyInto added in v0.69.0

func (in *EC2Filter) DeepCopyInto(out *EC2Filter)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EC2SDConfig added in v0.69.0

type EC2SDConfig struct {
	// The AWS region
	// +optional
	Region *string `json:"region"`
	// AccessKey is the AWS API key.
	// +optional
	AccessKey *corev1.SecretKeySelector `json:"accessKey,omitempty"`
	// SecretKey is the AWS API secret.
	// +optional
	SecretKey *corev1.SecretKeySelector `json:"secretKey,omitempty"`
	// AWS Role ARN, an alternative to using AWS API keys.
	// +optional
	RoleARN *string `json:"roleARN,omitempty"`
	// RefreshInterval configures the refresh interval at which Prometheus will re-read the instance list.
	// +optional
	RefreshInterval *v1.Duration `json:"refreshInterval,omitempty"`
	// The port to scrape metrics from. If using the public IP address, this must
	// instead be specified in the relabeling rule.
	// +optional
	Port *int `json:"port"`
	// Filters can be used optionally to filter the instance list by other criteria.
	// Available filter criteria can be found here:
	// https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html
	// Filter API documentation: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_Filter.html
	// +optional
	Filters []*EC2Filter `json:"filters"`
}

EC2SDConfig allow retrieving scrape targets from AWS EC2 instances. The private IP address is used by default, but may be changed to the public IP address with relabeling. The IAM credentials used must have the ec2:DescribeInstances permission to discover scrape targets See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#ec2_sd_config +k8s:openapi-gen=true

func (*EC2SDConfig) DeepCopy added in v0.69.0

func (in *EC2SDConfig) DeepCopy() *EC2SDConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EC2SDConfig.

func (*EC2SDConfig) DeepCopyInto added in v0.69.0

func (in *EC2SDConfig) DeepCopyInto(out *EC2SDConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EmailConfig added in v0.44.0

type EmailConfig struct {
	// Whether or not to notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"sendResolved,omitempty"`
	// The email address to send notifications to.
	// +optional
	To string `json:"to,omitempty"`
	// The sender address.
	// +optional
	From string `json:"from,omitempty"`
	// The hostname to identify to the SMTP server.
	// +optional
	Hello string `json:"hello,omitempty"`
	// The SMTP host and port through which emails are sent. E.g. example.com:25
	// +optional
	Smarthost string `json:"smarthost,omitempty"`
	// The username to use for authentication.
	// +optional
	AuthUsername string `json:"authUsername,omitempty"`
	// The secret's key that contains the password to use for authentication.
	// The secret needs to be in the same namespace as the AlertmanagerConfig
	// object and accessible by the Prometheus Operator.
	AuthPassword *v1.SecretKeySelector `json:"authPassword,omitempty"`
	// The secret's key that contains the CRAM-MD5 secret.
	// The secret needs to be in the same namespace as the AlertmanagerConfig
	// object and accessible by the Prometheus Operator.
	AuthSecret *v1.SecretKeySelector `json:"authSecret,omitempty"`
	// The identity to use for authentication.
	// +optional
	AuthIdentity string `json:"authIdentity,omitempty"`
	// Further headers email header key/value pairs. Overrides any headers
	// previously set by the notification implementation.
	Headers []KeyValue `json:"headers,omitempty"`
	// The HTML body of the email notification.
	// +optional
	HTML *string `json:"html,omitempty"`
	// The text body of the email notification.
	// +optional
	Text *string `json:"text,omitempty"`
	// The SMTP TLS requirement.
	// Note that Go does not support unencrypted connections to remote SMTP endpoints.
	// +optional
	RequireTLS *bool `json:"requireTLS,omitempty"`
	// TLS configuration
	// +optional
	TLSConfig *monitoringv1.SafeTLSConfig `json:"tlsConfig,omitempty"`
}

EmailConfig configures notifications via Email.

func (*EmailConfig) DeepCopy added in v0.44.0

func (in *EmailConfig) DeepCopy() *EmailConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmailConfig.

func (*EmailConfig) DeepCopyInto added in v0.44.0

func (in *EmailConfig) DeepCopyInto(out *EmailConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EurekaSDConfig added in v0.73.0

type EurekaSDConfig struct {
	// The URL to connect to the Eureka server.
	// +kubebuilder:validation:MinLength=1
	// +required
	Server string `json:"server"`
	// BasicAuth information to use on every scrape request.
	// +optional
	BasicAuth *v1.BasicAuth `json:"basicAuth,omitempty"`
	// Authorization header to use on every scrape request.
	// +optional
	Authorization *v1.SafeAuthorization `json:"authorization,omitempty"`
	// Optional OAuth 2.0 configuration.
	// Cannot be set at the same time as `authorization` or `basic_auth`.
	// +optional
	OAuth2 *v1.OAuth2 `json:"oauth2,omitempty"`
	// TLS configuration applying to the target HTTP endpoint.
	// +optional
	TLSConfig *v1.SafeTLSConfig `json:"tlsConfig,omitempty"`
	// ProxyConfig allows customizing the proxy behaviour for this scrape config.
	// +optional
	v1.ProxyConfig `json:",inline"`
	// Configure whether HTTP requests follow HTTP 3xx redirects.
	// +optional
	FollowRedirects *bool `json:"followRedirects,omitempty"`
	// Whether to enable HTTP2.
	// +optional
	EnableHTTP2 *bool `json:"enableHTTP2,omitempty"`
	// Refresh interval to re-read the instance list.
	// +optional
	RefreshInterval *v1.Duration `json:"refreshInterval,omitempty"`
}

Eureka SD configurations allow retrieving scrape targets using the Eureka REST API. Prometheus will periodically check the REST endpoint and create a target for every app instance. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#eureka_sd_config +k8s:openapi-gen=true

func (*EurekaSDConfig) DeepCopy added in v0.73.0

func (in *EurekaSDConfig) DeepCopy() *EurekaSDConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EurekaSDConfig.

func (*EurekaSDConfig) DeepCopyInto added in v0.73.0

func (in *EurekaSDConfig) DeepCopyInto(out *EurekaSDConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type FileSDConfig added in v0.65.0

type FileSDConfig struct {
	// List of files to be used for file discovery. Recommendation: use absolute paths. While relative paths work, the
	// prometheus-operator project makes no guarantees about the working directory where the configuration file is
	// stored.
	// Files must be mounted using Prometheus.ConfigMaps or Prometheus.Secrets.
	// +kubebuilder:validation:MinItems:=1
	Files []SDFile `json:"files"`
	// RefreshInterval configures the refresh interval at which Prometheus will reload the content of the files.
	// +optional
	RefreshInterval *v1.Duration `json:"refreshInterval,omitempty"`
}

FileSDConfig defines a Prometheus file service discovery configuration See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#file_sd_config +k8s:openapi-gen=true

func (*FileSDConfig) DeepCopy added in v0.65.0

func (in *FileSDConfig) DeepCopy() *FileSDConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileSDConfig.

func (*FileSDConfig) DeepCopyInto added in v0.65.0

func (in *FileSDConfig) DeepCopyInto(out *FileSDConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type GCESDConfig added in v0.70.0

type GCESDConfig struct {
	// The Google Cloud Project ID
	// +kubebuilder:validation:MinLength:=1
	// +required
	Project string `json:"project"`
	// The zone of the scrape targets. If you need multiple zones use multiple GCESDConfigs.
	// +kubebuilder:validation:MinLength:=1
	// +required
	Zone string `json:"zone"`
	// Filter can be used optionally to filter the instance list by other criteria
	// Syntax of this filter is described in the filter query parameter section:
	// https://cloud.google.com/compute/docs/reference/latest/instances/list
	// +optional
	Filter *string `json:"filter,omitempty"`
	// RefreshInterval configures the refresh interval at which Prometheus will re-read the instance list.
	// +optional
	RefreshInterval *v1.Duration `json:"refreshInterval,omitempty"`
	// The port to scrape metrics from. If using the public IP address, this must
	// instead be specified in the relabeling rule.
	// +optional
	Port *int `json:"port"`
	// The tag separator is used to separate the tags on concatenation
	// +optional
	TagSeparator *string `json:"tagSeparator,omitempty"`
}

GCESDConfig configures scrape targets from GCP GCE instances. The private IP address is used by default, but may be changed to the public IP address with relabeling. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#gce_sd_config

The GCE service discovery will load the Google Cloud credentials from the file specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable. See https://cloud.google.com/kubernetes-engine/docs/tutorials/authenticating-to-cloud-platform

A pre-requisite for using GCESDConfig is that a Secret containing valid Google Cloud credentials is mounted into the Prometheus or PrometheusAgent pod via the `.spec.secrets` field and that the GOOGLE_APPLICATION_CREDENTIALS environment variable is set to /etc/prometheus/secrets/<secret-name>/<credentials-filename.json>. +k8s:openapi-gen=true

func (*GCESDConfig) DeepCopy added in v0.70.0

func (in *GCESDConfig) DeepCopy() *GCESDConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GCESDConfig.

func (*GCESDConfig) DeepCopyInto added in v0.70.0

func (in *GCESDConfig) DeepCopyInto(out *GCESDConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HTTPConfig

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 *monitoringv1.SafeAuthorization `json:"authorization,omitempty"`
	// BasicAuth for the client.
	// This is mutually exclusive with Authorization. If both are defined, BasicAuth takes precedence.
	// +optional
	BasicAuth *monitoringv1.BasicAuth `json:"basicAuth,omitempty"`
	// OAuth2 client credentials used to fetch a token for the targets.
	// +optional
	OAuth2 *monitoringv1.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 AlertmanagerConfig
	// object and accessible by the Prometheus Operator.
	// +optional
	BearerTokenSecret *v1.SecretKeySelector `json:"bearerTokenSecret,omitempty"`
	// TLS configuration for the client.
	// +optional
	TLSConfig *monitoringv1.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

func (in *HTTPConfig) DeepCopy() *HTTPConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPConfig.

func (*HTTPConfig) DeepCopyInto

func (in *HTTPConfig) DeepCopyInto(out *HTTPConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*HTTPConfig) Validate added in v0.55.0

func (hc *HTTPConfig) Validate() error

type HTTPSDConfig added in v0.65.0

type HTTPSDConfig struct {
	// URL from which the targets are fetched.
	// +kubebuilder:validation:MinLength:=1
	// +kubebuilder:validation:Pattern:="^http(s)?://.+$"
	URL string `json:"url"`
	// RefreshInterval configures the refresh interval at which Prometheus will re-query the
	// endpoint to update the target list.
	// +optional
	RefreshInterval *v1.Duration `json:"refreshInterval,omitempty"`
	// BasicAuth information to authenticate against the target HTTP endpoint.
	// More info: https://prometheus.io/docs/operating/configuration/#endpoints
	// +optional
	BasicAuth *v1.BasicAuth `json:"basicAuth,omitempty"`
	// Authorization header configuration to authenticate against the target HTTP endpoint.
	// +optional
	Authorization *v1.SafeAuthorization `json:"authorization,omitempty"`
	// TLS configuration applying to the target HTTP endpoint.
	// +optional
	TLSConfig *v1.SafeTLSConfig `json:"tlsConfig,omitempty"`
	// ProxyConfig allows customizing the proxy behaviour for this scrape config.
	// +optional
	v1.ProxyConfig `json:",inline"`
}

HTTPSDConfig defines a prometheus HTTP service discovery configuration See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#http_sd_config +k8s:openapi-gen=true

func (*HTTPSDConfig) DeepCopy added in v0.65.0

func (in *HTTPSDConfig) DeepCopy() *HTTPSDConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPSDConfig.

func (*HTTPSDConfig) DeepCopyInto added in v0.65.0

func (in *HTTPSDConfig) DeepCopyInto(out *HTTPSDConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HetznerSDConfig added in v0.73.0

type HetznerSDConfig struct {
	// The Hetzner role of entities that should be discovered.
	// +kubebuilder:validation:Enum=hcloud;Hcloud;robot;Robot
	// +required
	Role string `json:"role"`
	// BasicAuth information to use on every scrape request, required when role is robot.
	// Role hcloud does not support basic auth.
	// +optional
	BasicAuth *v1.BasicAuth `json:"basicAuth,omitempty"`
	// Authorization header configuration, required when role is hcloud.
	// Role robot does not support bearer token authentication.
	// +optional
	Authorization *v1.SafeAuthorization `json:"authorization,omitempty"`
	// Optional OAuth 2.0 configuration.
	// Cannot be used at the same time as `basic_auth` or `authorization`.
	// +optional
	OAuth2 *v1.OAuth2 `json:"oauth2,omitempty"`
	// ProxyConfig allows customizing the proxy behaviour for this scrape config.
	// +optional
	v1.ProxyConfig `json:",inline"`
	// Configure whether HTTP requests follow HTTP 3xx redirects.
	// +optional
	FollowRedirects *bool `json:"followRedirects,omitempty"`
	// Whether to enable HTTP2.
	// +optional
	EnableHTTP2 *bool `json:"enableHTTP2,omitempty"`
	// TLS configuration to use on every scrape request.
	// +optional
	TLSConfig *v1.SafeTLSConfig `json:"tlsConfig,omitempty"`
	// The port to scrape metrics from.
	// +optional
	Port *int `json:"port,omitempty"`
	// The time after which the servers are refreshed.
	// +optional
	RefreshInterval *v1.Duration `json:"refreshInterval,omitempty"`
}

HetznerSDConfig allow retrieving scrape targets from Hetzner Cloud API and Robot API. This service discovery uses the public IPv4 address by default, but that can be changed with relabeling See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#hetzner_sd_config +k8s:openapi-gen=true

func (*HetznerSDConfig) DeepCopy added in v0.73.0

func (in *HetznerSDConfig) DeepCopy() *HetznerSDConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HetznerSDConfig.

func (*HetznerSDConfig) DeepCopyInto added in v0.73.0

func (in *HetznerSDConfig) DeepCopyInto(out *HetznerSDConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type InhibitRule

type InhibitRule struct {
	// Matchers that have to be fulfilled in the alerts to be muted. The
	// operator enforces that the alert matches the resource's namespace.
	TargetMatch []Matcher `json:"targetMatch,omitempty"`
	// Matchers for which one or more alerts have to exist for the inhibition
	// to take effect. The operator enforces that the alert matches the
	// resource's namespace.
	SourceMatch []Matcher `json:"sourceMatch,omitempty"`
	// Labels that must have an equal value in the source and target alert for
	// the inhibition to take effect.
	Equal []string `json:"equal,omitempty"`
}

InhibitRule defines an inhibition rule that allows to mute alerts when other alerts are already firing. See https://prometheus.io/docs/alerting/latest/configuration/#inhibit_rule

func (*InhibitRule) DeepCopy

func (in *InhibitRule) DeepCopy() *InhibitRule

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InhibitRule.

func (*InhibitRule) DeepCopyInto

func (in *InhibitRule) DeepCopyInto(out *InhibitRule)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type K8SSelectorConfig added in v0.69.0

type K8SSelectorConfig struct {
	// +kubebuilder:validation:Required
	Role  Role   `json:"role"`
	Label string `json:"label,omitempty"`
	Field string `json:"field,omitempty"`
}

K8SSelectorConfig is Kubernetes Selector Config

func (*K8SSelectorConfig) DeepCopy added in v0.69.0

func (in *K8SSelectorConfig) DeepCopy() *K8SSelectorConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new K8SSelectorConfig.

func (*K8SSelectorConfig) DeepCopyInto added in v0.69.0

func (in *K8SSelectorConfig) DeepCopyInto(out *K8SSelectorConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KeyValue added in v0.44.0

type KeyValue struct {
	// Key of the tuple.
	// +kubebuilder:validation:MinLength=1
	Key string `json:"key"`
	// Value of the tuple.
	Value string `json:"value"`
}

KeyValue defines a (key, value) tuple.

func (*KeyValue) DeepCopy added in v0.44.0

func (in *KeyValue) DeepCopy() *KeyValue

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KeyValue.

func (*KeyValue) DeepCopyInto added in v0.44.0

func (in *KeyValue) DeepCopyInto(out *KeyValue)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KubernetesSDConfig added in v0.67.0

type KubernetesSDConfig struct {
	// The API server address consisting of a hostname or IP address followed
	// by an optional port number.
	// If left empty, Prometheus is assumed to run inside
	// of the cluster. It will discover API servers automatically and use the pod's
	// CA certificate and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount/.
	// +optional
	APIServer *string `json:"apiServer,omitempty"`
	// Role of the Kubernetes entities that should be discovered.
	// +required
	Role Role `json:"role"`
	// BasicAuth information to use on every scrape request.
	// Cannot be set at the same time as `authorization`, or `oauth2`.
	// +optional
	BasicAuth *v1.BasicAuth `json:"basicAuth,omitempty"`
	// Authorization header to use on every scrape request.
	// Cannot be set at the same time as `basicAuth`, or `oauth2`.
	// +optional
	Authorization *v1.SafeAuthorization `json:"authorization,omitempty"`
	// Optional OAuth 2.0 configuration.
	// Cannot be set at the same time as `authorization`, or `basicAuth`.
	// +optional
	OAuth2 *v1.OAuth2 `json:"oauth2,omitempty"`
	// ProxyConfig allows customizing the proxy behaviour for this scrape config.
	// +optional
	v1.ProxyConfig `json:",inline"`
	// Configure whether HTTP requests follow HTTP 3xx redirects.
	// +optional
	FollowRedirects *bool `json:"followRedirects,omitempty"`
	// Whether to enable HTTP2.
	// +optional
	EnableHTTP2 *bool `json:"enableHTTP2,omitempty"`
	// TLS configuration to use on every scrape request.
	// +optional
	TLSConfig *v1.SafeTLSConfig `json:"tlsConfig,omitempty"`
	// Optional namespace discovery. If omitted, Prometheus discovers targets across all namespaces.
	// +optional
	Namespaces *NamespaceDiscovery `json:"namespaces,omitempty"`
	// Optional metadata to attach to discovered targets.
	// It requires Prometheus >= v2.35.0 for `pod` role and
	// Prometheus >= v2.37.0 for `endpoints` and `endpointslice` roles.
	// +optional
	AttachMetadata *AttachMetadata `json:"attachMetadata,omitempty"`
	// Selector to select objects.
	// +optional
	// +listType=map
	// +listMapKey=role
	Selectors []K8SSelectorConfig `json:"selectors,omitempty"`
}

KubernetesSDConfig allows retrieving scrape targets from Kubernetes' REST API. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config +k8s:openapi-gen=true

func (*KubernetesSDConfig) DeepCopy added in v0.67.0

func (in *KubernetesSDConfig) DeepCopy() *KubernetesSDConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesSDConfig.

func (*KubernetesSDConfig) DeepCopyInto added in v0.67.0

func (in *KubernetesSDConfig) DeepCopyInto(out *KubernetesSDConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type KumaSDConfig added in v0.73.0

type KumaSDConfig struct {
	// Address of the Kuma Control Plane's MADS xDS server.
	// +kubebuilder:validation:MinLength=1
	// +required
	Server string `json:"server"`
	// Client id is used by Kuma Control Plane to compute Monitoring Assignment for specific Prometheus backend.
	// +optional
	ClientID *string `json:"clientID,omitempty"`
	// The time to wait between polling update requests.
	// +optional
	RefreshInterval *v1.Duration `json:"refreshInterval,omitempty"`
	// The time after which the monitoring assignments are refreshed.
	// +optional
	FetchTimeout *v1.Duration `json:"fetchTimeout,omitempty"`
	// ProxyConfig allows customizing the proxy behaviour for this scrape config.
	// +optional
	v1.ProxyConfig `json:",inline"`
	// TLS configuration to use on every scrape request
	// +optional
	TLSConfig *v1.SafeTLSConfig `json:"tlsConfig,omitempty"`
	// BasicAuth information to use on every scrape request.
	// +optional
	BasicAuth *v1.BasicAuth `json:"basicAuth,omitempty"`
	// Authorization header to use on every scrape request.
	// +optional
	Authorization *v1.SafeAuthorization `json:"authorization,omitempty"`
	// Optional OAuth 2.0 configuration.
	// Cannot be set at the same time as `authorization`, or `basicAuth`.
	// +optional
	OAuth2 *v1.OAuth2 `json:"oauth2,omitempty"`
	// Configure whether HTTP requests follow HTTP 3xx redirects.
	// +optional
	FollowRedirects *bool `json:"followRedirects,omitempty"`
	// Whether to enable HTTP2.
	// +optional
	EnableHTTP2 *bool `json:"enableHTTP2,omitempty"`
}

KumaSDConfig allow retrieving scrape targets from Kuma's control plane. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kuma_sd_config +k8s:openapi-gen=true

func (*KumaSDConfig) DeepCopy added in v0.73.0

func (in *KumaSDConfig) DeepCopy() *KumaSDConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KumaSDConfig.

func (*KumaSDConfig) DeepCopyInto added in v0.73.0

func (in *KumaSDConfig) DeepCopyInto(out *KumaSDConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MSTeamsConfig added in v0.69.0

type MSTeamsConfig struct {
	// Whether to notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"sendResolved,omitempty"`
	// MSTeams webhook URL.
	// +kubebuilder:validation:Required
	WebhookURL v1.SecretKeySelector `json:"webhookUrl"`
	// Message title template.
	// +optional
	Title *string `json:"title,omitempty"`
	// Message summary template.
	// It requires Alertmanager >= 0.27.0.
	// +optional
	Summary *string `json:"summary,omitempty"`
	// Message body template.
	// +optional
	Text *string `json:"text,omitempty"`
	// HTTP client configuration.
	// +optional
	HTTPConfig *HTTPConfig `json:"httpConfig,omitempty"`
}

MSTeamsConfig configures notifications via Microsoft Teams. It requires Alertmanager >= 0.26.0.

func (*MSTeamsConfig) DeepCopy added in v0.69.0

func (in *MSTeamsConfig) DeepCopy() *MSTeamsConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MSTeamsConfig.

func (*MSTeamsConfig) DeepCopyInto added in v0.69.0

func (in *MSTeamsConfig) DeepCopyInto(out *MSTeamsConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type MatchType added in v0.53.0

type MatchType string

MatchType is a comparison operator on a Matcher

const (
	MatchEqual     MatchType = "="
	MatchNotEqual  MatchType = "!="
	MatchRegexp    MatchType = "=~"
	MatchNotRegexp MatchType = "!~"
)

func (MatchType) Valid added in v0.53.0

func (mt MatchType) Valid() bool

Valid MatchType returns true if the operator is acceptable

type Matcher

type Matcher struct {
	// Label to match.
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name"`
	// Label value to match.
	// +optional
	Value string `json:"value"`
	// Match operation available with AlertManager >= v0.22.0 and
	// takes precedence over Regex (deprecated) if non-empty.
	// +kubebuilder:validation:Enum=!=;=;=~;!~
	// +optional
	MatchType MatchType `json:"matchType,omitempty"`
	// Whether to match on equality (false) or regular-expression (true).
	// +optional
	// Deprecated: for AlertManager >= v0.22.0, `matchType` should be used instead.
	Regex bool `json:"regex,omitempty"`
}

Matcher defines how to match on alert's labels.

func (*Matcher) DeepCopy

func (in *Matcher) DeepCopy() *Matcher

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Matcher.

func (*Matcher) DeepCopyInto

func (in *Matcher) DeepCopyInto(out *Matcher)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (Matcher) String added in v0.53.0

func (in Matcher) String() string

String returns Matcher as a string Use only for MatchType Matcher

func (Matcher) Validate added in v0.53.0

func (in Matcher) Validate() error

Validate the Matcher returns an error if the matcher is invalid Validates only non-deprecated matching fields

type Month added in v0.53.0

type Month string

Month of the year

const (
	January   Month = "january"
	February  Month = "february"
	March     Month = "march"
	April     Month = "april"
	May       Month = "may"
	June      Month = "june"
	July      Month = "july"
	August    Month = "august"
	September Month = "september"
	October   Month = "october"
	November  Month = "november"
	December  Month = "december"
)

func (Month) Int added in v0.53.0

func (m Month) Int() (int, error)

Int validates the Month and returns an integer, which is the canonical representation of the Month in upstream types. Returns an error if the Month is invalid

type MonthRange added in v0.53.0

type MonthRange string

MonthRange is an inclusive range of months of the year beginning in January Months can be specified by name (e.g 'January') by numerical month (e.g '1') or as an inclusive range (e.g 'January:March', '1:3', '1:March') +kubebuilder:validation:Pattern=`^((?i)january|february|march|april|may|june|july|august|september|october|november|december|1[0-2]|[1-9])(?:((:((?i)january|february|march|april|may|june|july|august|september|october|november|december|1[0-2]|[1-9]))$)|$)`

func (MonthRange) Parse added in v0.53.0

func (mr MonthRange) Parse() (*ParsedRange, error)

Parse returns a ParsedMonthRange or error on invalid input

func (MonthRange) Validate added in v0.53.0

func (mr MonthRange) Validate() error

Validate the month range

type MuteTimeInterval added in v0.53.0

type MuteTimeInterval struct {
	// Name of the time interval
	// +kubebuilder:validation:Required
	Name string `json:"name,omitempty"`
	// TimeIntervals is a list of TimeInterval
	TimeIntervals []TimeInterval `json:"timeIntervals,omitempty"`
}

MuteTimeInterval specifies the periods in time when notifications will be muted

func (*MuteTimeInterval) DeepCopy added in v0.53.0

func (in *MuteTimeInterval) DeepCopy() *MuteTimeInterval

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MuteTimeInterval.

func (*MuteTimeInterval) DeepCopyInto added in v0.53.0

func (in *MuteTimeInterval) DeepCopyInto(out *MuteTimeInterval)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (MuteTimeInterval) Validate added in v0.53.0

func (mti MuteTimeInterval) Validate() error

Validate the MuteTimeInterval

type NamespaceDiscovery added in v0.71.0

type NamespaceDiscovery struct {
	// Includes the namespace in which the Prometheus pod exists to the list of watched namesapces.
	// +optional
	IncludeOwnNamespace *bool `json:"ownNamespace,omitempty"`
	// List of namespaces where to watch for resources.
	// If empty and `ownNamespace` isn't true, Prometheus watches for resources in all namespaces.
	// +optional
	Names []string `json:"names,omitempty"`
}

NamespaceDiscovery is the configuration for discovering Kubernetes namespaces.

func (*NamespaceDiscovery) DeepCopy added in v0.71.0

func (in *NamespaceDiscovery) DeepCopy() *NamespaceDiscovery

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceDiscovery.

func (*NamespaceDiscovery) DeepCopyInto added in v0.71.0

func (in *NamespaceDiscovery) DeepCopyInto(out *NamespaceDiscovery)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OpenStackSDConfig added in v0.71.0

type OpenStackSDConfig struct {
	// The OpenStack role of entities that should be discovered.
	// +kubebuilder:validation:Enum=Instance;instance;Hypervisor;hypervisor
	// +required
	Role string `json:"role"`
	// The OpenStack Region.
	// +kubebuilder:validation:MinLength:=1
	// +required
	Region string `json:"region"`
	// IdentityEndpoint specifies the HTTP endpoint that is required to work with
	// the Identity API of the appropriate version.
	// +optional
	IdentityEndpoint *string `json:"identityEndpoint,omitempty"`
	// Username is required if using Identity V2 API. Consult with your provider's
	// control panel to discover your account's username.
	// In Identity V3, either userid or a combination of username
	// and domainId or domainName are needed
	// +optional
	Username *string `json:"username,omitempty"`
	// UserID
	// +optional
	UserID *string `json:"userid,omitempty"`
	// Password for the Identity V2 and V3 APIs. Consult with your provider's
	// control panel to discover your account's preferred method of authentication.
	// +optional
	Password *corev1.SecretKeySelector `json:"password,omitempty"`
	// At most one of domainId and domainName must be provided if using username
	// with Identity V3. Otherwise, either are optional.
	// +optional
	DomainName *string `json:"domainName,omitempty"`
	// DomainID
	// +optional
	DomainID *string `json:"domainID,omitempty"`
	// The ProjectId and ProjectName fields are optional for the Identity V2 API.
	// Some providers allow you to specify a ProjectName instead of the ProjectId.
	// Some require both. Your provider's authentication policies will determine
	// how these fields influence authentication.
	// +optional
	ProjectName *string `json:"projectName,omitempty"`
	//  ProjectID
	// +optional
	ProjectID *string `json:"projectID,omitempty"`
	// The ApplicationCredentialID or ApplicationCredentialName fields are
	// required if using an application credential to authenticate. Some providers
	// allow you to create an application credential to authenticate rather than a
	// password.
	// +optional
	ApplicationCredentialName *string `json:"applicationCredentialName,omitempty"`
	// ApplicationCredentialID
	// +optional
	ApplicationCredentialID *string `json:"applicationCredentialId,omitempty"`
	// The applicationCredentialSecret field is required if using an application
	// credential to authenticate.
	// +optional
	ApplicationCredentialSecret *corev1.SecretKeySelector `json:"applicationCredentialSecret,omitempty"`
	// Whether the service discovery should list all instances for all projects.
	// It is only relevant for the 'instance' role and usually requires admin permissions.
	// +optional
	AllTenants *bool `json:"allTenants,omitempty"`
	// Refresh interval to re-read the instance list.
	// +optional
	RefreshInterval *v1.Duration `json:"refreshInterval,omitempty"`
	// The port to scrape metrics from. If using the public IP address, this must
	// instead be specified in the relabeling rule.
	// +optional
	Port *int `json:"port"`
	// Availability of the endpoint to connect to.
	// +kubebuilder:validation:Enum=Public;public;Admin;admin;Internal;internal
	// +optional
	Availability *string `json:"availability,omitempty"`
	// TLS configuration applying to the target HTTP endpoint.
	// +optional
	TLSConfig *v1.SafeTLSConfig `json:"tlsConfig,omitempty"`
}

OpenStackSDConfig allow retrieving scrape targets from OpenStack Nova instances. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#openstack_sd_config +k8s:openapi-gen=true

func (*OpenStackSDConfig) DeepCopy added in v0.71.0

func (in *OpenStackSDConfig) DeepCopy() *OpenStackSDConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenStackSDConfig.

func (*OpenStackSDConfig) DeepCopyInto added in v0.71.0

func (in *OpenStackSDConfig) DeepCopyInto(out *OpenStackSDConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type OpsGenieConfig

type OpsGenieConfig struct {
	// Whether or not to notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"sendResolved,omitempty"`
	// The secret's key that contains the OpsGenie API key.
	// The secret needs to be in the same namespace as the AlertmanagerConfig
	// object and accessible by the Prometheus Operator.
	// +optional
	APIKey *v1.SecretKeySelector `json:"apiKey,omitempty"`
	// The URL to send OpsGenie API requests to.
	// +optional
	APIURL string `json:"apiURL,omitempty"`
	// Alert text limited to 130 characters.
	// +optional
	Message string `json:"message,omitempty"`
	// Description of the incident.
	// +optional
	Description string `json:"description,omitempty"`
	// Backlink to the sender of the notification.
	// +optional
	Source string `json:"source,omitempty"`
	// Comma separated list of tags attached to the notifications.
	// +optional
	Tags string `json:"tags,omitempty"`
	// Additional alert note.
	// +optional
	Note string `json:"note,omitempty"`
	// Priority level of alert. Possible values are P1, P2, P3, P4, and P5.
	// +optional
	Priority string `json:"priority,omitempty"`
	// Whether to update message and description of the alert in OpsGenie if it already exists
	// By default, the alert is never updated in OpsGenie, the new message only appears in activity log.
	// +optional
	UpdateAlerts *bool `json:"updateAlerts,omitempty"`
	// A set of arbitrary key/value pairs that provide further detail about the incident.
	// +optional
	Details []KeyValue `json:"details,omitempty"`
	// List of responders responsible for notifications.
	// +optional
	Responders []OpsGenieConfigResponder `json:"responders,omitempty"`
	// HTTP client configuration.
	// +optional
	HTTPConfig *HTTPConfig `json:"httpConfig,omitempty"`
	// Optional field that can be used to specify which domain alert is related to.
	// +optional
	Entity string `json:"entity,omitempty"`
	// Comma separated list of actions that will be available for the alert.
	// +optional
	Actions string `json:"actions,omitempty"`
}

OpsGenieConfig configures notifications via OpsGenie. See https://prometheus.io/docs/alerting/latest/configuration/#opsgenie_config

func (*OpsGenieConfig) DeepCopy

func (in *OpsGenieConfig) DeepCopy() *OpsGenieConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpsGenieConfig.

func (*OpsGenieConfig) DeepCopyInto

func (in *OpsGenieConfig) DeepCopyInto(out *OpsGenieConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*OpsGenieConfig) Validate

func (o *OpsGenieConfig) Validate() error

Validate ensures OpsGenieConfig is valid

type OpsGenieConfigResponder

type OpsGenieConfigResponder struct {
	// ID of the responder.
	// +optional
	ID string `json:"id,omitempty"`
	// Name of the responder.
	// +optional
	Name string `json:"name,omitempty"`
	// Username of the responder.
	// +optional
	Username string `json:"username,omitempty"`
	// Type of responder.
	// +kubebuilder:validation:MinLength=1
	// +kubebuilder:validation:Enum=team;teams;user;escalation;schedule
	Type string `json:"type"`
}

OpsGenieConfigResponder defines a responder to an incident. One of `id`, `name` or `username` has to be defined.

func (*OpsGenieConfigResponder) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpsGenieConfigResponder.

func (*OpsGenieConfigResponder) DeepCopyInto

func (in *OpsGenieConfigResponder) DeepCopyInto(out *OpsGenieConfigResponder)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*OpsGenieConfigResponder) Validate

func (r *OpsGenieConfigResponder) Validate() error

Validate ensures OpsGenieConfigResponder is valid.

type PagerDutyConfig

type PagerDutyConfig struct {
	// Whether or not to notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"sendResolved,omitempty"`
	// The secret's key that contains the PagerDuty integration key (when using
	// Events API v2). Either this field or `serviceKey` needs to be defined.
	// The secret needs to be in the same namespace as the AlertmanagerConfig
	// object and accessible by the Prometheus Operator.
	// +optional
	RoutingKey *v1.SecretKeySelector `json:"routingKey,omitempty"`
	// The secret's key that contains the PagerDuty service key (when using
	// integration type "Prometheus"). Either this field or `routingKey` needs to
	// be defined.
	// The secret needs to be in the same namespace as the AlertmanagerConfig
	// object and accessible by the Prometheus Operator.
	// +optional
	ServiceKey *v1.SecretKeySelector `json:"serviceKey,omitempty"`
	// The URL to send requests to.
	// +optional
	URL string `json:"url,omitempty"`
	// Client identification.
	// +optional
	Client string `json:"client,omitempty"`
	// Backlink to the sender of notification.
	// +optional
	ClientURL string `json:"clientURL,omitempty"`
	// Description of the incident.
	// +optional
	Description string `json:"description,omitempty"`
	// Severity of the incident.
	// +optional
	Severity string `json:"severity,omitempty"`
	// The class/type of the event.
	// +optional
	Class string `json:"class,omitempty"`
	// A cluster or grouping of sources.
	// +optional
	Group string `json:"group,omitempty"`
	// The part or component of the affected system that is broken.
	// +optional
	Component string `json:"component,omitempty"`
	// Arbitrary key/value pairs that provide further detail about the incident.
	// +optional
	Details []KeyValue `json:"details,omitempty"`
	// A list of image details to attach that provide further detail about an incident.
	// +optional
	PagerDutyImageConfigs []PagerDutyImageConfig `json:"pagerDutyImageConfigs,omitempty"`
	// A list of link details to attach that provide further detail about an incident.
	// +optional
	PagerDutyLinkConfigs []PagerDutyLinkConfig `json:"pagerDutyLinkConfigs,omitempty"`
	// HTTP client configuration.
	// +optional
	HTTPConfig *HTTPConfig `json:"httpConfig,omitempty"`
}

PagerDutyConfig configures notifications via PagerDuty. See https://prometheus.io/docs/alerting/latest/configuration/#pagerduty_config

func (*PagerDutyConfig) DeepCopy

func (in *PagerDutyConfig) DeepCopy() *PagerDutyConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PagerDutyConfig.

func (*PagerDutyConfig) DeepCopyInto

func (in *PagerDutyConfig) DeepCopyInto(out *PagerDutyConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PagerDutyImageConfig added in v0.53.0

type PagerDutyImageConfig struct {
	// Src of the image being attached to the incident
	// +optional
	Src string `json:"src,omitempty"`
	// Optional URL; makes the image a clickable link.
	// +optional
	Href string `json:"href,omitempty"`
	// Alt is the optional alternative text for the image.
	// +optional
	Alt string `json:"alt,omitempty"`
}

PagerDutyImageConfig attaches images to an incident

func (*PagerDutyImageConfig) DeepCopy added in v0.53.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PagerDutyImageConfig.

func (*PagerDutyImageConfig) DeepCopyInto added in v0.53.0

func (in *PagerDutyImageConfig) DeepCopyInto(out *PagerDutyImageConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PagerDutyLinkConfig added in v0.53.0

type PagerDutyLinkConfig struct {
	// Href is the URL of the link to be attached
	// +optional
	Href string `json:"href,omitempty"`
	// Text that describes the purpose of the link, and can be used as the link's text.
	// +optional
	Text string `json:"alt,omitempty"`
}

PagerDutyLinkConfig attaches text links to an incident

func (*PagerDutyLinkConfig) DeepCopy added in v0.53.0

func (in *PagerDutyLinkConfig) DeepCopy() *PagerDutyLinkConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PagerDutyLinkConfig.

func (*PagerDutyLinkConfig) DeepCopyInto added in v0.53.0

func (in *PagerDutyLinkConfig) DeepCopyInto(out *PagerDutyLinkConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ParsedRange added in v0.53.0

type ParsedRange struct {
	// Start is the beginning of the range
	Start int `json:"start,omitempty"`
	// End of the range
	End int `json:"end,omitempty"`
}

ParsedRange is an integer representation of a range +kubebuilder:object:generate:=false

type PrometheusAgent added in v0.64.0

type PrometheusAgent struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// Specification of the desired behavior of the Prometheus agent. More info:
	// https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
	Spec PrometheusAgentSpec `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 monitoringv1.PrometheusStatus `json:"status,omitempty"`
}

PrometheusAgent defines a Prometheus agent deployment.

func (*PrometheusAgent) DeepCopy added in v0.64.0

func (in *PrometheusAgent) DeepCopy() *PrometheusAgent

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusAgent.

func (*PrometheusAgent) DeepCopyInto added in v0.64.0

func (in *PrometheusAgent) DeepCopyInto(out *PrometheusAgent)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PrometheusAgent) DeepCopyObject added in v0.64.0

func (l *PrometheusAgent) DeepCopyObject() runtime.Object

DeepCopyObject implements the runtime.Object interface.

func (*PrometheusAgent) GetCommonPrometheusFields added in v0.64.0

func (l *PrometheusAgent) GetCommonPrometheusFields() monitoringv1.CommonPrometheusFields

func (*PrometheusAgent) GetStatus added in v0.66.0

func (*PrometheusAgent) SetCommonPrometheusFields added in v0.64.0

func (l *PrometheusAgent) SetCommonPrometheusFields(f monitoringv1.CommonPrometheusFields)

type PrometheusAgentList added in v0.64.0

type PrometheusAgentList 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 Prometheus agents
	Items []*PrometheusAgent `json:"items"`
}

PrometheusAgentList is a list of Prometheus agents. +k8s:openapi-gen=true

func (*PrometheusAgentList) DeepCopy added in v0.64.0

func (in *PrometheusAgentList) DeepCopy() *PrometheusAgentList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusAgentList.

func (*PrometheusAgentList) DeepCopyInto added in v0.64.0

func (in *PrometheusAgentList) DeepCopyInto(out *PrometheusAgentList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*PrometheusAgentList) DeepCopyObject added in v0.64.0

func (l *PrometheusAgentList) DeepCopyObject() runtime.Object

DeepCopyObject implements the runtime.Object interface.

type PrometheusAgentSpec added in v0.64.0

type PrometheusAgentSpec struct {
	monitoringv1.CommonPrometheusFields `json:",inline"`
}

PrometheusAgentSpec is a specification of the desired behavior of the Prometheus agent. More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status +k8s:openapi-gen=true

func (*PrometheusAgentSpec) DeepCopy added in v0.64.0

func (in *PrometheusAgentSpec) DeepCopy() *PrometheusAgentSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusAgentSpec.

func (*PrometheusAgentSpec) DeepCopyInto added in v0.64.0

func (in *PrometheusAgentSpec) DeepCopyInto(out *PrometheusAgentSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PushoverConfig added in v0.44.0

type PushoverConfig struct {
	// Whether or not to notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"sendResolved,omitempty"`
	// The secret's key that contains the recipient user's user key.
	// The secret needs to be in the same namespace as the AlertmanagerConfig
	// object and accessible by the Prometheus Operator.
	// Either `userKey` or `userKeyFile` is required.
	// +optional
	UserKey *v1.SecretKeySelector `json:"userKey,omitempty"`
	// The user key file that contains the recipient user's user key.
	// Either `userKey` or `userKeyFile` is required.
	// It requires Alertmanager >= v0.26.0.
	// +optional
	UserKeyFile *string `json:"userKeyFile,omitempty"`
	// The secret's key that contains the registered application's API token, see https://pushover.net/apps.
	// The secret needs to be in the same namespace as the AlertmanagerConfig
	// object and accessible by the Prometheus Operator.
	// Either `token` or `tokenFile` is required.
	// +optional
	Token *v1.SecretKeySelector `json:"token,omitempty"`
	// The token file that contains the registered application's API token, see https://pushover.net/apps.
	// Either `token` or `tokenFile` is required.
	// It requires Alertmanager >= v0.26.0.
	// +optional
	TokenFile *string `json:"tokenFile,omitempty"`
	// Notification title.
	// +optional
	Title string `json:"title,omitempty"`
	// Notification message.
	// +optional
	Message string `json:"message,omitempty"`
	// A supplementary URL shown alongside the message.
	// +optional
	URL string `json:"url,omitempty"`
	// A title for supplementary URL, otherwise just the URL is shown
	// +optional
	URLTitle string `json:"urlTitle,omitempty"`
	// The name of a device to send the notification to
	// +optional
	Device *string `json:"device,omitempty"`
	// The name of one of the sounds supported by device clients to override the user's default sound choice
	// +optional
	Sound string `json:"sound,omitempty"`
	// Priority, see https://pushover.net/api#priority
	// +optional
	Priority string `json:"priority,omitempty"`
	// How often the Pushover servers will send the same notification to the user.
	// Must be at least 30 seconds.
	// +kubebuilder:validation:Pattern=`^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$`
	// +optional
	Retry string `json:"retry,omitempty"`
	// How long your notification will continue to be retried for, unless the user
	// acknowledges the notification.
	// +kubebuilder:validation:Pattern=`^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$`
	// +optional
	Expire string `json:"expire,omitempty"`
	// Whether notification message is HTML or plain text.
	// +optional
	HTML bool `json:"html,omitempty"`
	// HTTP client configuration.
	// +optional
	HTTPConfig *HTTPConfig `json:"httpConfig,omitempty"`
}

PushoverConfig configures notifications via Pushover. See https://prometheus.io/docs/alerting/latest/configuration/#pushover_config

func (*PushoverConfig) DeepCopy added in v0.44.0

func (in *PushoverConfig) DeepCopy() *PushoverConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PushoverConfig.

func (*PushoverConfig) DeepCopyInto added in v0.44.0

func (in *PushoverConfig) DeepCopyInto(out *PushoverConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Receiver

type Receiver struct {
	// Name of the receiver. Must be unique across all items from the list.
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name"`
	// List of OpsGenie configurations.
	OpsGenieConfigs []OpsGenieConfig `json:"opsgenieConfigs,omitempty"`
	// List of PagerDuty configurations.
	PagerDutyConfigs []PagerDutyConfig `json:"pagerdutyConfigs,omitempty"`
	// List of Discord configurations.
	// +optional
	DiscordConfigs []DiscordConfig `json:"discordConfigs,omitempty"`
	// List of Slack configurations.
	SlackConfigs []SlackConfig `json:"slackConfigs,omitempty"`
	// List of webhook configurations.
	WebhookConfigs []WebhookConfig `json:"webhookConfigs,omitempty"`
	// List of WeChat configurations.
	WeChatConfigs []WeChatConfig `json:"wechatConfigs,omitempty"`
	// List of Email configurations.
	EmailConfigs []EmailConfig `json:"emailConfigs,omitempty"`
	// List of VictorOps configurations.
	VictorOpsConfigs []VictorOpsConfig `json:"victoropsConfigs,omitempty"`
	// List of Pushover configurations.
	PushoverConfigs []PushoverConfig `json:"pushoverConfigs,omitempty"`
	// List of SNS configurations
	SNSConfigs []SNSConfig `json:"snsConfigs,omitempty"`
	// List of Telegram configurations.
	TelegramConfigs []TelegramConfig `json:"telegramConfigs,omitempty"`
	// List of Webex configurations.
	WebexConfigs []WebexConfig `json:"webexConfigs,omitempty"`
	// List of MSTeams configurations.
	// It requires Alertmanager >= 0.26.0.
	MSTeamsConfigs []MSTeamsConfig `json:"msteamsConfigs,omitempty"`
}

Receiver defines one or more notification integrations.

func (*Receiver) DeepCopy

func (in *Receiver) DeepCopy() *Receiver

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Receiver.

func (*Receiver) DeepCopyInto

func (in *Receiver) DeepCopyInto(out *Receiver)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Role added in v0.70.0

type Role string

Role is role of the service in Kubernetes. +kubebuilder:validation:Enum=Node;node;Service;service;Pod;pod;Endpoints;endpoints;EndpointSlice;endpointslice;Ingress;ingress

type Route

type Route struct {
	// Name of the receiver for this route. If not empty, it should be listed in
	// the `receivers` field.
	// +optional
	Receiver string `json:"receiver"`
	// List of labels to group by.
	// Labels must not be repeated (unique list).
	// Special label "..." (aggregate by all possible labels), if provided, must be the only element in the list.
	// +optional
	GroupBy []string `json:"groupBy,omitempty"`
	// How long to wait before sending the initial notification.
	// Must match the regular expression`^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$`
	// Example: "30s"
	// +optional
	GroupWait string `json:"groupWait,omitempty"`
	// How long to wait before sending an updated notification.
	// Must match the regular expression`^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$`
	// Example: "5m"
	// +optional
	GroupInterval string `json:"groupInterval,omitempty"`
	// How long to wait before repeating the last notification.
	// Must match the regular expression`^(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?$`
	// Example: "4h"
	// +optional
	RepeatInterval string `json:"repeatInterval,omitempty"`
	// List of matchers that the alert's labels should match. For the first
	// level route, the operator removes any existing equality and regexp
	// matcher on the `namespace` label and adds a `namespace: <object
	// namespace>` matcher.
	// +optional
	Matchers []Matcher `json:"matchers,omitempty"`
	// Boolean indicating whether an alert should continue matching subsequent
	// sibling nodes. It will always be overridden to true for the first-level
	// route by the Prometheus operator.
	// +optional
	Continue bool `json:"continue,omitempty"`
	// Child routes.
	Routes []apiextensionsv1.JSON `json:"routes,omitempty"`
	// Note: this comment applies to the field definition above but appears
	// below otherwise it gets included in the generated manifest.
	// CRD schema doesn't support self-referential types for now (see
	// https://github.com/kubernetes/kubernetes/issues/62872). We have to use
	// an alternative type to circumvent the limitation. The downside is that
	// the Kube API can't validate the data beyond the fact that it is a valid
	// JSON representation.
	// MuteTimeIntervals is a list of MuteTimeInterval names that will mute this route when matched,
	// +optional
	MuteTimeIntervals []string `json:"muteTimeIntervals,omitempty"`
	// ActiveTimeIntervals is a list of MuteTimeInterval names when this route should be active.
	// +optional
	ActiveTimeIntervals []string `json:"activeTimeIntervals,omitempty"`
}

Route defines a node in the routing tree.

func (*Route) ChildRoutes added in v0.44.0

func (r *Route) ChildRoutes() ([]Route, error)

ChildRoutes extracts the child routes.

func (*Route) DeepCopy

func (in *Route) DeepCopy() *Route

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Route.

func (*Route) DeepCopyInto

func (in *Route) DeepCopyInto(out *Route)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SDFile added in v0.65.0

type SDFile string

SDFile represents a file used for service discovery +kubebuilder:validation:Pattern=`^[^*]*(\*[^/]*)?\.(json|yml|yaml|JSON|YML|YAML)$`

type SNSConfig added in v0.54.0

type SNSConfig struct {
	// Whether or not to notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"sendResolved,omitempty"`
	// The SNS API URL i.e. https://sns.us-east-2.amazonaws.com.
	// If not specified, the SNS API URL from the SNS SDK will be used.
	// +optional
	ApiURL string `json:"apiURL,omitempty"`
	// Configures AWS's Signature Verification 4 signing process to sign requests.
	// +optional
	Sigv4 *monitoringv1.Sigv4 `json:"sigv4,omitempty"`
	// SNS topic ARN, i.e. arn:aws:sns:us-east-2:698519295917:My-Topic
	// If you don't specify this value, you must specify a value for the PhoneNumber or TargetARN.
	// +optional
	TopicARN string `json:"topicARN,omitempty"`
	// Subject line when the message is delivered to email endpoints.
	// +optional
	Subject string `json:"subject,omitempty"`
	// Phone number if message is delivered via SMS in E.164 format.
	// If you don't specify this value, you must specify a value for the TopicARN or TargetARN.
	// +optional
	PhoneNumber string `json:"phoneNumber,omitempty"`
	// The  mobile platform endpoint ARN if message is delivered via mobile notifications.
	// If you don't specify this value, you must specify a value for the topic_arn or PhoneNumber.
	// +optional
	TargetARN string `json:"targetARN,omitempty"`
	// The message content of the SNS notification.
	// +optional
	Message string `json:"message,omitempty"`
	// SNS message attributes.
	// +optional
	Attributes map[string]string `json:"attributes,omitempty"`
	// HTTP client configuration.
	// +optional
	HTTPConfig *HTTPConfig `json:"httpConfig,omitempty"`
}

SNSConfig configures notifications via AWS SNS. See https://prometheus.io/docs/alerting/latest/configuration/#sns_configs

func (*SNSConfig) DeepCopy added in v0.54.0

func (in *SNSConfig) DeepCopy() *SNSConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SNSConfig.

func (*SNSConfig) DeepCopyInto added in v0.54.0

func (in *SNSConfig) DeepCopyInto(out *SNSConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ScrapeConfig added in v0.65.0

type ScrapeConfig struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec ScrapeConfigSpec `json:"spec"`
}

ScrapeConfig defines a namespaced Prometheus scrape_config to be aggregated across multiple namespaces into the Prometheus configuration.

func (*ScrapeConfig) DeepCopy added in v0.65.0

func (in *ScrapeConfig) DeepCopy() *ScrapeConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScrapeConfig.

func (*ScrapeConfig) DeepCopyInto added in v0.65.0

func (in *ScrapeConfig) DeepCopyInto(out *ScrapeConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ScrapeConfig) DeepCopyObject added in v0.65.0

func (l *ScrapeConfig) DeepCopyObject() runtime.Object

DeepCopyObject implements the runtime.Object interface.

type ScrapeConfigList added in v0.65.0

type ScrapeConfigList 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 ScrapeConfigs
	Items []*ScrapeConfig `json:"items"`
}

ScrapeConfigList is a list of ScrapeConfigs. +k8s:openapi-gen=true

func (*ScrapeConfigList) DeepCopy added in v0.65.0

func (in *ScrapeConfigList) DeepCopy() *ScrapeConfigList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScrapeConfigList.

func (*ScrapeConfigList) DeepCopyInto added in v0.65.0

func (in *ScrapeConfigList) DeepCopyInto(out *ScrapeConfigList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ScrapeConfigList) DeepCopyObject added in v0.65.0

func (l *ScrapeConfigList) DeepCopyObject() runtime.Object

DeepCopyObject implements the runtime.Object interface.

type ScrapeConfigSpec added in v0.65.0

type ScrapeConfigSpec struct {
	// StaticConfigs defines a list of static targets with a common label set.
	// +optional
	StaticConfigs []StaticConfig `json:"staticConfigs,omitempty"`
	// FileSDConfigs defines a list of file service discovery configurations.
	// +optional
	FileSDConfigs []FileSDConfig `json:"fileSDConfigs,omitempty"`
	// HTTPSDConfigs defines a list of HTTP service discovery configurations.
	// +optional
	HTTPSDConfigs []HTTPSDConfig `json:"httpSDConfigs,omitempty"`
	// KubernetesSDConfigs defines a list of Kubernetes service discovery configurations.
	// +optional
	KubernetesSDConfigs []KubernetesSDConfig `json:"kubernetesSDConfigs,omitempty"`
	// ConsulSDConfigs defines a list of Consul service discovery configurations.
	// +optional
	ConsulSDConfigs []ConsulSDConfig `json:"consulSDConfigs,omitempty"`
	//DNSSDConfigs defines a list of DNS service discovery configurations.
	// +optional
	DNSSDConfigs []DNSSDConfig `json:"dnsSDConfigs,omitempty"`
	// EC2SDConfigs defines a list of EC2 service discovery configurations.
	// +optional
	EC2SDConfigs []EC2SDConfig `json:"ec2SDConfigs,omitempty"`
	// AzureSDConfigs defines a list of Azure service discovery configurations.
	// +optional
	AzureSDConfigs []AzureSDConfig `json:"azureSDConfigs,omitempty"`
	// GCESDConfigs defines a list of GCE service discovery configurations.
	// +optional
	GCESDConfigs []GCESDConfig `json:"gceSDConfigs,omitempty"`
	// OpenStackSDConfigs defines a list of OpenStack service discovery configurations.
	// +optional
	OpenStackSDConfigs []OpenStackSDConfig `json:"openstackSDConfigs,omitempty"`
	// DigitalOceanSDConfigs defines a list of DigitalOcean service discovery configurations.
	// +optional
	DigitalOceanSDConfigs []DigitalOceanSDConfig `json:"digitalOceanSDConfigs,omitempty"`
	// KumaSDConfigs defines a list of Kuma service discovery configurations.
	// +optional
	KumaSDConfigs []KumaSDConfig `json:"kumaSDConfigs,omitempty"`
	// EurekaSDConfigs defines a list of Eureka service discovery configurations.
	// +optional
	EurekaSDConfigs []EurekaSDConfig `json:"eurekaSDConfigs,omitempty"`
	// DockerSDConfigs defines a list of Docker service discovery configurations.
	// +optional
	DockerSDConfigs []DockerSDConfig `json:"dockerSDConfigs,omitempty"`
	// HetznerSDConfigs defines a list of Hetzner service discovery configurations.
	// +optional
	HetznerSDConfigs []HetznerSDConfig `json:"hetznerSDConfigs,omitempty"`
	// RelabelConfigs defines how to rewrite the target's labels 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
	// +optional
	RelabelConfigs []*v1.RelabelConfig `json:"relabelings,omitempty"`
	// MetricsPath HTTP path to scrape for metrics. If empty, Prometheus uses the default value (e.g. /metrics).
	// +optional
	MetricsPath *string `json:"metricsPath,omitempty"`
	// ScrapeInterval is the interval between consecutive scrapes.
	// +optional
	ScrapeInterval *v1.Duration `json:"scrapeInterval,omitempty"`
	// ScrapeTimeout is the number of seconds to wait until a scrape request times out.
	// +optional
	ScrapeTimeout *v1.Duration `json:"scrapeTimeout,omitempty"`
	// The protocols to negotiate during a scrape. It tells clients the
	// protocols supported by Prometheus in order of preference (from most to least preferred).
	//
	// If unset, Prometheus uses its default value.
	//
	// It requires Prometheus >= v2.49.0.
	//
	// +listType=set
	// +optional
	ScrapeProtocols []v1.ScrapeProtocol `json:"scrapeProtocols,omitempty"`
	// HonorTimestamps controls whether Prometheus respects the timestamps present in scraped data.
	// +optional
	HonorTimestamps *bool `json:"honorTimestamps,omitempty"`
	// TrackTimestampsStaleness whether Prometheus tracks staleness of
	// the metrics that have an explicit timestamp present in scraped data.
	// Has no effect if `honorTimestamps` is false.
	// It requires Prometheus >= v2.48.0.
	//
	// +optional
	TrackTimestampsStaleness *bool `json:"trackTimestampsStaleness,omitempty"`
	// HonorLabels chooses the metric's labels on collisions with target labels.
	// +optional
	HonorLabels *bool `json:"honorLabels,omitempty"`
	// Optional HTTP URL parameters
	// +optional
	// +mapType:=atomic
	Params map[string][]string `json:"params,omitempty"`
	// Configures the protocol scheme used for requests.
	// If empty, Prometheus uses HTTP by default.
	// +kubebuilder:validation:Enum=HTTP;HTTPS
	// +optional
	Scheme *string `json:"scheme,omitempty"`
	// When false, Prometheus will request uncompressed response from the scraped target.
	//
	// It requires Prometheus >= v2.49.0.
	//
	// If unset, Prometheus uses true by default.
	// +optional
	EnableCompression *bool `json:"enableCompression,omitempty"`
	// BasicAuth information to use on every scrape request.
	// +optional
	BasicAuth *v1.BasicAuth `json:"basicAuth,omitempty"`
	// Authorization header to use on every scrape request.
	// +optional
	Authorization *v1.SafeAuthorization `json:"authorization,omitempty"`
	// TLS configuration to use on every scrape request
	// +optional
	TLSConfig *v1.SafeTLSConfig `json:"tlsConfig,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"`
	// MetricRelabelConfigs to apply to samples before ingestion.
	// +optional
	MetricRelabelConfigs []*v1.RelabelConfig `json:"metricRelabelings,omitempty"`
	// ProxyConfig allows customizing the proxy behaviour for this scrape config.
	// +optional
	v1.ProxyConfig `json:",inline"`

	// The scrape class to apply.
	// +optional
	// +kubebuilder:validation:MinLength=1
	ScrapeClassName *string `json:"scrapeClass,omitempty"`
}

ScrapeConfigSpec is a specification of the desired configuration for a scrape configuration. +k8s:openapi-gen=true

func (*ScrapeConfigSpec) DeepCopy added in v0.65.0

func (in *ScrapeConfigSpec) DeepCopy() *ScrapeConfigSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScrapeConfigSpec.

func (*ScrapeConfigSpec) DeepCopyInto added in v0.65.0

func (in *ScrapeConfigSpec) DeepCopyInto(out *ScrapeConfigSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SlackAction added in v0.44.0

type SlackAction struct {
	// +kubebuilder:validation:MinLength=1
	Type string `json:"type"`
	// +kubebuilder:validation:MinLength=1
	Text string `json:"text"`
	// +optional
	URL string `json:"url,omitempty"`
	// +optional
	Style string `json:"style,omitempty"`
	// +optional
	Name string `json:"name,omitempty"`
	// +optional
	Value string `json:"value,omitempty"`
	// +optional
	ConfirmField *SlackConfirmationField `json:"confirm,omitempty"`
}

SlackAction configures a single Slack action that is sent with each notification. See https://api.slack.com/docs/message-attachments#action_fields and https://api.slack.com/docs/message-buttons for more information.

func (*SlackAction) DeepCopy added in v0.44.0

func (in *SlackAction) DeepCopy() *SlackAction

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SlackAction.

func (*SlackAction) DeepCopyInto added in v0.44.0

func (in *SlackAction) DeepCopyInto(out *SlackAction)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SlackAction) Validate added in v0.44.0

func (sa *SlackAction) Validate() error

Validate ensures SlackAction is valid.

type SlackConfig added in v0.44.0

type SlackConfig struct {
	// Whether or not to notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"sendResolved,omitempty"`
	// The secret's key that contains the Slack webhook URL.
	// The secret needs to be in the same namespace as the AlertmanagerConfig
	// object and accessible by the Prometheus Operator.
	// +optional
	APIURL *v1.SecretKeySelector `json:"apiURL,omitempty"`
	// The channel or user to send notifications to.
	// +optional
	Channel string `json:"channel,omitempty"`
	// +optional
	Username string `json:"username,omitempty"`
	// +optional
	Color string `json:"color,omitempty"`
	// +optional
	Title string `json:"title,omitempty"`
	// +optional
	TitleLink string `json:"titleLink,omitempty"`
	// +optional
	Pretext string `json:"pretext,omitempty"`
	// +optional
	Text string `json:"text,omitempty"`
	// A list of Slack fields that are sent with each notification.
	// +optional
	Fields []SlackField `json:"fields,omitempty"`
	// +optional
	ShortFields bool `json:"shortFields,omitempty"`
	// +optional
	Footer string `json:"footer,omitempty"`
	// +optional
	Fallback string `json:"fallback,omitempty"`
	// +optional
	CallbackID string `json:"callbackId,omitempty"`
	// +optional
	IconEmoji string `json:"iconEmoji,omitempty"`
	// +optional
	IconURL string `json:"iconURL,omitempty"`
	// +optional
	ImageURL string `json:"imageURL,omitempty"`
	// +optional
	ThumbURL string `json:"thumbURL,omitempty"`
	// +optional
	LinkNames bool `json:"linkNames,omitempty"`
	// +optional
	MrkdwnIn []string `json:"mrkdwnIn,omitempty"`
	// A list of Slack actions that are sent with each notification.
	// +optional
	Actions []SlackAction `json:"actions,omitempty"`
	// HTTP client configuration.
	// +optional
	HTTPConfig *HTTPConfig `json:"httpConfig,omitempty"`
}

SlackConfig configures notifications via Slack. See https://prometheus.io/docs/alerting/latest/configuration/#slack_config

func (*SlackConfig) DeepCopy added in v0.44.0

func (in *SlackConfig) DeepCopy() *SlackConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SlackConfig.

func (*SlackConfig) DeepCopyInto added in v0.44.0

func (in *SlackConfig) DeepCopyInto(out *SlackConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SlackConfig) Validate added in v0.44.0

func (sc *SlackConfig) Validate() error

Validate ensures SlackConfig is valid.

type SlackConfirmationField added in v0.44.0

type SlackConfirmationField struct {
	// +kubebuilder:validation:MinLength=1
	Text string `json:"text"`
	// +optional
	Title string `json:"title,omitempty"`
	// +optional
	OkText string `json:"okText,omitempty"`
	// +optional
	DismissText string `json:"dismissText,omitempty"`
}

SlackConfirmationField protect users from destructive actions or particularly distinguished decisions by asking them to confirm their button click one more time. See https://api.slack.com/docs/interactive-message-field-guide#confirmation_fields for more information.

func (*SlackConfirmationField) DeepCopy added in v0.44.0

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SlackConfirmationField.

func (*SlackConfirmationField) DeepCopyInto added in v0.44.0

func (in *SlackConfirmationField) DeepCopyInto(out *SlackConfirmationField)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SlackConfirmationField) Validate added in v0.44.0

func (scf *SlackConfirmationField) Validate() error

Validate ensures SlackConfirmationField is valid.

type SlackField added in v0.44.0

type SlackField struct {
	// +kubebuilder:validation:MinLength=1
	Title string `json:"title"`
	// +kubebuilder:validation:MinLength=1
	Value string `json:"value"`
	// +optional
	Short *bool `json:"short,omitempty"`
}

SlackField configures a single Slack field that is sent with each notification. Each field must contain a title, value, and optionally, a boolean value to indicate if the field is short enough to be displayed next to other fields designated as short. See https://api.slack.com/docs/message-attachments#fields for more information.

func (*SlackField) DeepCopy added in v0.44.0

func (in *SlackField) DeepCopy() *SlackField

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SlackField.

func (*SlackField) DeepCopyInto added in v0.44.0

func (in *SlackField) DeepCopyInto(out *SlackField)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SlackField) Validate added in v0.44.0

func (sf *SlackField) Validate() error

Validate ensures SlackField is valid

type StaticConfig added in v0.65.0

type StaticConfig struct {
	// List of targets for this static configuration.
	// +optional
	Targets []Target `json:"targets,omitempty"`
	// Labels assigned to all metrics scraped from the targets.
	// +mapType:=atomic
	// +optional
	Labels map[v1.LabelName]string `json:"labels,omitempty"`
}

StaticConfig defines a Prometheus static configuration. See https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config +k8s:openapi-gen=true

func (*StaticConfig) DeepCopy added in v0.65.0

func (in *StaticConfig) DeepCopy() *StaticConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StaticConfig.

func (*StaticConfig) DeepCopyInto added in v0.65.0

func (in *StaticConfig) DeepCopyInto(out *StaticConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Target added in v0.65.0

type Target string

Target represents a target for Prometheus to scrape

type TelegramConfig added in v0.57.0

type TelegramConfig struct {
	// Whether to notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"sendResolved,omitempty"`
	// The Telegram API URL i.e. https://api.telegram.org.
	// If not specified, default API URL will be used.
	// +optional
	APIURL string `json:"apiURL,omitempty"`
	// Telegram bot token. It is mutually exclusive with `botTokenFile`.
	// The secret needs to be in the same namespace as the AlertmanagerConfig
	// object and accessible by the Prometheus Operator.
	//
	// Either `botToken` or `botTokenFile` is required.
	//
	//+optional
	BotToken *v1.SecretKeySelector `json:"botToken,omitempty"`
	// File to read the Telegram bot token from. It is mutually exclusive with `botToken`.
	// Either `botToken` or `botTokenFile` is required.
	//
	// It requires Alertmanager >= v0.26.0.
	//
	// +optional
	BotTokenFile *string `json:"botTokenFile,omitempty"`
	// The Telegram chat ID.
	// +required
	ChatID int64 `json:"chatID,omitempty"`
	// Message template
	// +optional
	Message string `json:"message,omitempty"`
	// Disable telegram notifications
	// +optional
	DisableNotifications *bool `json:"disableNotifications,omitempty"`
	// Parse mode for telegram message
	//+kubebuilder:validation:Enum=MarkdownV2;Markdown;HTML
	// +optional
	ParseMode string `json:"parseMode,omitempty"`
	// HTTP client configuration.
	// +optional
	HTTPConfig *HTTPConfig `json:"httpConfig,omitempty"`
}

TelegramConfig configures notifications via Telegram. See https://prometheus.io/docs/alerting/latest/configuration/#telegram_config

func (*TelegramConfig) DeepCopy added in v0.57.0

func (in *TelegramConfig) DeepCopy() *TelegramConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TelegramConfig.

func (*TelegramConfig) DeepCopyInto added in v0.57.0

func (in *TelegramConfig) DeepCopyInto(out *TelegramConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Time added in v0.53.0

type Time string

Time defines a time in 24hr format +kubebuilder:validation:Pattern=`^((([01][0-9])|(2[0-3])):[0-5][0-9])$|(^24:00$)`

type TimeInterval added in v0.53.0

type TimeInterval struct {
	// Times is a list of TimeRange
	// +optional
	Times []TimeRange `json:"times,omitempty"`
	// Weekdays is a list of WeekdayRange
	// +optional
	Weekdays []WeekdayRange `json:"weekdays,omitempty"`
	// DaysOfMonth is a list of DayOfMonthRange
	// +optional
	DaysOfMonth []DayOfMonthRange `json:"daysOfMonth,omitempty"`
	// Months is a list of MonthRange
	// +optional
	Months []MonthRange `json:"months,omitempty"`
	// Years is a list of YearRange
	// +optional
	Years []YearRange `json:"years,omitempty"`
}

TimeInterval describes intervals of time

func (*TimeInterval) DeepCopy added in v0.53.0

func (in *TimeInterval) DeepCopy() *TimeInterval

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimeInterval.

func (*TimeInterval) DeepCopyInto added in v0.53.0

func (in *TimeInterval) DeepCopyInto(out *TimeInterval)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TimeRange added in v0.53.0

type TimeRange struct {
	// StartTime is the start time in 24hr format.
	StartTime Time `json:"startTime,omitempty"`
	// EndTime is the end time in 24hr format.
	EndTime Time `json:"endTime,omitempty"`
}

TimeRange defines a start and end time in 24hr format

func (*TimeRange) DeepCopy added in v0.53.0

func (in *TimeRange) DeepCopy() *TimeRange

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimeRange.

func (*TimeRange) DeepCopyInto added in v0.53.0

func (in *TimeRange) DeepCopyInto(out *TimeRange)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (TimeRange) Parse added in v0.53.0

func (tr TimeRange) Parse() (*ParsedRange, error)

Parse returns a ParsedRange on valid input or an error if the fields cannot be parsed End of the day is represented as 1440.

func (TimeRange) Validate added in v0.53.0

func (tr TimeRange) Validate() error

Validate the TimeRange

type URL added in v0.68.0

type URL string

URL represents a valid URL +kubebuilder:validation:Pattern=`^https?://.+$`

type VictorOpsConfig added in v0.44.0

type VictorOpsConfig struct {
	// Whether or not to notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"sendResolved,omitempty"`
	// The secret's key that contains the API key to use when talking to the VictorOps API.
	// The secret needs to be in the same namespace as the AlertmanagerConfig
	// object and accessible by the Prometheus Operator.
	// +optional
	APIKey *v1.SecretKeySelector `json:"apiKey,omitempty"`
	// The VictorOps API URL.
	// +optional
	APIURL string `json:"apiUrl,omitempty"`
	// A key used to map the alert to a team.
	// +optional
	RoutingKey string `json:"routingKey"`
	// Describes the behavior of the alert (CRITICAL, WARNING, INFO).
	// +optional
	MessageType string `json:"messageType,omitempty"`
	// Contains summary of the alerted problem.
	// +optional
	EntityDisplayName string `json:"entityDisplayName,omitempty"`
	// Contains long explanation of the alerted problem.
	// +optional
	StateMessage string `json:"stateMessage,omitempty"`
	// The monitoring tool the state message is from.
	// +optional
	MonitoringTool string `json:"monitoringTool,omitempty"`
	// Additional custom fields for notification.
	// +optional
	CustomFields []KeyValue `json:"customFields,omitempty"`
	// The HTTP client's configuration.
	// +optional
	HTTPConfig *HTTPConfig `json:"httpConfig,omitempty"`
}

VictorOpsConfig configures notifications via VictorOps. See https://prometheus.io/docs/alerting/latest/configuration/#victorops_config

func (*VictorOpsConfig) DeepCopy added in v0.44.0

func (in *VictorOpsConfig) DeepCopy() *VictorOpsConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VictorOpsConfig.

func (*VictorOpsConfig) DeepCopyInto added in v0.44.0

func (in *VictorOpsConfig) DeepCopyInto(out *VictorOpsConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WeChatConfig added in v0.44.0

type WeChatConfig struct {
	// Whether or not to notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"sendResolved,omitempty"`
	// The secret's key that contains the WeChat API key.
	// The secret needs to be in the same namespace as the AlertmanagerConfig
	// object and accessible by the Prometheus Operator.
	// +optional
	APISecret *v1.SecretKeySelector `json:"apiSecret,omitempty"`
	// The WeChat API URL.
	// +optional
	APIURL string `json:"apiURL,omitempty"`
	// The corp id for authentication.
	// +optional
	CorpID string `json:"corpID,omitempty"`
	// +optional
	AgentID string `json:"agentID,omitempty"`
	// +optional
	ToUser string `json:"toUser,omitempty"`
	// +optional
	ToParty string `json:"toParty,omitempty"`
	// +optional
	ToTag string `json:"toTag,omitempty"`
	// API request data as defined by the WeChat API.
	Message string `json:"message,omitempty"`
	// +optional
	MessageType string `json:"messageType,omitempty"`
	// HTTP client configuration.
	// +optional
	HTTPConfig *HTTPConfig `json:"httpConfig,omitempty"`
}

WeChatConfig configures notifications via WeChat. See https://prometheus.io/docs/alerting/latest/configuration/#wechat_config

func (*WeChatConfig) DeepCopy added in v0.44.0

func (in *WeChatConfig) DeepCopy() *WeChatConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WeChatConfig.

func (*WeChatConfig) DeepCopyInto added in v0.44.0

func (in *WeChatConfig) DeepCopyInto(out *WeChatConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WebexConfig added in v0.68.0

type WebexConfig struct {
	// Whether to notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"sendResolved,omitempty"`

	// The Webex Teams API URL i.e. https://webexapis.com/v1/messages
	// Provide if different from the default API URL.
	// +optional
	APIURL *URL `json:"apiURL,omitempty"`

	// The HTTP client's configuration.
	// You must supply the bot token via the `httpConfig.authorization` field.
	// +optional
	HTTPConfig *HTTPConfig `json:"httpConfig,omitempty"`

	// Message template
	// +optional
	Message *string `json:"message,omitempty"`

	// ID of the Webex Teams room where to send the messages.
	// +kubebuilder:validation:MinLength=1
	// +required
	RoomID string `json:"roomID"`
}

WebexConfig configures notification via Cisco Webex See https://prometheus.io/docs/alerting/latest/configuration/#webex_config

func (*WebexConfig) DeepCopy added in v0.68.0

func (in *WebexConfig) DeepCopy() *WebexConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebexConfig.

func (*WebexConfig) DeepCopyInto added in v0.68.0

func (in *WebexConfig) DeepCopyInto(out *WebexConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type WebhookConfig

type WebhookConfig struct {
	// Whether or not to notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"sendResolved,omitempty"`
	// The URL to send HTTP POST requests to. `urlSecret` takes precedence over
	// `url`. One of `urlSecret` and `url` should be defined.
	// +optional
	URL *string `json:"url,omitempty"`
	// The secret's key that contains the webhook URL to send HTTP requests to.
	// `urlSecret` takes precedence over `url`. One of `urlSecret` and `url`
	// should be defined.
	// The secret needs to be in the same namespace as the AlertmanagerConfig
	// object and accessible by the Prometheus Operator.
	// +optional
	URLSecret *v1.SecretKeySelector `json:"urlSecret,omitempty"`
	// HTTP client configuration.
	// +optional
	HTTPConfig *HTTPConfig `json:"httpConfig,omitempty"`
	// Maximum number of alerts to be sent per webhook message. When 0, all alerts are included.
	// +optional
	// +kubebuilder:validation:Minimum=0
	MaxAlerts int32 `json:"maxAlerts,omitempty"`
}

WebhookConfig configures notifications via a generic receiver supporting the webhook payload. See https://prometheus.io/docs/alerting/latest/configuration/#webhook_config

func (*WebhookConfig) DeepCopy

func (in *WebhookConfig) DeepCopy() *WebhookConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookConfig.

func (*WebhookConfig) DeepCopyInto

func (in *WebhookConfig) DeepCopyInto(out *WebhookConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Weekday added in v0.53.0

type Weekday string

Weekday is day of the week

const (
	Sunday    Weekday = "sunday"
	Monday    Weekday = "monday"
	Tuesday   Weekday = "tuesday"
	Wednesday Weekday = "wednesday"
	Thursday  Weekday = "thursday"
	Friday    Weekday = "friday"
	Saturday  Weekday = "saturday"
)

func (Weekday) Int added in v0.53.0

func (w Weekday) Int() (int, error)

Int returns an integer, which is the canonical representation of the Weekday in upstream types. Returns an error if the Weekday is invalid

type WeekdayRange added in v0.53.0

type WeekdayRange string

WeekdayRange is an inclusive range of days of the week beginning on Sunday Days can be specified by name (e.g 'Sunday') or as an inclusive range (e.g 'Monday:Friday') +kubebuilder:validation:Pattern=`^((?i)sun|mon|tues|wednes|thurs|fri|satur)day(?:((:(sun|mon|tues|wednes|thurs|fri|satur)day)$)|$)`

func (WeekdayRange) Parse added in v0.53.0

func (wr WeekdayRange) Parse() (*ParsedRange, error)

Parse returns a ParsedRange on valid input or an error if the fields cannot be parsed The week starts on Sunday -> 0

func (WeekdayRange) Validate added in v0.53.0

func (wr WeekdayRange) Validate() error

Validate the WeekdayRange

type YearRange added in v0.53.0

type YearRange string

YearRange is an inclusive range of years +kubebuilder:validation:Pattern=`^2\d{3}(?::2\d{3}|$)`

func (YearRange) Parse added in v0.53.0

func (yr YearRange) Parse() (*ParsedRange, error)

Parse returns a ParsedRange on valid input or an error if the fields cannot be parsed

func (YearRange) Validate added in v0.53.0

func (yr YearRange) Validate() error

Validate the YearRange

Jump to

Keyboard shortcuts

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