v1beta1

package
v0.58.1 Latest Latest
Warning

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

Go to latest
Published: May 27, 2025 License: Apache-2.0 Imports: 34 Imported by: 12

Documentation

Overview

Package v1beta1 contains API Schema definitions for the victoriametrics v1beta1 API group +kubebuilder:object:generate=true +groupName=operator.victoriametrics.com

Index

Constants

View Source
const (
	// FinalizerName name of vm-operator finalizer.
	FinalizerName            = "apps.victoriametrics.com/finalizer"
	SkipValidationAnnotation = "operator.victoriametrics.com/skip-validation"
	APIGroup                 = "operator.victoriametrics.com"
	SkipValidationValue      = "true"
	AdditionalServiceLabel   = "operator.victoriametrics.com/additional-service"
	// PVCExpandableLabel controls checks for storageClass
	PVCExpandableLabel = "operator.victoriametrics.com/pvc-allow-volume-expansion"
)
View Source
const (
	SecretsDir          = "/etc/vm/secrets"
	ConfigMapsDir       = "/etc/vm/configs"
	TemplatesDir        = "/etc/vm/templates"
	StreamAggrConfigDir = "/etc/vm/stream-aggr"
	RelabelingConfigDir = "/etc/vm/relabeling"
)
View Source
const (
	// ConditionParsingReason defines reason for child objects
	ConditionParsingReason = "ConfigParsedAndApplied"
	// ConditionDomainTypeAppliedSuffix defines type suffix for ConditionParsingReason reason
	ConditionDomainTypeAppliedSuffix = ".victoriametrics.com/Applied"
)
View Source
const (
	// MetaVMAlertDeduplicateRulesKey - controls behavior for vmalert rules deduplication
	// its useful for migration from prometheus.
	MetaVMAlertDeduplicateRulesKey = "operator.victoriametrics.com/vmalert-deduplicate-rules"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "operator.victoriametrics.com", Version: "v1beta1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var MaxConfigMapDataSize = int(float64(v1.MaxSecretSize) * 0.5)

MaxConfigMapDataSize is a maximum `Data` field size of a ConfigMap. Limit it to the half size of constant value, since it may be different for kubernetes versions.

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: "operator.victoriametrics.com", Version: "v1beta1"}

SchemeGroupVersion is group version used to register these objects

Functions

func AddFinalizer

func AddFinalizer(dst, src client.Object)

AddFinalizer conditionally adds vm-operator finalizer to the dst object respectfully merges exist finalizers from src to dst

func AddFinalizerAndThen

func AddFinalizerAndThen(src client.Object, andThen func(client.Object) error) error

AddFinalizerAndThen conditionally adds vm-operator finalizer to the dst object respectfully merges exist finalizers from src to dst if finalizer was added, performs callback

func BuildReloadPathWithPort

func BuildReloadPathWithPort(extraArgs map[string]string, port string) string

BuildReloadPathWithPort builds reload api path for given args

func GetCRDAsOwner

func GetCRDAsOwner(name CRDName) []v1.OwnerReference

GetCRDAsOwner returns owner references with global CustomResourceDefinition object as owner useful for non-namespaced objects, like clusterRole

func Init

func Init(ctx context.Context, rclient client.Client) error

func RemoveFinalizer

func RemoveFinalizer(src client.Object, andThen func(client.Object) error) error

RemoveFinalizer - removes vm-operator finalizer from finalizers list. executes provided callback if finalizer found

func RemoveFinalizerWithOwnerReference

func RemoveFinalizerWithOwnerReference(src client.Object, keepOwnerReference bool, andThen func(client.Object) error) error

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

func SetLabelAndAnnotationPrefixes

func SetLabelAndAnnotationPrefixes(labelPrefixes, annotationPrefixes []string)

SetLabelAndAnnotationPrefixes configures global filtering for child labels and annotations cannot be used concurrently and should be called only once at lib init TODO: @f41gh7 deprecated at will be removed at v0.52.0 release

func ValidateAlertmanagerConfigSpec

func ValidateAlertmanagerConfigSpec(srcYAML []byte) error

ValidateAlertmanagerConfigSpec verifies that provided raw alertmanger configuration is logically valid according to alertmanager config parser

Types

type APIServerConfig

type APIServerConfig struct {
	// Host of apiserver.
	// A valid string consisting of a hostname or IP followed by an optional port number
	Host string `json:"host"`
	// BasicAuth allow an endpoint to authenticate over basic authentication
	// +optional
	BasicAuth *BasicAuth `json:"basicAuth,omitempty"`
	// Bearer token for accessing apiserver.
	// +optional
	BearerToken string `json:"bearerToken,omitempty"`
	// File to read bearer token for accessing apiserver.
	// +optional
	BearerTokenFile string `json:"bearerTokenFile,omitempty"`
	// TLSConfig Config to use for accessing apiserver.
	// +optional
	TLSConfig *TLSConfig `json:"tlsConfig,omitempty"`
	// +optional
	Authorization *Authorization `json:"authorization,omitempty"`
}

APIServerConfig defines a host and auth methods to access apiserver. +k8s:openapi-gen=true

func (*APIServerConfig) DeepCopy

func (in *APIServerConfig) DeepCopy() *APIServerConfig

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

func (*APIServerConfig) DeepCopyInto

func (in *APIServerConfig) DeepCopyInto(out *APIServerConfig)

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

type AdditionalServiceSpec

type AdditionalServiceSpec struct {
	// UseAsDefault applies changes from given service definition to the main object Service
	// Changing from headless service to clusterIP or loadbalancer may break cross-component communication
	// +optional
	UseAsDefault bool `json:"useAsDefault,omitempty"`
	// EmbeddedObjectMetadata defines objectMeta for additional service.
	// +optional
	EmbeddedObjectMetadata `json:"metadata,omitempty"`
	// ServiceSpec describes the attributes that a user creates on a service.
	// More info: https://kubernetes.io/docs/concepts/services-networking/service/
	Spec v1.ServiceSpec `json:"spec"`
}

ServiceSpec defines additional service for CRD with user-defined params. by default, some of fields can be inherited from default service definition for the CRD: labels,selector, ports. if metadata.name is not defined, service will have format {{CRD_TYPE}}-{{CRD_NAME}}-additional-service. if UseAsDefault is set to true, changes applied to the main service without additional service creation +k8s:openapi-gen=true

func (*AdditionalServiceSpec) DeepCopy

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

func (*AdditionalServiceSpec) DeepCopyInto

func (in *AdditionalServiceSpec) DeepCopyInto(out *AdditionalServiceSpec)

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

func (*AdditionalServiceSpec) IsSomeAndThen

func (asc *AdditionalServiceSpec) IsSomeAndThen(cb func(s *AdditionalServiceSpec) error) error

IsSomeAndThen applies callback to the addtionalServiceSpec if it's not nil or do not used as default service

func (*AdditionalServiceSpec) NameOrDefault

func (ss *AdditionalServiceSpec) NameOrDefault(defaultName string) string

NameOrDefault returns name or default value with suffix

type AlertmanagerGossipConfig

type AlertmanagerGossipConfig struct {
	// TLSServerConfig defines server TLS configuration for alertmanager
	TLSServerConfig *TLSServerConfig `json:"tls_server_config,omitempty"`
	// TLSClientConfig defines client TLS configuration for alertmanager
	TLSClientConfig *TLSClientConfig `json:"tls_client_config,omitempty"`
}

AlertmanagerGossipConfig defines Gossip TLS configuration for alertmanager

func (*AlertmanagerGossipConfig) DeepCopy

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

func (*AlertmanagerGossipConfig) DeepCopyInto

func (in *AlertmanagerGossipConfig) DeepCopyInto(out *AlertmanagerGossipConfig)

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

type AlertmanagerHTTPConfig

type AlertmanagerHTTPConfig struct {
	// HTTP2 enables HTTP/2 support. Note that HTTP/2 is only supported with TLS.
	// This can not be changed on the fly.
	// +optional
	HTTP2 bool `json:"http2,omitempty"`
	// Headers defines list of headers that can be added to HTTP responses.
	// +optional
	Headers map[string]string `json:"headers,omitempty"`
}

AlertmanagerHTTPConfig defines http server configuration for alertmanager

func (*AlertmanagerHTTPConfig) DeepCopy

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

func (*AlertmanagerHTTPConfig) DeepCopyInto

func (in *AlertmanagerHTTPConfig) DeepCopyInto(out *AlertmanagerHTTPConfig)

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

type AlertmanagerWebConfig

type AlertmanagerWebConfig struct {
	// TLSServerConfig defines server TLS configuration for alertmanager
	// +optional
	TLSServerConfig *TLSServerConfig `json:"tls_server_config,omitempty"`
	// HTTPServerConfig defines http server configuration for alertmanager web server
	// +optional
	HTTPServerConfig *AlertmanagerHTTPConfig `json:"http_server_config,omitempty"`
	// BasicAuthUsers Usernames and hashed passwords that have full access to the web server
	// Passwords must be hashed with bcrypt
	// +optional
	BasicAuthUsers map[string]string `json:"basic_auth_users,omitempty"`
}

AlertmanagerWebConfig defines web server configuration for alertmanager

func (*AlertmanagerWebConfig) DeepCopy

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

func (*AlertmanagerWebConfig) DeepCopyInto

func (in *AlertmanagerWebConfig) DeepCopyInto(out *AlertmanagerWebConfig)

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

type ArbitraryFSAccessThroughSMsConfig

type ArbitraryFSAccessThroughSMsConfig struct {
	Deny bool `json:"deny,omitempty"`
}

ArbitraryFSAccessThroughSMsConfig enables users to configure, whether a service scrape selected by the vmagent instance is allowed to use arbitrary files on the file system of the vmagent container. This is the case when e.g. a service scrape specifies a BearerTokenFile in an endpoint. A malicious user could create a service scrape selecting arbitrary secret files in the vmagent container. Those secrets would then be sent with a scrape request by vmagent to a malicious target. Denying the above would prevent the attack, users can instead use the BearerTokenSecret field.

func (*ArbitraryFSAccessThroughSMsConfig) DeepCopy

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

func (*ArbitraryFSAccessThroughSMsConfig) DeepCopyInto

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

type AttachMetadata

type AttachMetadata struct {
	// Node instructs vmagent to add node specific metadata from service discovery
	// Valid for roles: pod, endpoints, endpointslice.
	// +optional
	Node *bool `json:"node,omitempty"`
}

AttachMetadata configures metadata attachment

func (*AttachMetadata) DeepCopy

func (in *AttachMetadata) DeepCopy() *AttachMetadata

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

func (*AttachMetadata) DeepCopyInto

func (in *AttachMetadata) DeepCopyInto(out *AttachMetadata)

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

type Authorization

type Authorization struct {
	// Type of authorization, default to bearer
	// +optional
	Type string `json:"type,omitempty"`
	// Reference to the secret with value for authorization
	Credentials *v1.SecretKeySelector `json:"credentials,omitempty"`
	// File with value for authorization
	// +optional
	CredentialsFile string `json:"credentialsFile,omitempty" yaml:"credentials_file,omitempty"`
}

Authorization configures generic authorization params

func (*Authorization) DeepCopy

func (in *Authorization) DeepCopy() *Authorization

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

func (*Authorization) DeepCopyInto

func (in *Authorization) DeepCopyInto(out *Authorization)

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

type AzureSDConfig

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"`
	// 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 [here](https://docs.victoriametrics.com/sd_configs#azure_sd_configs) +k8s:openapi-gen=true

func (*AzureSDConfig) DeepCopy

func (in *AzureSDConfig) DeepCopy() *AzureSDConfig

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

func (*AzureSDConfig) DeepCopyInto

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

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

type BasicAuth

type BasicAuth struct {
	// Username defines reference for secret with username value
	// The secret needs to be in the same namespace as scrape object
	// +optional
	Username v1.SecretKeySelector `json:"username,omitempty"`
	// Password defines reference for secret with password value
	// The secret needs to be in the same namespace as scrape object
	// +optional
	Password v1.SecretKeySelector `json:"password,omitempty"`
	// PasswordFile defines path to password file at disk
	// must be pre-mounted
	// +optional
	PasswordFile string `json:"password_file,omitempty" yaml:"password_file,omitempty"`
}

BasicAuth allow an endpoint to authenticate over basic authentication +k8s:openapi-gen=true

func (*BasicAuth) DeepCopy

func (in *BasicAuth) DeepCopy() *BasicAuth

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

func (*BasicAuth) DeepCopyInto

func (in *BasicAuth) DeepCopyInto(out *BasicAuth)

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

type BearerAuth

type BearerAuth struct {
	// Path to bearer token file
	// +optional
	TokenFilePath string `json:"bearerTokenFile,omitempty"`
	// Optional bearer auth token to use for -remoteWrite.url
	// +optional
	TokenSecret *v1.SecretKeySelector `json:"bearerTokenSecret,omitempty"`
}

BearerAuth defines auth with bearer token

func (*BearerAuth) DeepCopy

func (in *BearerAuth) DeepCopy() *BearerAuth

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

func (*BearerAuth) DeepCopyInto

func (in *BearerAuth) DeepCopyInto(out *BearerAuth)

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

type BytesString added in v0.55.0

type BytesString string

BytesString represents bytes value defined directly as integer or as a string with suffix - kb,mb,gb,tb,KiB,MiB,GiB,TiB

func (*BytesString) MarshalJSON added in v0.55.0

func (bs *BytesString) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaller interface

func (*BytesString) String added in v0.55.0

func (bs *BytesString) String() string

String implements Stringer interface

func (*BytesString) UnmarshalJSON added in v0.55.0

func (bs *BytesString) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaller interface

type CRDName

type CRDName int
const (
	Agent CRDName = iota
	Alert
	Single
	Cluster
	Auth
	AlertManager
)

func (CRDName) String

func (c CRDName) String() string

type CRDRef

type CRDRef struct {
	// Kind one of:
	// VMAgent,VMAlert, VMSingle, VMCluster/vmselect, VMCluster/vmstorage,VMCluster/vminsert  or VMAlertManager
	// +kubebuilder:validation:Enum=VMAgent;VMAlert;VMSingle;VLogs;VMAlertManager;VMAlertmanager;VMCluster/vmselect;VMCluster/vmstorage;VMCluster/vminsert
	Kind string `json:"kind"`
	// Name target CRD object name
	Name string `json:"name"`
	// Namespace target CRD object namespace.
	Namespace string `json:"namespace"`
}

CRDRef describe CRD target reference.

func (*CRDRef) AddRefToObj

func (cr *CRDRef) AddRefToObj(obj client.Object) client.Object

AddRefToObj adds reference to given object and return it.

func (*CRDRef) AsKey

func (cr *CRDRef) AsKey() string

func (*CRDRef) DeepCopy

func (in *CRDRef) DeepCopy() *CRDRef

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

func (*CRDRef) DeepCopyInto

func (in *CRDRef) DeepCopyInto(out *CRDRef)

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

type Certs

type Certs struct {
	// CertSecretRef defines reference for secret with certificate content under given key
	// mutually exclusive with CertFile
	// +optional
	CertSecretRef *v1.SecretKeySelector `json:"cert_secret_ref,omitempty"`
	// CertFile defines path to the pre-mounted file with certificate
	// mutually exclusive with CertSecretRef
	// +optional
	CertFile string `json:"cert_file,omitempty"`
	// Key defines reference for secret with certificate key content under given key
	// mutually exclusive with KeyFile
	// +optional
	KeySecretRef *v1.SecretKeySelector `json:"key_secret_ref,omitempty"`
	// KeyFile defines path to the pre-mounted file with certificate key
	// mutually exclusive with KeySecretRef
	// +optional
	KeyFile string `json:"key_file,omitempty"`
}

Certs defines TLS certs configuration

func (*Certs) DeepCopy

func (in *Certs) DeepCopy() *Certs

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

func (*Certs) DeepCopyInto

func (in *Certs) DeepCopyInto(out *Certs)

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

type CommonApplicationDeploymentParams

type CommonApplicationDeploymentParams struct {
	// Affinity If specified, the pod's scheduling constraints.
	// +optional
	Affinity *v1.Affinity `json:"affinity,omitempty"`
	// Tolerations If specified, the pod's tolerations.
	// +optional
	Tolerations []v1.Toleration `json:"tolerations,omitempty"`
	// SchedulerName - defines kubernetes scheduler name
	// +optional
	SchedulerName string `json:"schedulerName,omitempty"`
	// RuntimeClassName - defines runtime class for kubernetes pod.
	// https://kubernetes.io/docs/concepts/containers/runtime-class/
	// +optional
	RuntimeClassName *string `json:"runtimeClassName,omitempty"`
	// HostAliases provides mapping for ip and hostname,
	// that would be propagated to pod,
	// cannot be used with HostNetwork.
	// +optional
	HostAliases []v1.HostAlias `json:"hostAliases,omitempty"`
	// HostAliasesUnderScore provides mapping for ip and hostname,
	// that would be propagated to pod,
	// cannot be used with HostNetwork.
	// Has Priority over hostAliases field
	// +optional
	HostAliasesUnderScore []v1.HostAlias `json:"host_aliases,omitempty"`
	// PriorityClassName class assigned to the Pods
	// +optional
	PriorityClassName string `json:"priorityClassName,omitempty"`
	// HostNetwork controls whether the pod may use the node network namespace
	// +optional
	HostNetwork bool `json:"hostNetwork,omitempty"`
	// DNSPolicy sets DNS policy for the pod
	// +optional
	DNSPolicy v1.DNSPolicy `json:"dnsPolicy,omitempty"`
	// Specifies the DNS parameters of a pod.
	// Parameters specified here will be merged to the generated DNS
	// configuration based on DNSPolicy.
	// +optional
	DNSConfig *v1.PodDNSConfig `json:"dnsConfig,omitempty"`
	// NodeSelector Define which Nodes the Pods are scheduled on.
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
	// SecurityContext holds pod-level security attributes and common container settings.
	// This defaults to the default PodSecurityContext.
	// +optional
	SecurityContext *SecurityContext `json:"securityContext,omitempty"`
	// TopologySpreadConstraints embedded kubernetes pod configuration option,
	// controls how pods are spread across your cluster among failure-domains
	// such as regions, zones, nodes, and other user-defined topology domains
	// https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints/
	// +optional
	TopologySpreadConstraints []v1.TopologySpreadConstraint `json:"topologySpreadConstraints,omitempty"`
	// ImagePullSecrets An optional list of references to secrets in the same namespace
	// to use for pulling images from registries
	// see https://kubernetes.io/docs/concepts/containers/images/#referring-to-an-imagepullsecrets-on-a-pod
	// +optional
	ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
	// TerminationGracePeriodSeconds period for container graceful termination
	// +optional
	TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"`
	// ReadinessGates defines pod readiness gates
	ReadinessGates []v1.PodReadinessGate `json:"readinessGates,omitempty"`
	// MinReadySeconds defines a minimum number of seconds to wait before starting update next pod
	// if previous in healthy state
	// Has no effect for VLogs and VMSingle
	// +optional
	MinReadySeconds int32 `json:"minReadySeconds,omitempty"`
	// ReplicaCount is the expected size of the Application.
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Number of pods",xDescriptors="urn:alm:descriptor:com.tectonic.ui:podCount,urn:alm:descriptor:io.kubernetes:custom"
	// +optional
	ReplicaCount *int32 `json:"replicaCount,omitempty"`
	// The number of old ReplicaSets to retain to allow rollback in deployment or
	// maximum number of revisions that will be maintained in the Deployment revision history.
	// Has no effect at StatefulSets
	// Defaults to 10.
	// +optional
	RevisionHistoryLimitCount *int32 `json:"revisionHistoryLimitCount,omitempty"`

	// Containers property allows to inject additions sidecars or to patch existing containers.
	// It can be useful for proxies, backup, etc.
	// +optional
	Containers []v1.Container `json:"containers,omitempty"`
	// InitContainers allows adding initContainers to the pod definition.
	// Any errors during the execution of an initContainer will lead to a restart of the Pod.
	// More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/
	// +optional
	InitContainers []v1.Container `json:"initContainers,omitempty"`
	// Secrets is a list of Secrets in the same namespace as the Application
	// object, which shall be mounted into the Application container
	// at /etc/vm/secrets/SECRET_NAME folder
	// +optional
	Secrets []string `json:"secrets,omitempty"`
	// ConfigMaps is a list of ConfigMaps in the same namespace as the Application
	// object, which shall be mounted into the Application container
	// at /etc/vm/configs/CONFIGMAP_NAME folder
	// +optional
	ConfigMaps []string `json:"configMaps,omitempty"`
	// Volumes allows configuration of additional volumes on the output Deployment/StatefulSet definition.
	// Volumes specified will be appended to other volumes that are generated.
	/// +optional
	Volumes []v1.Volume `json:"volumes,omitempty"`
	// VolumeMounts allows configuration of additional VolumeMounts on the output Deployment/StatefulSet definition.
	// VolumeMounts specified will be appended to other VolumeMounts in the Application container
	// +optional
	VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"`
	// ExtraArgs that will be passed to the application container
	// for example remoteWrite.tmpDataPath: /tmp
	// +optional
	ExtraArgs map[string]string `json:"extraArgs,omitempty"`
	// ExtraEnvs that will be passed to the application container
	// +optional
	ExtraEnvs []v1.EnvVar `json:"extraEnvs,omitempty"`
	// Paused If set to true all actions on the underlying managed objects are not
	// going to be performed, except for delete actions.
	// +optional
	Paused bool `json:"paused,omitempty"`
	// DisableAutomountServiceAccountToken whether to disable serviceAccount auto mount by Kubernetes (available from v0.54.0).
	// Operator will conditionally create volumes and volumeMounts for containers if it requires k8s API access.
	// For example, vmagent and vm-config-reloader requires k8s API access.
	// Operator creates volumes with name: "kube-api-access", which can be used as volumeMount for extraContainers if needed.
	// And also adds VolumeMounts at /var/run/secrets/kubernetes.io/serviceaccount.
	// +optional
	DisableAutomountServiceAccountToken bool `json:"disableAutomountServiceAccountToken,omitempty"`

	// ExtraEnvsFrom defines source of env variables for the application container
	// could either be secret or configmap
	// +optional
	ExtraEnvsFrom []v1.EnvFromSource `json:"extraEnvsFrom,omitempty"`
}

CommonApplicationDeploymentParams defines common params for deployment and statefulset specifications

func (*CommonApplicationDeploymentParams) DeepCopy

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

func (*CommonApplicationDeploymentParams) DeepCopyInto

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

type CommonConfigReloaderParams

type CommonConfigReloaderParams struct {
	// UseVMConfigReloader replaces prometheus-like config-reloader
	// with vm one. It uses secrets watch instead of file watch
	// which greatly increases speed of config updates
	// +optional
	UseVMConfigReloader *bool `json:"useVMConfigReloader,omitempty"`
	// ConfigReloaderImageTag defines image:tag for config-reloader container
	// +optional
	ConfigReloaderImageTag string `json:"configReloaderImageTag,omitempty"`
	// ConfigReloaderResources config-reloader container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
	// if not defined default resources from operator config will be used
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Resources",xDescriptors="urn:alm:descriptor:com.tectonic.ui:resourceRequirements"
	ConfigReloaderResources v1.ResourceRequirements `json:"configReloaderResources,omitempty"`
	// ConfigReloaderExtraArgs that will be passed to  VMAuths config-reloader container
	// for example resyncInterval: "30s"
	// +optional
	ConfigReloaderExtraArgs map[string]string `json:"configReloaderExtraArgs,omitempty"`
	// ConfigReloadAuthKeySecret defines optional secret reference authKey for /-/reload API requests.
	// Given secret reference will be added to the application and vm-config-reloader as volume
	// available since v0.57.0 version
	// +optional
	ConfigReloadAuthKeySecret *v1.SecretKeySelector `json:"configReloadAuthKeySecret,omitempty"`
}

func (*CommonConfigReloaderParams) DeepCopy

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

func (*CommonConfigReloaderParams) DeepCopyInto

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

type CommonDefaultableParams

type CommonDefaultableParams struct {
	// Image - docker image settings
	// if no specified operator uses default version from operator config
	// +optional
	Image Image `json:"image,omitempty"`
	// Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
	// if not defined default resources from operator config will be used
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Resources",xDescriptors="urn:alm:descriptor:com.tectonic.ui:resourceRequirements"
	// +optional
	Resources v1.ResourceRequirements `json:"resources,omitempty"`
	// UseDefaultResources controls resource settings
	// By default, operator sets built-in resource requirements
	// +optional
	UseDefaultResources *bool `json:"useDefaultResources,omitempty"`
	// Port listen address
	// +optional
	Port string `json:"port,omitempty"`
	// UseStrictSecurity enables strict security mode for component
	// it restricts disk writes access
	// uses non-root user out of the box
	// drops not needed security permissions
	// +optional
	UseStrictSecurity *bool `json:"useStrictSecurity,omitempty"`
	// DisableSelfServiceScrape controls creation of VMServiceScrape by operator
	// for the application.
	// Has priority over `VM_DISABLESELFSERVICESCRAPECREATION` operator env variable
	// +optional
	DisableSelfServiceScrape *bool `json:"disableSelfServiceScrape,omitempty"`
}

CommonDefaultableParams contains Application settings with known values populated from operator configuration

func (*CommonDefaultableParams) DeepCopy

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

func (*CommonDefaultableParams) DeepCopyInto

func (in *CommonDefaultableParams) DeepCopyInto(out *CommonDefaultableParams)

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

type Condition

type Condition struct {
	// Type of condition in CamelCase or in name.namespace.resource.victoriametrics.com/CamelCase.
	// +required
	// +kubebuilder:validation:MaxLength=316
	Type string `json:"type"`
	// status of the condition, one of True, False, Unknown.
	// +required
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Enum=True;False;Unknown
	Status metav1.ConditionStatus `json:"status"`
	// observedGeneration represents the .metadata.generation that the condition was set based upon.
	// For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
	// with respect to the current state of the instance.
	// +optional
	// +kubebuilder:validation:Minimum=0
	ObservedGeneration int64 `json:"observedGeneration,omitempty" protobuf:"varint,3,opt,name=observedGeneration"`
	// lastTransitionTime is the last time the condition transitioned from one status to another.
	// +required
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Format=date-time
	LastTransitionTime metav1.Time `json:"lastTransitionTime"`
	// LastUpdateTime is the last time of given type update.
	// This value is used for status TTL update and removal
	// +required
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Type=string
	// +kubebuilder:validation:Format=date-time
	LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`

	// reason contains a programmatic identifier indicating the reason for the condition's last transition.
	// Producers of specific condition types may define expected values and meanings for this field,
	// and whether the values are considered a guaranteed API.
	// The value should be a CamelCase string.
	// This field may not be empty.
	// +required
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:MaxLength=1024
	// +kubebuilder:validation:MinLength=1
	Reason string `json:"reason"`
	// message is a human readable message indicating details about the transition.
	// This may be an empty string.
	// +optional
	// +kubebuilder:validation:MaxLength=32768
	Message string `json:"message,omitempty"`
}

Condition defines status condition of the resource

func (*Condition) DeepCopy

func (in *Condition) DeepCopy() *Condition

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

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

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

type ConfigMapKeyReference

type ConfigMapKeyReference struct {
	// The ConfigMap to refer to.
	v1.LocalObjectReference `json:",inline"`
	// The ConfigMap key to refer to.
	Key string `json:"key"`
}

ConfigMapKeyReference refers to a key in a ConfigMap.

func (*ConfigMapKeyReference) DeepCopy

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

func (*ConfigMapKeyReference) DeepCopyInto

func (in *ConfigMapKeyReference) DeepCopyInto(out *ConfigMapKeyReference)

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

type ConsulSDConfig

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, use 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://developer.hashicorp.com/consul/api-docs/features/consistency ). Will reduce load on Consul.
	// If unset, use its default value.
	// +optional
	AllowStale *bool `json:"allowStale,omitempty"`
	// Filter defines filter for /v1/catalog/services requests
	// See https://developer.hashicorp.com/consul/api-docs/features/filtering
	// +optional
	Filter string `json:"filter,omitempty"`
	// BasicAuth information to use on every scrape request.
	// +optional
	BasicAuth *BasicAuth `json:"basicAuth,omitempty"`
	// Authorization header to use on every scrape request.
	// +optional
	Authorization *Authorization `json:"authorization,omitempty"`
	// OAuth2 defines auth configuration
	// +optional
	OAuth2 *OAuth2 `json:"oauth2,omitempty"`
	// ProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint.
	// +optional
	ProxyURL *string `json:"proxyURL,omitempty"`
	// ProxyClientConfig configures proxy auth settings for scraping
	// See [feature description](https://docs.victoriametrics.com/vmagent#scraping-targets-via-a-proxy)
	// +optional
	ProxyClientConfig *ProxyAuth `json:"proxy_client_config,omitempty"`
	// Configure whether HTTP requests follow HTTP 3xx redirects.
	// If unset, use its default value.
	// +optional
	FollowRedirects *bool `json:"followRedirects,omitempty"`
	// TLS configuration to use on every scrape request
	// +optional
	TLSConfig *TLSConfig `json:"tlsConfig,omitempty"`
}

ConsulSDConfig defines a Consul service discovery configuration. See [here](https://docs.victoriametrics.com/sd_configs/#consul_sd_configs) +k8s:openapi-gen=true

func (*ConsulSDConfig) DeepCopy

func (in *ConsulSDConfig) DeepCopy() *ConsulSDConfig

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

func (*ConsulSDConfig) DeepCopyInto

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

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

type ContainerSecurityContext

type ContainerSecurityContext struct {
	// Run containers in privileged mode.
	// Processes in privileged containers are essentially equivalent to root on the host.
	// Note that this field cannot be set when spec.os.name is windows.
	// +optional
	Privileged *bool `json:"privileged,omitempty"`
	// The capabilities to add/drop when running containers.
	// Defaults to the default set of capabilities granted by the container runtime.
	// Note that this field cannot be set when spec.os.name is windows.
	// +optional
	Capabilities *v1.Capabilities `json:"capabilities,omitempty"`
	// Whether this containers has a read-only root filesystem.
	// Default is false.
	// Note that this field cannot be set when spec.os.name is windows.
	// +optional
	ReadOnlyRootFilesystem *bool `json:"readOnlyRootFilesystem,omitempty"`
	// AllowPrivilegeEscalation controls whether a process can gain more
	// privileges than its parent process. This bool directly controls if
	// the no_new_privs flag will be set on the container process.
	// AllowPrivilegeEscalation is true always when the container is:
	// 1) run as Privileged
	// 2) has CAP_SYS_ADMIN
	// Note that this field cannot be set when spec.os.name is windows.
	// +optional
	AllowPrivilegeEscalation *bool `json:"allowPrivilegeEscalation,omitempty"`
	// procMount denotes the type of proc mount to use for the containers.
	// The default is DefaultProcMount which uses the container runtime defaults for
	// readonly paths and masked paths.
	// This requires the ProcMountType feature flag to be enabled.
	// Note that this field cannot be set when spec.os.name is windows.
	// +optional
	ProcMount *v1.ProcMountType `json:"procMount,omitempty"`
}

ContainerSecurityContext defines security context for each application container

func (*ContainerSecurityContext) DeepCopy

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

func (*ContainerSecurityContext) DeepCopyInto

func (in *ContainerSecurityContext) DeepCopyInto(out *ContainerSecurityContext)

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

type DNSSDConfig

type DNSSDConfig struct {
	// A list of DNS domain names to be queried.
	// +kubebuilder:validation:MinItems:=1
	Names []string `json:"names"`

	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 [here](https://docs.victoriametrics.com/sd_configs#dns_sd_configs) +k8s:openapi-gen=true

func (*DNSSDConfig) DeepCopy

func (in *DNSSDConfig) DeepCopy() *DNSSDConfig

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

func (*DNSSDConfig) DeepCopyInto

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

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

type DigitalOceanSDConfig

type DigitalOceanSDConfig struct {
	// Authorization header to use on every scrape request.
	// +optional
	Authorization *Authorization `json:"authorization,omitempty"`
	// OAuth2 defines auth configuration
	// +optional
	OAuth2 *OAuth2 `json:"oauth2,omitempty"`
	// ProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint.
	// +optional
	ProxyURL *string `json:"proxyURL,omitempty"`
	// ProxyClientConfig configures proxy auth settings for scraping
	// See [feature description](https://docs.victoriametrics.com/vmagent#scraping-targets-via-a-proxy)
	// +optional
	ProxyClientConfig *ProxyAuth `json:"proxy_client_config,omitempty"`
	// Configure whether HTTP requests follow HTTP 3xx redirects.
	// +optional
	FollowRedirects *bool `json:"followRedirects,omitempty"`
	// TLS configuration to use on every scrape request
	// +optional
	TLSConfig *TLSConfig `json:"tlsConfig,omitempty"`
	// The port to scrape metrics from.
	// +optional
	Port *int `json:"port,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 [here](https://docs.victoriametrics.com/sd_configs#digitalocean_sd_configs) +k8s:openapi-gen=true

func (*DigitalOceanSDConfig) DeepCopy

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

func (*DigitalOceanSDConfig) DeepCopyInto

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

type DiscordConfig struct {
	// SendResolved controls notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"send_resolved,omitempty" yaml:"send_resolved,omitempty"`
	// The discord webhook URL
	// one of `urlSecret` and `url` must be defined.
	// +optional
	URL *string `json:"webhook_url,omitempty" yaml:"webhook_url,omitempty"`
	// URLSecret defines secret name and key at the CRD namespace.
	// It must contain the webhook URL.
	// one of `urlSecret` and `url` must be defined.
	// +optional
	URLSecret *v1.SecretKeySelector `json:"webhook_url_secret,omitempty" yaml:"webhook_url_secret,omitempty"`
	// The message title template
	// +optional
	Title string `json:"title,omitempty"`
	// The message body template
	// +optional
	Message string `json:"message,omitempty"`
	// HTTP client configuration.
	// +optional
	HTTPConfig *HTTPConfig `json:"http_config,omitempty" yaml:"http_config,omitempty"`
	// Content defines message content template
	// Available from operator v0.55.0 and alertmanager v0.28.0
	// +kubebuilder:validation:MaxLength:=2000
	// +optional
	Content string `json:"content,omitempty"`
	// Username defines message username
	// Available from operator v0.55.0 and alertmanager v0.28.0
	// +optional
	Username string `json:"username,omitempty" yaml:"username"`
	// AvatarURL defines message avatar URL
	// Available from operator v0.55.0 and alertmanager v0.28.0
	// +optional
	AvatarURL string `json:"avatar_url,omitempty" yaml:"avatar_url,omitempty"`
}

func (*DiscordConfig) DeepCopy

func (in *DiscordConfig) DeepCopy() *DiscordConfig

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

func (*DiscordConfig) DeepCopyInto

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

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

type DiscoverySelector

type DiscoverySelector struct {
	Namespace *NamespaceSelector    `json:"namespaceSelector,omitempty"`
	Labels    *metav1.LabelSelector `json:"labelSelector,omitempty"`
}

DiscoverySelector can be used at CRD components discovery

func (*DiscoverySelector) AsListOptions

func (ds *DiscoverySelector) AsListOptions() (*client.ListOptions, error)

func (*DiscoverySelector) DeepCopy

func (in *DiscoverySelector) DeepCopy() *DiscoverySelector

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

func (*DiscoverySelector) DeepCopyInto

func (in *DiscoverySelector) DeepCopyInto(out *DiscoverySelector)

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

type EC2Filter

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

EC2Filter is the configuration for filtering EC2 instances.

func (*EC2Filter) DeepCopy

func (in *EC2Filter) DeepCopy() *EC2Filter

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

func (*EC2Filter) DeepCopyInto

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

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"`
	// 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 [here](https://docs.victoriametrics.com/sd_configs#ec2_sd_configs) +k8s:openapi-gen=true

func (*EC2SDConfig) DeepCopy

func (in *EC2SDConfig) DeepCopy() *EC2SDConfig

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

func (*EC2SDConfig) DeepCopyInto

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

type EmailConfig struct {
	// SendResolved controls notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"send_resolved,omitempty" yaml:"send_resolved,omitempty"`
	// The email address to send notifications to.
	// +optional
	To string `json:"to,omitempty"`
	// The sender address.
	// fallback to global setting if empty
	// +optional
	From string `json:"from,omitempty"`
	// The hostname to identify to the SMTP server.
	// +optional
	Hello string `json:"hello,omitempty"`
	// The SMTP host through which emails are sent.
	// fallback to global setting if empty
	// +optional
	Smarthost string `json:"smarthost,omitempty"`
	// The username to use for authentication.
	// +optional
	AuthUsername string `json:"auth_username,omitempty" yaml:"auth_username,omitempty"`
	// AuthPassword defines secret name and key at CRD namespace.
	// +optional
	AuthPassword *v1.SecretKeySelector `json:"auth_password,omitempty" yaml:"auth_password,omitempty"`
	// AuthSecret defines secrent name and key at CRD namespace.
	// It must contain the CRAM-MD5 secret.
	// +optional
	AuthSecret *v1.SecretKeySelector `json:"auth_secret,omitempty" yaml:"auth_secret,omitempty"`
	// The identity to use for authentication.
	// +optional
	AuthIdentity string `json:"auth_identity,omitempty" yaml:"auth_identity,omitempty"`
	// Further headers email header key/value pairs. Overrides any headers
	// previously set by the notification implementation.
	Headers map[string]string `json:"headers,omitempty" yaml:"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:"require_tls,omitempty" yaml:"require_tls,omitempty"`
	// TLS configuration
	// +optional
	TLSConfig *TLSConfig `json:"tls_config,omitempty" yaml:"tls_config,omitempty"`
}

EmailConfig configures notifications via Email.

func (*EmailConfig) DeepCopy

func (in *EmailConfig) DeepCopy() *EmailConfig

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

func (*EmailConfig) DeepCopyInto

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

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

type EmbeddedHPA

type EmbeddedHPA struct {
	MinReplicas *int32                                         `json:"minReplicas,omitempty"`
	MaxReplicas int32                                          `json:"maxReplicas,omitempty"`
	Metrics     []autoscalingv2.MetricSpec                     `json:"metrics,omitempty"`
	Behaviour   *autoscalingv2.HorizontalPodAutoscalerBehavior `json:"behaviour,omitempty"`
}

EmbeddedHPA embeds HorizontalPodAutoScaler spec v2. https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/horizontal-pod-autoscaler-v2/

func (*EmbeddedHPA) DeepCopy

func (in *EmbeddedHPA) DeepCopy() *EmbeddedHPA

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

func (*EmbeddedHPA) DeepCopyInto

func (in *EmbeddedHPA) DeepCopyInto(out *EmbeddedHPA)

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

type EmbeddedIngress

type EmbeddedIngress struct {
	// ClassName defines ingress class name for VMAuth
	// +optional
	ClassName *string `json:"class_name,omitempty" yaml:"class_name,omitempty"`
	//  EmbeddedObjectMetadata adds labels and annotations for object.
	EmbeddedObjectMetadata `json:",inline"`
	// TlsHosts configures TLS access for ingress, tlsSecretName must be defined for it.
	TlsHosts []string `json:"tlsHosts,omitempty" yaml:"tlsHosts,omitempty"`
	// TlsSecretName defines secretname at the VMAuth namespace with cert and key
	// https://kubernetes.io/docs/concepts/services-networking/ingress/#tls
	// +optional
	TlsSecretName string `json:"tlsSecretName,omitempty" yaml:"tlsSecretName,omitempty"`
	// ExtraRules - additional rules for ingress,
	// must be checked for correctness by user.
	// +optional
	ExtraRules []v12.IngressRule `json:"extraRules,omitempty" yaml:"extraRules,omitempty"`
	// ExtraTLS - additional TLS configuration for ingress
	// must be checked for correctness by user.
	// +optional
	ExtraTLS []v12.IngressTLS `json:"extraTls,omitempty" yaml:"extraTls,omitempty"`
	// Host defines ingress host parameter for default rule
	// It will be used, only if TlsHosts is empty
	// +optional
	Host string `json:"host,omitempty"`
}

EmbeddedIngress describes ingress configuration options.

func (*EmbeddedIngress) DeepCopy

func (in *EmbeddedIngress) DeepCopy() *EmbeddedIngress

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

func (*EmbeddedIngress) DeepCopyInto

func (in *EmbeddedIngress) DeepCopyInto(out *EmbeddedIngress)

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

type EmbeddedObjectMetadata

type EmbeddedObjectMetadata struct {
	// Name must be unique within a namespace. Is required when creating resources, although
	// some resources may allow a client to request the generation of an appropriate name
	// automatically. Name is primarily intended for creation idempotence and configuration
	// definition.
	// Cannot be updated.
	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names#names
	// +optional
	Name string `json:"name,omitempty" protobuf:"bytes,1,opt,name=name"`

	// Labels Map of string keys and values that can be used to organize and categorize
	// (scope and select) objects. May match selectors of replication controllers
	// and services.
	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.displayName="PodLabels"
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.x-descriptors="urn:alm:descriptor:com.tectonic.ui:label"
	// +optional
	Labels map[string]string `json:"labels,omitempty" protobuf:"bytes,11,rep,name=labels"`

	// Annotations is an unstructured key value map stored with a resource that may be
	// set by external tools to store and retrieve arbitrary metadata. They are not
	// queryable and should be preserved when modifying objects.
	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations
	// +optional
	Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,12,rep,name=annotations"`
}

EmbeddedObjectMetadata contains a subset of the fields included in k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta Only fields which are relevant to embedded resources are included.

func (*EmbeddedObjectMetadata) DeepCopy

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

func (*EmbeddedObjectMetadata) DeepCopyInto

func (in *EmbeddedObjectMetadata) DeepCopyInto(out *EmbeddedObjectMetadata)

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

type EmbeddedPersistentVolumeClaim

type EmbeddedPersistentVolumeClaim struct {
	metav1.TypeMeta `json:",inline"`

	// EmbeddedMetadata contains metadata relevant to an EmbeddedResource.
	// +optional
	EmbeddedObjectMetadata `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`

	// Spec defines the desired characteristics of a volume requested by a pod author.
	// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
	// +optional
	Spec v1.PersistentVolumeClaimSpec `json:"spec,omitempty" protobuf:"bytes,2,opt,name=spec"`

	// Status represents the current information/status of a persistent volume claim.
	// Read-only.
	// More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims
	// +optional
	Status v1.PersistentVolumeClaimStatus `json:"status,omitempty" protobuf:"bytes,3,opt,name=status"`
}

EmbeddedPersistentVolumeClaim is an embedded version of k8s.io/api/core/v1.PersistentVolumeClaim. It contains TypeMeta and a reduced ObjectMeta.

func (*EmbeddedPersistentVolumeClaim) DeepCopy

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

func (*EmbeddedPersistentVolumeClaim) DeepCopyInto

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

type EmbeddedPodDisruptionBudgetSpec

type EmbeddedPodDisruptionBudgetSpec struct {
	// An eviction is allowed if at least "minAvailable" pods selected by
	// "selector" will still be available after the eviction, i.e. even in the
	// absence of the evicted pod.  So for example you can prevent all voluntary
	// evictions by specifying "100%".
	// +optional
	MinAvailable *intstr.IntOrString `json:"minAvailable,omitempty"`

	// An eviction is allowed if at most "maxUnavailable" pods selected by
	// "selector" are unavailable after the eviction, i.e. even in absence of
	// the evicted pod. For example, one can prevent all voluntary evictions
	// by specifying 0. This is a mutually exclusive setting with "minAvailable".
	// +optional
	MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
	// replaces default labels selector generated by operator
	// it's useful when you need to create custom budget
	// +optional
	SelectorLabels map[string]string `json:"selectorLabels,omitempty"`
}

func (*EmbeddedPodDisruptionBudgetSpec) DeepCopy

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

func (*EmbeddedPodDisruptionBudgetSpec) DeepCopyInto

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

func (*EmbeddedPodDisruptionBudgetSpec) SelectorLabelsWithDefaults

func (epdbs *EmbeddedPodDisruptionBudgetSpec) SelectorLabelsWithDefaults(defaultSelector map[string]string) map[string]string

SelectorLabelsWithDefaults return defaultSelector or replaced selector defined by user

type EmbeddedProbes

type EmbeddedProbes struct {
	// LivenessProbe that will be added CRD pod
	// +optional
	LivenessProbe *v1.Probe `json:"livenessProbe,omitempty"`
	// ReadinessProbe that will be added CRD pod
	// +optional
	ReadinessProbe *v1.Probe `json:"readinessProbe,omitempty"`
	// StartupProbe that will be added to CRD pod
	// +optional
	StartupProbe *v1.Probe `json:"startupProbe,omitempty"`
}

EmbeddedProbes - it allows to override some probe params. its not necessary to specify all options, operator will replace missing spec with default values.

func (*EmbeddedProbes) DeepCopy

func (in *EmbeddedProbes) DeepCopy() *EmbeddedProbes

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

func (*EmbeddedProbes) DeepCopyInto

func (in *EmbeddedProbes) DeepCopyInto(out *EmbeddedProbes)

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

type Endpoint

type Endpoint struct {
	// Name of the port exposed at Service.
	// +optional
	Port string `json:"port,omitempty"`

	// TargetPort
	// Name or number of the pod port this endpoint refers to. Mutually exclusive with port.
	// +optional
	TargetPort *intstr.IntOrString `json:"targetPort,omitempty"`

	EndpointRelabelings  `json:",inline"`
	EndpointAuth         `json:",inline"`
	EndpointScrapeParams `json:",inline"`

	// AttachMetadata configures metadata attaching from service discovery
	// +optional
	AttachMetadata AttachMetadata `json:"attach_metadata,omitempty"`
}

Endpoint defines a scrapeable endpoint serving metrics. +k8s:openapi-gen=true

func (*Endpoint) DeepCopy

func (in *Endpoint) DeepCopy() *Endpoint

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

func (*Endpoint) DeepCopyInto

func (in *Endpoint) DeepCopyInto(out *Endpoint)

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

type EndpointAuth

type EndpointAuth struct {
	// OAuth2 defines auth configuration
	// +optional
	OAuth2 *OAuth2 `json:"oauth2,omitempty"`
	// TLSConfig configuration to use when scraping the endpoint
	// +optional
	TLSConfig *TLSConfig `json:"tlsConfig,omitempty"`
	// File to read bearer token for scraping targets.
	// +optional
	BearerTokenFile string `json:"bearerTokenFile,omitempty"`
	// Secret to mount to read bearer token for scraping targets. The secret
	// needs to be in the same namespace as the scrape object and accessible by
	// the victoria-metrics operator.
	// +optional
	// +nullable
	BearerTokenSecret *v1.SecretKeySelector `json:"bearerTokenSecret,omitempty"`
	// BasicAuth allow an endpoint to authenticate over basic authentication
	// +optional
	BasicAuth *BasicAuth `json:"basicAuth,omitempty"`
	// Authorization with http header Authorization
	// +optional
	Authorization *Authorization `json:"authorization,omitempty"`
}

EndpointAuth defines target endpoint authorization options for scrapping

func (*EndpointAuth) DeepCopy

func (in *EndpointAuth) DeepCopy() *EndpointAuth

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

func (*EndpointAuth) DeepCopyInto

func (in *EndpointAuth) DeepCopyInto(out *EndpointAuth)

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

type EndpointRelabelings

type EndpointRelabelings struct {
	// MetricRelabelConfigs to apply to samples after scrapping.
	// +optional
	MetricRelabelConfigs []*RelabelConfig `json:"metricRelabelConfigs,omitempty"`
	// RelabelConfigs to apply to samples during service discovery.
	// +optional
	RelabelConfigs []*RelabelConfig `json:"relabelConfigs,omitempty"`
}

EndpointRelabelings defines service discovery and metrics relabeling configuration for endpoints

func (*EndpointRelabelings) DeepCopy

func (in *EndpointRelabelings) DeepCopy() *EndpointRelabelings

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

func (*EndpointRelabelings) DeepCopyInto

func (in *EndpointRelabelings) DeepCopyInto(out *EndpointRelabelings)

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

type EndpointScrapeParams

type EndpointScrapeParams struct {
	// HTTP path to scrape for metrics.
	// +optional
	Path string `json:"path,omitempty"`
	// HTTP scheme to use for scraping.
	// +optional
	// +kubebuilder:validation:Enum=http;https;HTTPS;HTTP
	Scheme string `json:"scheme,omitempty"`
	// Optional HTTP URL parameters
	// +optional
	Params map[string][]string `json:"params,omitempty"`
	// FollowRedirects controls redirects for scraping.
	// +optional
	FollowRedirects *bool `json:"follow_redirects,omitempty"`
	// SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
	// +optional
	SampleLimit uint64 `json:"sampleLimit,omitempty"`
	// SeriesLimit defines per-scrape limit on number of unique time series
	// a single target can expose during all the scrapes on the time window of 24h.
	// +optional
	SeriesLimit uint64 `json:"seriesLimit,omitempty"`
	// Interval at which metrics should be scraped
	// +optional
	Interval string `json:"interval,omitempty"`
	// ScrapeInterval is the same as Interval and has priority over it.
	// one of scrape_interval or interval can be used
	// +optional
	ScrapeInterval string `json:"scrape_interval,omitempty"`
	// Timeout after which the scrape is ended
	// +optional
	ScrapeTimeout string `json:"scrapeTimeout,omitempty"`
	// ProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint.
	// +optional
	ProxyURL *string `json:"proxyURL,omitempty"`
	// HonorLabels chooses the metric's labels on collisions with target labels.
	// +optional
	HonorLabels bool `json:"honorLabels,omitempty"`
	// HonorTimestamps controls whether vmagent respects the timestamps present in scraped data.
	// +optional
	HonorTimestamps *bool `json:"honorTimestamps,omitempty"`
	// MaxScrapeSize defines a maximum size of scraped data for a job
	// +optional
	MaxScrapeSize string `json:"max_scrape_size,omitempty"`
	// VMScrapeParams defines VictoriaMetrics specific scrape parameters
	// +optional
	VMScrapeParams *VMScrapeParams `json:"vm_scrape_params,omitempty"`
}

ScrapeTargetParams defines common configuration params for all scrape endpoint targets

func (*EndpointScrapeParams) DeepCopy

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

func (*EndpointScrapeParams) DeepCopyInto

func (in *EndpointScrapeParams) DeepCopyInto(out *EndpointScrapeParams)

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

type ExternalConfig

type ExternalConfig struct {
	// SecretRef defines selector for externally managed secret which contains configuration
	// +optional
	SecretRef *v1.SecretKeySelector `json:"secretRef,omitempty" yaml:"secretRef,omitempty"`
	// LocalPath contains static path to a config, which is managed externally for cases
	// when using secrets is not applicable, e.g.: Vault sidecar.
	// +optional
	LocalPath string `json:"localPath,omitempty" yaml:"localPath,omitempty"`
}

ExternalConfig defines external source of configuration

func (*ExternalConfig) DeepCopy

func (in *ExternalConfig) DeepCopy() *ExternalConfig

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

func (*ExternalConfig) DeepCopyInto

func (in *ExternalConfig) DeepCopyInto(out *ExternalConfig)

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

type FileSDConfig

type FileSDConfig struct {
	// List of files to be used for file discovery.
	// +kubebuilder:validation:MinItems:=1
	Files []string `json:"files"`
}

FileSDConfig defines a file service discovery configuration. See [here](https://docs.victoriametrics.com/sd_configs#file_sd_configs)

func (*FileSDConfig) DeepCopy

func (in *FileSDConfig) DeepCopy() *FileSDConfig

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

func (*FileSDConfig) DeepCopyInto

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

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.
	// +required
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	Zone StringOrArray `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"`
	// 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 [here](https://docs.victoriametrics.com/sd_configs#gce_sd_configs)

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 +k8s:openapi-gen=true

func (*GCESDConfig) DeepCopy

func (in *GCESDConfig) DeepCopy() *GCESDConfig

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

func (*GCESDConfig) DeepCopyInto

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

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

type HTTPAuth

type HTTPAuth struct {
	// +optional
	BasicAuth *BasicAuth `json:"basicAuth,omitempty"`
	// +optional
	OAuth2 *OAuth2 `json:"oauth2,omitempty"`
	// +optional
	TLSConfig *TLSConfig `json:"tlsConfig,omitempty"`
	// +optional
	*BearerAuth `json:",inline,omitempty"`
	// Headers allow configuring custom http headers
	// Must be in form of semicolon separated header with value
	// e.g.
	// headerName:headerValue
	// vmalert supports it since 1.79.0 version
	// +optional
	Headers []string `json:"headers,omitempty"`
}

HTTPAuth generic auth used with http protocols

func (*HTTPAuth) DeepCopy

func (in *HTTPAuth) DeepCopy() *HTTPAuth

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

func (*HTTPAuth) DeepCopyInto

func (in *HTTPAuth) DeepCopyInto(out *HTTPAuth)

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

type HTTPConfig

type HTTPConfig struct {
	// BasicAuth for the client.
	// +optional
	BasicAuth *BasicAuth `json:"basic_auth,omitempty" yaml:"basic_auth,omitempty"`
	// The secret's key that contains the bearer token
	// It must be at them same namespace as CRD
	// +optional
	BearerTokenSecret *v1.SecretKeySelector `json:"bearer_token_secret,omitempty" yaml:"bearer_token_secret,omitempty"`
	// BearerTokenFile defines filename for bearer token, it must be mounted to pod.
	// +optional
	BearerTokenFile string `json:"bearer_token_file,omitempty" yaml:"bearer_token_file,omitempty"`
	// TLS configuration for the client.
	// +optional
	TLSConfig *TLSConfig `json:"tls_config,omitempty" yaml:"tls_config,omitempty"`
	// Optional proxy URL.
	// +optional
	ProxyURL string `json:"proxyURL,omitempty" yaml:"proxy_url,omitempty"`
	// Authorization header configuration for the client.
	// This is mutually exclusive with BasicAuth and is only available starting from Alertmanager v0.22+.
	// +optional
	Authorization *Authorization `json:"authorization,omitempty"`
	// OAuth2 client credentials used to fetch a token for the targets.
	// +optional
	OAuth2 *OAuth2 `json:"oauth2,omitempty"`
}

HTTPConfig defines a client HTTP configuration for VMAlertmanagerConfig objects 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) UnmarshalJSON added in v0.56.0

func (hc *HTTPConfig) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaller interface

type HTTPSDConfig

type HTTPSDConfig struct {
	// URL from which the targets are fetched.
	// +kubebuilder:validation:MinLength:=1
	// +kubebuilder:validation:Pattern:="^http(s)?://.+$"
	URL string `json:"url"`
	// BasicAuth information to use on every scrape request.
	// +optional
	BasicAuth *BasicAuth `json:"basicAuth,omitempty"`
	// Authorization header to use on every scrape request.
	// +optional
	Authorization *Authorization `json:"authorization,omitempty"`
	// TLS configuration to use on every scrape request
	// +optional
	TLSConfig *TLSConfig `json:"tlsConfig,omitempty"`
	// ProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint.
	// +optional
	ProxyURL *string `json:"proxyURL,omitempty"`
	// ProxyClientConfig configures proxy auth settings for scraping
	// See [feature description](https://docs.victoriametrics.com/vmagent#scraping-targets-via-a-proxy)
	// +optional
	ProxyClientConfig *ProxyAuth `json:"proxy_client_config,omitempty"`
}

HTTPSDConfig defines a HTTP service discovery configuration. See [here](https://docs.victoriametrics.com/sd_configs#http_sd_configs)

func (*HTTPSDConfig) DeepCopy

func (in *HTTPSDConfig) DeepCopy() *HTTPSDConfig

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

func (*HTTPSDConfig) DeepCopyInto

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

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

type Image

type Image struct {
	// Repository contains name of docker image + it's repository if needed
	Repository string `json:"repository,omitempty"`
	// Tag contains desired docker image version
	Tag string `json:"tag,omitempty"`
	// PullPolicy describes how to pull docker image
	PullPolicy v1.PullPolicy `json:"pullPolicy,omitempty"`
}

Image defines docker image settings

func (*Image) DeepCopy

func (in *Image) DeepCopy() *Image

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

func (*Image) DeepCopyInto

func (in *Image) DeepCopyInto(out *Image)

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

type ImageConfig

type ImageConfig struct {
	// +optional
	Href   string `json:"href,omitempty"`
	Source string `json:"source"`
	// +optional
	Alt string `json:"alt,omitempty"`
}

ImageConfig is used to attach images to the incident. See https://developer.pagerduty.com/docs/ZG9jOjExMDI5NTgx-send-an-alert-event#the-images-property for more information.

func (*ImageConfig) DeepCopy

func (in *ImageConfig) DeepCopy() *ImageConfig

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

func (*ImageConfig) DeepCopyInto

func (in *ImageConfig) DeepCopyInto(out *ImageConfig)

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

type InhibitRule

type InhibitRule struct {
	// TargetMatchers defines a list of matchers that have to be fulfilled by the target
	// alerts to be muted.
	// +optional
	TargetMatchers []string `json:"target_matchers,omitempty"`
	// SourceMatchers defines a list of matchers for which one or more alerts have
	// to exist for the inhibition to take effect.
	// +optional
	SourceMatchers []string `json:"source_matchers,omitempty"`

	// Labels that must have an equal value in the source and target alert for
	// the inhibition to take effect.
	// +optional
	Equal []string `json:"equal,omitempty"`
}

InhibitRule defines an inhibition rule that allows to mute alerts when other alerts are already firing. Note, it doesn't support deprecated alertmanager config options. 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 InsertPorts

type InsertPorts struct {
	// GraphitePort listen port
	// +optional
	GraphitePort string `json:"graphitePort,omitempty"`
	// InfluxPort listen port
	// +optional
	InfluxPort string `json:"influxPort,omitempty"`
	// OpenTSDBHTTPPort for http connections.
	// +optional
	OpenTSDBHTTPPort string `json:"openTSDBHTTPPort,omitempty"`
	// OpenTSDBPort for tcp and udp listen
	// +optional
	OpenTSDBPort string `json:"openTSDBPort,omitempty"`
}

func (*InsertPorts) DeepCopy

func (in *InsertPorts) DeepCopy() *InsertPorts

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

func (*InsertPorts) DeepCopyInto

func (in *InsertPorts) DeepCopyInto(out *InsertPorts)

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

type JiraConfig added in v0.55.0

type JiraConfig struct {
	// SendResolved controls notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"send_resolved,omitempty" yaml:"send_resolved,omitempty"`

	// The URL to send API requests to. The full API path must be included.
	// Example: https://company.atlassian.net/rest/api/2/
	// +optional
	APIURL *string `json:"api_url,omitempty" yaml:"api_url,omitempty"`

	// The project key where issues are created
	Project string `json:"project" yaml:"project"`
	// Issue summary template
	// +optional
	Summary string `json:"summary,omitempty" yaml:"summary,omitempty"`
	// Issue description template.
	// +optional
	Description string `json:"description,omitempty" yaml:"description,omitempty"`
	// Labels to be added to the issue
	Labels []string `json:"labels,omitempty" yaml:"labels,omitempty"`
	// Priority of the issue
	Priority string `json:"priority,omitempty" yaml:"priority,omitempty"`

	// Type of the issue (e.g. Bug)
	IssueType string `json:"issue_type" yaml:"issue_type"`

	// Name of the workflow transition to resolve an issue.
	// The target status must have the category "done".
	ReopenTransition string `json:"reopen_transition,omitempty" yaml:"reopen_transition,omitempty"`
	// Name of the workflow transition to reopen an issue.
	// The target status should not have the category "done".
	ResolveTransition string `json:"resolve_transition,omitempty" yaml:"resolve_transition,omitempty"`
	// If reopen_transition is defined, ignore issues with that resolution.
	WontFixResolution string `json:"wont_fix_resolution,omitempty" yaml:"wont_fix_resolution,omitempty"`

	// If reopen_transition is defined, reopen the issue when it is not older than this value (rounded down to the nearest minute).
	// The resolutiondate field is used to determine the age of the issue.
	// +kubebuilder:validation:Pattern:="^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$"
	// +optional
	ReopenDuration string `json:"reopen_duration,omitempty" yaml:"reopen_duration,omitempty"`

	// Other issue and custom fields.
	// Jira issue field can have multiple types.
	// Depends on the field type, the values must be provided differently.
	// See https://developer.atlassian.com/server/jira/platform/jira-rest-api-examples/#setting-custom-field-data-for-other-field-types for further examples.
	// +optional
	Fields map[string]apiextensionsv1.JSON `json:"custom_fields,omitempty" yaml:"fields,omitempty"`

	// The HTTP client's configuration. You must use this configuration to supply the personal access token (PAT) as part of the HTTP `Authorization` header.
	// For Jira Cloud, use basic_auth with the email address as the username and the PAT as the password.
	// For Jira Data Center, use the 'authorization' field with 'credentials: <PAT value>'.
	// +optional
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	HTTPConfig *HTTPConfig `json:"http_config,omitempty" yaml:"http_config,omitempty"`
}

JiraConfig represent alertmanager's jira_config entry https://prometheus.io/docs/alerting/latest/configuration/#jira_config available from v0.55.0 operator version and v0.28.0 alertmanager version

func (*JiraConfig) DeepCopy added in v0.55.0

func (in *JiraConfig) DeepCopy() *JiraConfig

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

func (*JiraConfig) DeepCopyInto added in v0.55.0

func (in *JiraConfig) DeepCopyInto(out *JiraConfig)

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

type K8SSelectorConfig

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

K8SSelectorConfig is Kubernetes Selector Config

func (*K8SSelectorConfig) DeepCopy

func (in *K8SSelectorConfig) DeepCopy() *K8SSelectorConfig

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

func (*K8SSelectorConfig) DeepCopyInto

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

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. +kubebuilder:object:generate=false +k8s:openapi-gen=false

type KubernetesSDConfig

type KubernetesSDConfig struct {
	// The API server address consisting of a hostname or IP address followed
	// by an optional port number.
	// If left empty, assuming process is running 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 string `json:"role"`
	// BasicAuth information to use on every scrape request.
	// +optional
	BasicAuth *BasicAuth `json:"basicAuth,omitempty"`
	// Authorization header to use on every scrape request.
	// +optional
	Authorization *Authorization `json:"authorization,omitempty"`
	// TLS configuration to use on every scrape request
	// +optional
	TLSConfig *TLSConfig `json:"tlsConfig,omitempty"`
	// OAuth2 defines auth configuration
	// +optional
	OAuth2 *OAuth2 `json:"oauth2,omitempty"`
	// ProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint.
	// +optional
	ProxyURL *string `json:"proxyURL,omitempty"`
	// ProxyClientConfig configures proxy auth settings for scraping
	// See [feature description](https://docs.victoriametrics.com/vmagent#scraping-targets-via-a-proxy)
	// +optional
	ProxyClientConfig *ProxyAuth `json:"proxy_client_config,omitempty"`
	// Configure whether HTTP requests follow HTTP 3xx redirects.
	// +optional
	FollowRedirects *bool `json:"followRedirects,omitempty"`
	// Optional namespace discovery. If omitted, discover targets across all namespaces.
	// +optional
	Namespaces *NamespaceDiscovery `json:"namespaces,omitempty"`
	// AttachMetadata configures metadata attaching from service discovery
	// +optional
	AttachMetadata AttachMetadata `json:"attach_metadata,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 [here](https://docs.victoriametrics.com/sd_configs#kubernetes_sd_configs) +k8s:openapi-gen=true

func (*KubernetesSDConfig) DeepCopy

func (in *KubernetesSDConfig) DeepCopy() *KubernetesSDConfig

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

func (*KubernetesSDConfig) DeepCopyInto

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

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

type License

type License struct {
	// Enterprise license key. This flag is available only in [VictoriaMetrics enterprise](https://docs.victoriametrics.com/enterprise).
	// To request a trial license, [go to](https://victoriametrics.com/products/enterprise/trial)
	Key *string `json:"key,omitempty"`
	// KeyRef is reference to secret with license key for enterprise features.
	KeyRef *v1.SecretKeySelector `json:"keyRef,omitempty"`
	// Enforce offline verification of the license key.
	ForceOffline *bool `json:"forceOffline,omitempty"`
	// Interval to be used for checking for license key changes. Note that this is only applicable when using KeyRef.
	ReloadInterval *string `json:"reloadInterval,omitempty"`
}

License holds license key for enterprise features. Using license key is supported starting from VictoriaMetrics v1.94.0. See [here](https://docs.victoriametrics.com/enterprise)

func (*License) DeepCopy

func (in *License) DeepCopy() *License

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

func (*License) DeepCopyInto

func (in *License) DeepCopyInto(out *License)

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

func (*License) IsProvided

func (l *License) IsProvided() bool

IsProvided returns true if license is provided.

func (*License) MaybeAddToArgs

func (l *License) MaybeAddToArgs(args []string, secretMountDir string) []string

MaybeAddToArgs conditionally adds license commandline args into given args

func (*License) MaybeAddToVolumes

func (l *License) MaybeAddToVolumes(volumes []v1.Volume, mounts []v1.VolumeMount, secretMountDir string) ([]v1.Volume, []v1.VolumeMount)

MaybeAddToVolumes conditionally mounts secret with license key into given volumes and mounts

type LinkConfig

type LinkConfig struct {
	Href string `json:"href"`
	Text string `json:"text,omitempty"`
}

LinkConfig is used to attach text links to the incident. See https://developer.pagerduty.com/docs/ZG9jOjExMDI5NTgx-send-an-alert-event#the-links-property for more information.

func (*LinkConfig) DeepCopy

func (in *LinkConfig) DeepCopy() *LinkConfig

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

func (*LinkConfig) DeepCopyInto

func (in *LinkConfig) DeepCopyInto(out *LinkConfig)

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

type MSTeamsConfig

type MSTeamsConfig struct {
	// SendResolved controls notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"send_resolved,omitempty" yaml:"send_resolved,omitempty"`
	// The incoming webhook URL
	// one of `urlSecret` and `url` must be defined.
	// +optional
	URL *string `json:"webhook_url,omitempty" yaml:"webhook_url,omitempty"`
	// URLSecret defines secret name and key at the CRD namespace.
	// It must contain the webhook URL.
	// one of `urlSecret` and `url` must be defined.
	// +optional
	URLSecret *v1.SecretKeySelector `json:"webhook_url_secret,omitempty" yaml:"webhook_url_secret,omitempty"`
	// The title of the teams notification.
	// +optional
	Title string `json:"title,omitempty"`
	// The text body of the teams notification.
	// +optional
	Text string `json:"text,omitempty"`
	// HTTP client configuration.
	// +optional
	HTTPConfig *HTTPConfig `json:"http_config,omitempty" yaml:"http_config,omitempty"`
}

func (*MSTeamsConfig) DeepCopy

func (in *MSTeamsConfig) DeepCopy() *MSTeamsConfig

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

func (*MSTeamsConfig) DeepCopyInto

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

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

type MSTeamsV2Config added in v0.55.0

type MSTeamsV2Config struct {
	// SendResolved controls notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"send_resolved,omitempty" yaml:"send_resolved,omitempty"`

	// The incoming webhook URL
	// one of `urlSecret` and `url` must be defined.
	// +optional
	URL *string `json:"webhook_url,omitempty" yaml:"webhook_url,omitempty"`
	// URLSecret defines secret name and key at the CRD namespace.
	// It must contain the webhook URL.
	// one of `webhook_url` or `webhook_url_secret` must be defined.
	// +optional
	URLSecret *v1.SecretKeySelector `json:"webhook_url_secret,omitempty" yaml:"webhook_url_secret,omitempty"`

	// Message title template.
	// +optional
	Title string `json:"title,omitempty" yaml:"title,omitempty"`
	// Message body template.
	// +optional
	Text string `json:"text,omitempty" yaml:"text,omitempty"`

	// +optional
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	HTTPConfig *HTTPConfig `json:"http_config,omitempty" yaml:"http_config,omitempty"`
}

MSTeamsV2Config sends notifications using the new message format with adaptive cards as required by flows. https://support.microsoft.com/en-gb/office/create-incoming-webhooks-with-workflows-for-microsoft-teams-8ae491c7-0394-4861-ba59-055e33f75498 available from v0.55.0 operator version and v0.28.0 alertmanager version

func (*MSTeamsV2Config) DeepCopy added in v0.55.0

func (in *MSTeamsV2Config) DeepCopy() *MSTeamsV2Config

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

func (*MSTeamsV2Config) DeepCopyInto added in v0.55.0

func (in *MSTeamsV2Config) DeepCopyInto(out *MSTeamsV2Config)

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

type ManagedObjectsMetadata

type ManagedObjectsMetadata struct {
	// Labels Map of string keys and values that can be used to organize and categorize
	// (scope and select) objects.
	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels
	Labels map[string]string `json:"labels,omitempty"`

	// Annotations is an unstructured key value map stored with a resource that may be
	// set by external tools to store and retrieve arbitrary metadata. They are not
	// queryable and should be preserved when modifying objects.
	// More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations
	Annotations map[string]string `json:"annotations,omitempty"`
}

ManagedObjectsMetadata contains Labels and Annotations

func (*ManagedObjectsMetadata) DeepCopy

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

func (*ManagedObjectsMetadata) DeepCopyInto

func (in *ManagedObjectsMetadata) DeepCopyInto(out *ManagedObjectsMetadata)

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

type NamespaceDiscovery

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

NamespaceDiscovery is the configuration for discovering Kubernetes namespaces.

func (*NamespaceDiscovery) DeepCopy

func (in *NamespaceDiscovery) DeepCopy() *NamespaceDiscovery

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

func (*NamespaceDiscovery) DeepCopyInto

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

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

type NamespaceSelector

type NamespaceSelector struct {
	// Boolean describing whether all namespaces are selected in contrast to a
	// list restricting them.
	// +optional
	Any bool `json:"any,omitempty"`
	// List of namespace names.
	// +optional
	MatchNames []string `json:"matchNames,omitempty"`
}

NamespaceSelector is a selector for selecting either all namespaces or a list of namespaces. +k8s:openapi-gen=true

func (*NamespaceSelector) DeepCopy

func (in *NamespaceSelector) DeepCopy() *NamespaceSelector

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

func (*NamespaceSelector) DeepCopyInto

func (in *NamespaceSelector) DeepCopyInto(out *NamespaceSelector)

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

func (*NamespaceSelector) IsMatch

func (ns *NamespaceSelector) IsMatch(item nsMatcher) bool

type OAuth2

type OAuth2 struct {
	// The secret or configmap containing the OAuth2 client id
	// +required
	ClientID SecretOrConfigMap `json:"client_id" yaml:"client_id,omitempty"`
	// The secret containing the OAuth2 client secret
	// +optional
	ClientSecret *v1.SecretKeySelector `json:"client_secret,omitempty" yaml:"client_secret,omitempty"`
	// ClientSecretFile defines path for client secret file.
	// +optional
	ClientSecretFile string `json:"client_secret_file,omitempty" yaml:"client_secret_file,omitempty"`
	// The URL to fetch the token from
	// +kubebuilder:validation:MinLength=1
	// +required
	TokenURL string `json:"token_url" yaml:"token_url"`
	// OAuth2 scopes used for the token request
	// +optional
	Scopes []string `json:"scopes,omitempty"`
	// Parameters to append to the token URL
	// +optional
	EndpointParams map[string]string `json:"endpoint_params,omitempty" yaml:"endpoint_params"`

	// The proxy URL for token_url connection
	// ( available from v0.55.0).
	// Is only supported by Scrape objects family
	// +optional
	ProxyURL string `json:"proxy_url,omitempty"`
	// TLSConfig for token_url connection
	// ( available from v0.55.0).
	// Is only supported by Scrape objects family
	// +optional
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	TLSConfig *TLSConfig `json:"tls_config,omitempty"`
}

OAuth2 defines OAuth2 configuration

func (*OAuth2) DeepCopy

func (in *OAuth2) DeepCopy() *OAuth2

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

func (*OAuth2) DeepCopyInto

func (in *OAuth2) DeepCopyInto(out *OAuth2)

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

type OpenStackSDConfig

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"`
	// 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 to use on every scrape request
	// +optional
	TLSConfig *TLSConfig `json:"tlsConfig,omitempty"`
}

OpenStackSDConfig allow retrieving scrape targets from OpenStack Nova instances. See [here](https://docs.victoriametrics.com/sd_configs#openstack_sd_configs) +k8s:openapi-gen=true

func (*OpenStackSDConfig) DeepCopy

func (in *OpenStackSDConfig) DeepCopy() *OpenStackSDConfig

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

func (*OpenStackSDConfig) DeepCopyInto

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 {
	// SendResolved controls notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"send_resolved,omitempty" yaml:"send_resolved,omitempty"`
	// The secret's key that contains the OpsGenie API key.
	// It must be at them same namespace as CRD
	// fallback to global setting if empty
	// +optional
	APIKey *v1.SecretKeySelector `json:"api_key,omitempty" yaml:"api_key,omitempty"`
	// The URL to send OpsGenie API requests to.
	// +optional
	APIURL string `json:"apiURL,omitempty" yaml:"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"`
	// A set of arbitrary key/value pairs that provide further detail about the incident.
	// +optional
	Details map[string]string `json:"details,omitempty"`
	// List of responders responsible for notifications.
	// +optional
	Responders []OpsGenieConfigResponder `json:"responders,omitempty"`
	// Optional field that can be used to specify which domain alert is related to.
	Entity string `json:"entity,omitempty"`
	// Comma separated list of actions that will be available for the alert.
	Actions string `json:"actions,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.
	UpdateAlerts bool `json:"update_alerts,omitempty" yaml:"update_alerts,omitempty"`
	// HTTP client configuration.
	// +optional
	HTTPConfig *HTTPConfig `json:"http_config,omitempty" yaml:"http_config,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.

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
	// +required
	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.

type PagerDutyConfig

type PagerDutyConfig struct {
	// SendResolved controls notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"send_resolved,omitempty" yaml:"send_resolved,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.
	// It must be at them same namespace as CRD
	// +optional
	RoutingKey *v1.SecretKeySelector `json:"routing_key,omitempty" yaml:"routing_key,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.
	// It must be at them same namespace as CRD
	// +optional
	ServiceKey *v1.SecretKeySelector `json:"service_key,omitempty" yaml:"service_key,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:"client_url,omitempty" yaml:"client_url,omitempty"`
	// Images to attach to the incident.
	// +optional
	Images []ImageConfig `json:"images,omitempty"`
	// Links to attach to the incident.
	// +optional
	Links []LinkConfig `json:"links,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 map[string]string `json:"details,omitempty"`
	// HTTP client configuration.
	// +optional
	HTTPConfig *HTTPConfig `json:"http_config,omitempty" yaml:"http_config,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 PodMetricsEndpoint

type PodMetricsEndpoint struct {
	// Name of the port exposed at Pod.
	// +optional
	Port *string `json:"port,omitempty"`
	// PortNumber defines the `Pod` port number which exposes the endpoint.
	// +kubebuilder:validation:Minimum=1
	// +kubebuilder:validation:Maximum=65535
	// +optional
	PortNumber *int32 `json:"portNumber,omitempty"`
	// TargetPort defines name or number of the pod port this endpoint refers to.
	// Mutually exclusive with Port and PortNumber.
	// +optional
	TargetPort           *intstr.IntOrString `json:"targetPort,omitempty"`
	EndpointRelabelings  `json:",inline"`
	EndpointAuth         `json:",inline"`
	EndpointScrapeParams `json:",inline"`
	// AttachMetadata configures metadata attaching from service discovery
	// +optional
	AttachMetadata AttachMetadata `json:"attach_metadata,omitempty"`
	// FilterRunning applies filter with pod status == running
	// it prevents from scrapping metrics at failed or succeed state pods.
	// enabled by default
	// +optional
	FilterRunning *bool `json:"filterRunning,omitempty"`
}

PodMetricsEndpoint defines a scrapeable endpoint of a Kubernetes Pod serving metrics. +k8s:openapi-gen=true

func (*PodMetricsEndpoint) DeepCopy

func (in *PodMetricsEndpoint) DeepCopy() *PodMetricsEndpoint

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

func (*PodMetricsEndpoint) DeepCopyInto

func (in *PodMetricsEndpoint) DeepCopyInto(out *PodMetricsEndpoint)

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

type ProbeTargetIngress

type ProbeTargetIngress struct {
	// Select Ingress objects by labels.
	Selector metav1.LabelSelector `json:"selector,omitempty"`
	// Select Ingress objects by namespace.
	NamespaceSelector NamespaceSelector `json:"namespaceSelector,omitempty"`
	// RelabelConfigs to apply to samples during service discovery.
	RelabelConfigs []*RelabelConfig `json:"relabelingConfigs,omitempty"`
}

ProbeTargetIngress defines the set of Ingress objects considered for probing. +k8s:openapi-gen=true

func (*ProbeTargetIngress) DeepCopy

func (in *ProbeTargetIngress) DeepCopy() *ProbeTargetIngress

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

func (*ProbeTargetIngress) DeepCopyInto

func (in *ProbeTargetIngress) DeepCopyInto(out *ProbeTargetIngress)

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

type ProxyAuth

type ProxyAuth struct {
	BasicAuth       *BasicAuth            `json:"basic_auth,omitempty"`
	BearerToken     *v1.SecretKeySelector `json:"bearer_token,omitempty"`
	BearerTokenFile string                `json:"bearer_token_file,omitempty"`
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	TLSConfig *TLSConfig `json:"tls_config,omitempty"`
}

ProxyAuth represent proxy auth config Only VictoriaMetrics scrapers supports it. See https://github.com/VictoriaMetrics/VictoriaMetrics/commit/a6a71ef861444eb11fe8ec6d2387f0fc0c4aea87

func (*ProxyAuth) DeepCopy

func (in *ProxyAuth) DeepCopy() *ProxyAuth

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

func (*ProxyAuth) DeepCopyInto

func (in *ProxyAuth) DeepCopyInto(out *ProxyAuth)

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

type PushoverConfig

type PushoverConfig struct {
	// SendResolved controls notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"send_resolved,omitempty" yaml:"send_resolved,omitempty"`
	// The secret's key that contains the recipient user’s user key.
	// It must be at them same namespace as CRD
	UserKey *v1.SecretKeySelector `json:"user_key,omitempty" yaml:"user_key,omitempty"`
	// The secret's key that contains the registered application’s API token, see https://pushover.net/apps.
	// It must be at them same namespace as CRD
	Token *v1.SecretKeySelector `json:"token,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:"url_title,omitempty" yaml:"url_title,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.
	// +optional
	Retry string `json:"retry,omitempty"`
	// How long your notification will continue to be retried for, unless the user
	// acknowledges the notification.
	// +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:"http_config,omitempty" yaml:"http_config,omitempty"`
}

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

func (*PushoverConfig) DeepCopy

func (in *PushoverConfig) DeepCopy() *PushoverConfig

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

func (*PushoverConfig) DeepCopyInto

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
	// +required
	Name string `json:"name"`
	// EmailConfigs defines email notification configurations.
	// +optional
	EmailConfigs []EmailConfig `json:"email_configs,omitempty" yaml:"email_configs,omitempty"`
	// PagerDutyConfigs defines pager duty notification configurations.
	// +optional
	PagerDutyConfigs []PagerDutyConfig `json:"pagerduty_configs,omitempty" yaml:"pagerduty_configs,omitempty"`
	// PushoverConfigs defines push over notification configurations.
	// +optional
	PushoverConfigs []PushoverConfig `json:"pushover_configs,omitempty" yaml:"pushover_configs,omitempty"`
	// SlackConfigs defines slack notification configurations.
	// +optional
	SlackConfigs []SlackConfig `json:"slack_configs,omitempty" yaml:"slack_configs,omitempty"`
	// OpsGenieConfigs defines ops genie notification configurations.
	// +optional
	OpsGenieConfigs []OpsGenieConfig `json:"opsgenie_configs,omitempty" yaml:"opsgenie_configs,omitempty"`
	// WebhookConfigs defines webhook notification configurations.
	// +optional
	WebhookConfigs []WebhookConfig `json:"webhook_configs,omitempty" yaml:"webhook_configs,omitempty"`

	// VictorOpsConfigs defines victor ops notification configurations.
	// +optional
	VictorOpsConfigs []VictorOpsConfig `json:"victorops_configs,omitempty" yaml:"victorops_configs,omitempty"`
	// WeChatConfigs defines wechat notification configurations.
	// +optional
	WeChatConfigs []WeChatConfig `json:"wechat_configs,omitempty" yaml:"wechat_configs,omitempty"`
	// +optional
	TelegramConfigs []TelegramConfig `json:"telegram_configs,omitempty" yaml:"telegram_configs,omitempty"`
	// +optional
	MSTeamsConfigs []MSTeamsConfig `json:"msteams_configs,omitempty" yaml:"msteams_configs,omitempty"`
	// +optional
	DiscordConfigs []DiscordConfig `json:"discord_configs,omitempty" yaml:"discord_configs,omitempty"`
	// +optional
	SNSConfigs []SnsConfig `json:"sns_configs,omitempty" yaml:"sns_configs,omitempty"`
	// +optional
	WebexConfigs []WebexConfig `json:"webex_configs,omitempty" yaml:"webex_configs,omitempty"`
	// +optional
	JiraConfigs []JiraConfig `json:"jira_configs,omitempty" yaml:"jira_configs,omitempty"`
	// +optional
	RocketchatConfigs []RocketchatConfig `json:"rocketchat_configs,omitempty" yaml:"rocketchat_configs,omitempty"`
	// +optional
	MSTeamsV2Configs []MSTeamsV2Config `json:"msteamsv2_configs,omitempty" yaml:"msteamsv2_configs,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 RelabelConfig

type RelabelConfig struct {
	// UnderScoreSourceLabels - additional form of source labels source_labels
	// for compatibility with original relabel config.
	// if set  both sourceLabels and source_labels, sourceLabels has priority.
	// for details https://github.com/VictoriaMetrics/operator/issues/131
	// +optional
	UnderScoreSourceLabels []string `json:"source_labels,omitempty" yaml:"source_labels,omitempty"`
	// UnderScoreTargetLabel - additional form of target label - target_label
	// for compatibility with original relabel config.
	// if set  both targetLabel and target_label, targetLabel has priority.
	// for details https://github.com/VictoriaMetrics/operator/issues/131
	// +optional
	UnderScoreTargetLabel string `json:"target_label,omitempty" yaml:"target_label,omitempty"`

	// The source labels select values from existing labels. Their content is concatenated
	// using the configured separator and matched against the configured regular expression
	// for the replace, keep, and drop actions.
	// +optional
	SourceLabels []string `json:"sourceLabels,omitempty" yaml:"-"`
	// Separator placed between concatenated source label values. default is ';'.
	// +optional
	Separator *string `json:"separator,omitempty" yaml:"separator,omitempty"`
	// Label to which the resulting value is written in a replace action.
	// It is mandatory for replace actions. Regex capture groups are available.
	// +optional
	TargetLabel string `json:"targetLabel,omitempty" yaml:"-"`
	// Regular expression against which the extracted value is matched. Default is '(.*)'
	// victoriaMetrics supports multiline regex joined with |
	// https://docs.victoriametrics.com/vmagent/#relabeling-enhancements
	// +optional
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	Regex StringOrArray `json:"regex,omitempty" yaml:"regex,omitempty"`
	// Modulus to take of the hash of the source label values.
	// +optional
	Modulus uint64 `json:"modulus,omitempty" yaml:"modulus,omitempty"`
	// Replacement value against which a regex replace is performed if the
	// regular expression matches. Regex capture groups are available. Default is '$1'
	// +optional
	Replacement *string `json:"replacement,omitempty" yaml:"replacement,omitempty"`
	// Action to perform based on regex matching. Default is 'replace'
	// +optional
	Action string `json:"action,omitempty" yaml:"action,omitempty"`
	// If represents metricsQL match expression (or list of expressions): '{__name__=~"foo_.*"}'
	// +optional
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	If StringOrArray `json:"if,omitempty" yaml:"if,omitempty"`
	// Match is used together with Labels for `action: graphite`
	// +optional
	Match string `json:"match,omitempty" yaml:"match,omitempty"`
	// Labels is used together with Match for `action: graphite`
	// +optional
	Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
}

RelabelConfig allows dynamic rewriting of the label set More info: https://docs.victoriametrics.com/#relabeling +k8s:openapi-gen=true

func (*RelabelConfig) DeepCopy

func (in *RelabelConfig) DeepCopy() *RelabelConfig

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

func (*RelabelConfig) DeepCopyInto

func (in *RelabelConfig) DeepCopyInto(out *RelabelConfig)

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

func (*RelabelConfig) IsEmpty

func (rc *RelabelConfig) IsEmpty() bool

IsEmpty checks if given relabelConfig has only empty values

func (*RelabelConfig) UnmarshalJSON

func (rc *RelabelConfig) UnmarshalJSON(src []byte) error

UnmarshalJSON implements interface handles cases for snake and camel cases of json tags

type RocketchatAttachmentAction added in v0.55.0

type RocketchatAttachmentAction struct {
	// +optional
	Type string `json:"type,omitempty"`
	// +optional
	Text string `json:"text,omitempty"`
	// +optional
	URL string `json:"url,omitempty"`
	// +optional
	Msg string `json:"msg,omitempty"`
}

RocketchatAttachmentAction defines message attachments https://github.com/RocketChat/Rocket.Chat.Go.SDK/blob/master/models/message.go

func (*RocketchatAttachmentAction) DeepCopy added in v0.55.0

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

func (*RocketchatAttachmentAction) DeepCopyInto added in v0.55.0

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

type RocketchatAttachmentField added in v0.55.0

type RocketchatAttachmentField struct {
	// +optional
	Short *bool `json:"short"`
	// +optional
	Title string `json:"title,omitempty"`
	// +optional
	Value string `json:"value,omitempty"`
}

RocketchatAttachmentField defines API fields https://developer.rocket.chat/reference/api/rest-api/endpoints/messaging/chat-endpoints/postmessage#attachment-field-objects

func (*RocketchatAttachmentField) DeepCopy added in v0.55.0

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

func (*RocketchatAttachmentField) DeepCopyInto added in v0.55.0

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

type RocketchatConfig added in v0.55.0

type RocketchatConfig struct {
	// SendResolved controls notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"send_resolved,omitempty" yaml:"send_resolved,omitempty"`
	// +optional
	APIURL *string `json:"api_url,omitempty" yaml:"api_url,omitempty"`

	// The sender token and token_id
	// See https://docs.rocket.chat/use-rocket.chat/user-guides/user-panel/my-account#personal-access-tokens
	// +optional
	TokenID *v1.SecretKeySelector `yaml:"token_id,omitempty" json:"token_id,omitempty"`
	// +optional
	Token *v1.SecretKeySelector `yaml:"token,omitempty" json:"token,omitempty"`

	// RocketChat channel override, (like #other-channel or @username).
	// +optional
	Channel string `yaml:"channel,omitempty" json:"channel,omitempty"`
	// +optional
	Color string `json:"color,omitempty" yaml:"color,omitempty"`
	// +optional
	Title string `json:"title,omitempty" yaml:"title,omitempty"`
	// +optional
	TitleLink string `json:"title_link,omitempty" yaml:"title_link,omitempty"`
	// +optional
	Text string `json:"text,omitempty" yaml:"text,omitempty"`
	// +optional
	Fields []RocketchatAttachmentField `json:"fields,omitempty" yaml:"fields,omitempty"`
	// +optional
	ShortFields bool `json:"short_fields,omitempty" yaml:"short_fields,omitempty"`
	// +optional
	Emoji string `json:"emoji,omitempty" yaml:"emoji,omitempty"`
	// +optional
	IconURL string `json:"icon_url,omitempty" yaml:"icon_url,omitempty"`
	// +optional
	ImageURL string `json:"image_url,omitempty" yaml:"image_url,omitempty"`
	// +optional
	ThumbURL string `json:"thumb_url,omitempty" yaml:"thumb_url,omitempty"`
	// +optional
	LinkNames bool `json:"link_names,omitempty" yaml:"link_names"`
	// +optional
	Actions []RocketchatAttachmentAction `json:"actions,omitempty" yaml:"actions,omitempty"`
	// +optional
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	HTTPConfig *HTTPConfig `json:"http_config,omitempty" yaml:"http_config,omitempty"`
}

RocketchatConfig configures notifications via Rocketchat. https://prometheus.io/docs/alerting/latest/configuration/#rocketchat_config available from v0.55.0 operator version and v0.28.0 alertmanager version

func (*RocketchatConfig) DeepCopy added in v0.55.0

func (in *RocketchatConfig) DeepCopy() *RocketchatConfig

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

func (*RocketchatConfig) DeepCopyInto added in v0.55.0

func (in *RocketchatConfig) DeepCopyInto(out *RocketchatConfig)

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

type Route

type Route struct {
	// Name of the receiver for this route.
	// +required
	Receiver string `json:"receiver"`
	// List of labels to group by.
	// +optional
	GroupBy []string `json:"group_by,omitempty"`
	// How long to wait before sending the initial notification.
	// +kubebuilder:validation:Pattern:="[0-9]+(ms|s|m|h)"
	// +optional
	GroupWait string `json:"group_wait,omitempty"`
	// How long to wait before sending an updated notification.
	// +kubebuilder:validation:Pattern:="[0-9]+(ms|s|m|h)"
	// +optional
	GroupInterval string `json:"group_interval,omitempty"`
	// How long to wait before repeating the last notification.
	// +kubebuilder:validation:Pattern:="[0-9]+(ms|s|m|h)"
	// +optional
	RepeatInterval string `json:"repeat_interval,omitempty"`
	// List of matchers that the alert’s labels should match. For the first
	// level route, the operator adds a namespace: "CRD_NS" matcher.
	// https://prometheus.io/docs/alerting/latest/configuration/#matcher
	// +optional
	Matchers []string `json:"matchers,omitempty"`
	// Continue indicating whether an alert should continue matching subsequent
	// sibling nodes. It will always be true for the first-level route if disableRouteContinueEnforce for vmalertmanager not set.
	// +optional
	Continue bool `json:"continue,omitempty"`
	// Child routes.
	// CRD schema doesn't support self-referential types for now (see https://github.com/kubernetes/kubernetes/issues/62872).
	// We expose below RawRoutes as an alternative type to circumvent the limitation, and use Routes in code.
	Routes []*SubRoute `json:"-" yaml:"-"`
	// Child routes.
	// https://prometheus.io/docs/alerting/latest/configuration/#route
	RawRoutes []apiextensionsv1.JSON `json:"routes,omitempty" yaml:"routes,omitempty"`
	// MuteTimeIntervals is a list of interval names that will mute matched alert
	// +optional
	MuteTimeIntervals []string `json:"mute_time_intervals,omitempty" yaml:"mute_time_intervals,omitempty"`
	// ActiveTimeIntervals Times when the route should be active
	// These must match the name at time_intervals
	// +optional
	ActiveTimeIntervals []string `json:"active_time_intervals,omitempty" yaml:"active_time_intervals,omitempty"`
}

Route defines a node in the routing tree.

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 Rule

type Rule struct {
	// Record represents a query, that will be recorded to dataSource
	// +optional
	Record string `json:"record,omitempty" yaml:"record,omitempty"`
	// Alert is a name for alert
	// +optional
	Alert string `json:"alert,omitempty" yaml:"alert,omitempty"`
	// Expr is query, that will be evaluated at dataSource
	// +optional
	Expr string `json:"expr" yaml:"expr"`
	// Debug enables logging for rule
	// it useful for tracking
	// +optional
	Debug *bool `json:"debug,omitempty"`
	// For evaluation interval in time.Duration format
	// 30s, 1m, 1h  or nanoseconds
	// +optional
	For string `json:"for,omitempty" yaml:"for,omitempty"`
	// KeepFiringFor will make alert continue firing for this long
	// even when the alerting expression no longer has results.
	// Use time.Duration format, 30s, 1m, 1h  or nanoseconds
	// +optional
	KeepFiringFor string `json:"keep_firing_for,omitempty" yaml:"keep_firing_for,omitempty"`
	// Labels will be added to rule configuration
	// +optional
	Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
	// Annotations will be added to rule configuration
	// +optional
	Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"`
	// UpdateEntriesLimit defines max number of rule's state updates stored in memory.
	// Overrides `-rule.updateEntriesLimit` in vmalert.
	// +optional
	UpdateEntriesLimit *int `json:"update_entries_limit,omitempty" yaml:"update_entries_limit,omitempty"`
}

Rule describes an alerting or recording rule. +k8s:openapi-gen=true

func (*Rule) DeepCopy

func (in *Rule) DeepCopy() *Rule

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

func (*Rule) DeepCopyInto

func (in *Rule) DeepCopyInto(out *Rule)

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

type RuleGroup

type RuleGroup struct {
	// Name of group
	Name string `json:"name"`
	// evaluation interval for group
	// +optional
	Interval string `json:"interval,omitempty" yaml:"interval,omitempty"`
	// Rules list of alert rules
	Rules []Rule `json:"rules"`
	// Limit the number of alerts an alerting rule and series a recording
	// rule can produce
	// +optional
	Limit int `json:"limit,omitempty"`
	// Optional
	// Group will be evaluated at the exact offset in the range of [0...interval].
	EvalOffset string `json:"eval_offset,omitempty" yaml:"eval_offset,omitempty"`
	// Optional
	// Adjust the `time` parameter of group evaluation requests to compensate intentional query delay from the datasource.
	EvalDelay string `json:"eval_delay,omitempty" yaml:"eval_delay,omitempty"`
	// Optional
	// The evaluation timestamp will be aligned with group's interval,
	// instead of using the actual timestamp that evaluation happens at.
	// It is enabled by default to get more predictable results
	// and to visually align with graphs plotted via Grafana or vmui.
	EvalAlignment *bool `json:"eval_alignment,omitempty" yaml:"eval_alignment,omitempty"`
	// Concurrency defines how many rules execute at once.
	// +optional
	Concurrency int `json:"concurrency,omitempty" yaml:"concurrency,omitempty"`
	// Labels optional list of labels added to every rule within a group.
	// It has priority over the external labels.
	// Labels are commonly used for adding environment
	// or tenant-specific tag.
	// +optional
	Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
	// ExtraFilterLabels optional list of label filters applied to every rule's
	// request within a group. Is compatible only with VM datasource.
	// See more details [here](https://docs.victoriametrics.com/#prometheus-querying-api-enhancements)
	// Deprecated, use params instead
	// +optional
	ExtraFilterLabels map[string]string `json:"extra_filter_labels,omitempty" yaml:"extra_filter_labels,omitempty"`
	// Tenant id for group, can be used only with enterprise version of vmalert.
	// See more details [here](https://docs.victoriametrics.com/vmalert#multitenancy).
	// +optional
	Tenant string `json:"tenant,omitempty" yaml:"tenant,omitempty"`
	// Params optional HTTP URL parameters added to each rule request
	// +optional
	Params url.Values `json:"params,omitempty" yaml:"params,omitempty"`
	// Type defines datasource type for enterprise version of vmalert
	// possible values - prometheus,graphite,vlogs
	// +optional
	Type string `json:"type,omitempty" yaml:"type,omitempty"`
	// Headers contains optional HTTP headers added to each rule request
	// Must be in form `header-name: value`
	// For example:
	//  headers:
	//    - "CustomHeader: foo"
	//    - "CustomHeader2: bar"
	// +optional
	Headers []string `json:"headers,omitempty"`
	// NotifierHeaders contains optional HTTP headers added to each alert request which will send to notifier
	// Must be in form `header-name: value`
	// For example:
	//  headers:
	//    - "CustomHeader: foo"
	//    - "CustomHeader2: bar"
	// +optional
	NotifierHeaders []string `json:"notifier_headers,omitempty" yaml:"notifier_headers,omitempty"`
}

RuleGroup is a list of sequentially evaluated recording and alerting rules. +k8s:openapi-gen=true

func (*RuleGroup) DeepCopy

func (in *RuleGroup) DeepCopy() *RuleGroup

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

func (*RuleGroup) DeepCopyInto

func (in *RuleGroup) DeepCopyInto(out *RuleGroup)

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

type ScrapeObjectStatus

type ScrapeObjectStatus struct {
	StatusMetadata `json:",inline"`
}

ScrapeObjectStatus defines the observed state of ScrapeObjects

func (*ScrapeObjectStatus) DeepCopy

func (in *ScrapeObjectStatus) DeepCopy() *ScrapeObjectStatus

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

func (*ScrapeObjectStatus) DeepCopyInto

func (in *ScrapeObjectStatus) DeepCopyInto(out *ScrapeObjectStatus)

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

type SecretOrConfigMap

type SecretOrConfigMap struct {
	// Secret containing data to use for the targets.
	// +optional
	Secret *v1.SecretKeySelector `json:"secret,omitempty"`
	// ConfigMap containing data to use for the targets.
	// +optional
	ConfigMap *v1.ConfigMapKeySelector `json:"configMap,omitempty"`
}

SecretOrConfigMap allows to specify data as a Secret or ConfigMap. Fields are mutually exclusive.

func (*SecretOrConfigMap) DeepCopy

func (in *SecretOrConfigMap) DeepCopy() *SecretOrConfigMap

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

func (*SecretOrConfigMap) DeepCopyInto

func (in *SecretOrConfigMap) DeepCopyInto(out *SecretOrConfigMap)

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

func (*SecretOrConfigMap) Key

func (c *SecretOrConfigMap) Key() string

Key returns actual key name

func (*SecretOrConfigMap) PrefixedName

func (c *SecretOrConfigMap) PrefixedName() string

PrefixedName returns name with possible prefix prefix added only to configmap to avoid clash with secret name

type SecretOrConfigMapValidationError

type SecretOrConfigMapValidationError struct {
	// contains filtered or unexported fields
}

SecretOrConfigMapValidationError is returned by SecretOrConfigMap.validate() on semantically invalid configurations. +k8s:openapi-gen=false

func (*SecretOrConfigMapValidationError) DeepCopy

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

func (*SecretOrConfigMapValidationError) DeepCopyInto

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

func (*SecretOrConfigMapValidationError) Error

type SecurityContext

type SecurityContext struct {
	*v1.PodSecurityContext    `json:",inline"`
	*ContainerSecurityContext `json:",inline"`
}

SecurityContext extends PodSecurityContext with ContainerSecurityContext It allows to globally configure security params for pod and all containers

func (*SecurityContext) DeepCopy

func (in *SecurityContext) DeepCopy() *SecurityContext

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

func (*SecurityContext) DeepCopyInto

func (in *SecurityContext) DeepCopyInto(out *SecurityContext)

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

type Sigv4Config

type Sigv4Config struct {
	// AWS region, if blank the region from the default credentials chain is used
	// +optional
	Region string `json:"region,omitempty"`
	// The AWS API keys. Both access_key and secret_key must be supplied or both must be blank.
	// If blank the environment variables `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` are used.
	// +optional
	AccessKey string `json:"access_key,omitempty" yaml:"access_key,omitempty"`
	// secret key selector to get the keys from a Kubernetes Secret
	// +optional
	AccessKeySelector *v1.SecretKeySelector `json:"access_key_selector,omitempty" yaml:"access_key_selector,omitempty"`
	// secret key selector to get the keys from a Kubernetes Secret
	// +optional
	SecretKey *v1.SecretKeySelector `json:"secret_key_selector,omitempty" yaml:"secret_key_selector,omitempty"`
	// Named AWS profile used to authenticate
	// +optional
	Profile string `json:"profile,omitempty"`
	// AWS Role ARN, an alternative to using AWS API keys
	// +optional
	RoleArn string `json:"role_arn,omitempty" yaml:"role_arn,omitempty"`
}

func (*Sigv4Config) DeepCopy

func (in *Sigv4Config) DeepCopy() *Sigv4Config

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

func (*Sigv4Config) DeepCopyInto

func (in *Sigv4Config) DeepCopyInto(out *Sigv4Config)

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

type SlackAction

type SlackAction struct {
	// +kubebuilder:validation:MinLength=1
	// +required
	Type string `json:"type"`
	// +kubebuilder:validation:MinLength=1
	// +required
	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

func (in *SlackAction) DeepCopy() *SlackAction

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

func (*SlackAction) DeepCopyInto

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

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

type SlackConfig

type SlackConfig struct {
	// SendResolved controls notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"send_resolved,omitempty" yaml:"send_resolved,omitempty"`
	// The secret's key that contains the Slack webhook URL.
	// It must be at them same namespace as CRD
	// fallback to global setting if empty
	// +optional
	APIURL *v1.SecretKeySelector `json:"api_url,omitempty" yaml:"api_url,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:"title_link,omitempty" yaml:"title_link,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:"short_fields,omitempty" yaml:"short_fields,omitempty"`
	// +optional
	Footer string `json:"footer,omitempty"`
	// +optional
	Fallback string `json:"fallback,omitempty"`
	// +optional
	CallbackID string `json:"callback_id,omitempty" yaml:"callback_id,omitempty"`
	// +optional
	IconEmoji string `json:"icon_emoji,omitempty" yaml:"icon_emoji,omitempty"`
	// +optional
	IconURL string `json:"icon_url,omitempty" yaml:"icon_url,omitempty"`
	// +optional
	ImageURL string `json:"image_url,omitempty" yaml:"image_url,omitempty"`
	// +optional
	ThumbURL string `json:"thumb_url,omitempty" yaml:"thumb_url,omitempty"`
	// +optional
	LinkNames bool `json:"link_names,omitempty" yaml:"link_names,omitempty"`
	// +optional
	MrkdwnIn []string `json:"mrkdwn_in,omitempty" yaml:"mrkdwn_in,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:"http_config,omitempty" yaml:"http_config,omitempty"`
}

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

func (*SlackConfig) DeepCopy

func (in *SlackConfig) DeepCopy() *SlackConfig

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

func (*SlackConfig) DeepCopyInto

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

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

type SlackConfirmationField

type SlackConfirmationField struct {
	// +kubebuilder:validation:MinLength=1
	// +required
	Text string `json:"text"`
	// +optional
	Title string `json:"title,omitempty"`
	// +optional
	OkText string `json:"ok_text,omitempty" yaml:"ok_text,omitempty"`
	// +optional
	DismissText string `json:"dismiss_text,omitempty" yaml:"dismiss_text,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

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

func (*SlackConfirmationField) DeepCopyInto

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

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

type SlackField

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

SlackField configures a single Slack field that is sent with each notification. See https://api.slack.com/docs/message-attachments#fields for more information.

func (*SlackField) DeepCopy

func (in *SlackField) DeepCopy() *SlackField

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

func (*SlackField) DeepCopyInto

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

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

type SnsConfig

type SnsConfig struct {
	// SendResolved controls notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"send_resolved,omitempty" yaml:"send_resolved,omitempty"`
	// The api URL
	// +optional
	URL string `json:"api_url,omitempty" yaml:"api_url,omitempty"`
	// Configure the AWS Signature Verification 4 signing process
	Sigv4 *Sigv4Config `json:"sigv4,omitempty"`
	// SNS topic ARN, either specify this, phone_number or target_arn
	// +optional
	TopicArn string `json:"topic_arn,omitempty" yaml:"topic_arn,omitempty"`
	// The subject line if message is delivered to an email endpoint.
	// +optional
	Subject string `json:"subject,omitempty"`
	// Phone number if message is delivered via SMS
	// Specify this, topic_arn or target_arn
	PhoneNumber string `json:"phone_number,omitempty" yaml:"phone_number,omitempty"`
	// Mobile platform endpoint ARN if message is delivered via mobile notifications
	// Specify this, topic_arn or phone_number
	// +optional
	TargetArn string `json:"target_arn,omitempty" yaml:"target_arn,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:"http_config,omitempty" yaml:"http_config,omitempty"`
}

func (*SnsConfig) DeepCopy

func (in *SnsConfig) DeepCopy() *SnsConfig

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

func (*SnsConfig) DeepCopyInto

func (in *SnsConfig) DeepCopyInto(out *SnsConfig)

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

type StaticConfig

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

StaticConfig defines a static configuration. See [here](https://docs.victoriametrics.com/sd_configs#static_configs)

func (*StaticConfig) DeepCopy

func (in *StaticConfig) DeepCopy() *StaticConfig

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

func (*StaticConfig) DeepCopyInto

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

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

type StaticRef

type StaticRef struct {
	// URL http url for given staticRef.
	URL string `json:"url,omitempty"`
	// URLs allows setting multiple urls for load-balancing at vmauth-side.
	// +optional
	URLs []string `json:"urls,omitempty"`
}

StaticRef - user-defined routing host address.

func (*StaticRef) DeepCopy

func (in *StaticRef) DeepCopy() *StaticRef

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

func (*StaticRef) DeepCopyInto

func (in *StaticRef) DeepCopyInto(out *StaticRef)

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

type StatusMetadata

type StatusMetadata struct {
	// UpdateStatus defines a status for update rollout
	//
	UpdateStatus UpdateStatus `json:"updateStatus,omitempty"`
	// Reason defines human readable error reason
	//
	Reason string `json:"reason,omitempty"`
	// ObservedGeneration defines current generation picked by operator for the
	// reconcile
	ObservedGeneration int64 `json:"observedGeneration,omitempty"`
	// CurrentSyncError holds an error occurred during reconcile loop
	CurrentSyncError string `json:"-"`
	// Known .status.conditions.type are: "Available", "Progressing", and "Degraded"
	// +patchMergeKey=type
	// +patchStrategy=merge
	// +listType=map
	// +listMapKey=type
	Conditions []Condition `json:"conditions,omitempty"`
}

StatusMetadata holds metadata of application update status +k8s:openapi-gen=true

func (*StatusMetadata) DeepCopy

func (in *StatusMetadata) DeepCopy() *StatusMetadata

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

func (*StatusMetadata) DeepCopyInto

func (in *StatusMetadata) DeepCopyInto(out *StatusMetadata)

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

type StorageSpec

type StorageSpec struct {
	// Deprecated: subPath usage will be disabled by default in a future release, this option will become unnecessary.
	// DisableMountSubPath allows to remove any subPath usage in volume mounts.
	// +optional
	DisableMountSubPath bool `json:"disableMountSubPath,omitempty"`
	// EmptyDirVolumeSource to be used by the Prometheus StatefulSets. If specified, used in place of any volumeClaimTemplate. More
	// info: https://kubernetes.io/docs/concepts/storage/volumes/#emptydir
	// +optional
	EmptyDir *v1.EmptyDirVolumeSource `json:"emptyDir,omitempty"`
	// A PVC spec to be used by the VMAlertManager StatefulSets.
	// +optional
	VolumeClaimTemplate EmbeddedPersistentVolumeClaim `json:"volumeClaimTemplate,omitempty"`
}

StorageSpec defines the configured storage for a group Prometheus servers. If neither `emptyDir` nor `volumeClaimTemplate` is specified, then by default an [EmptyDir](https://kubernetes.io/docs/concepts/storage/volumes/#emptydir) will be used. +k8s:openapi-gen=true

func (*StorageSpec) DeepCopy

func (in *StorageSpec) DeepCopy() *StorageSpec

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

func (*StorageSpec) DeepCopyInto

func (in *StorageSpec) DeepCopyInto(out *StorageSpec)

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

func (*StorageSpec) IntoSTSVolume

func (ss *StorageSpec) IntoSTSVolume(name string, sts *appsv1.StatefulSetSpec)

IntoSTSVolume converts storageSpec into proper volume for statefulsetSpec by default, it adds emptyDir volume.

type StreamAggrConfig

type StreamAggrConfig struct {
	// Stream aggregation rules
	// +optional
	Rules []StreamAggrRule `json:"rules"`
	// ConfigMap with stream aggregation rules
	// +optional
	RuleConfigMap *v1.ConfigMapKeySelector `json:"configmap,omitempty"`
	// Allows writing both raw and aggregate data
	// +optional
	KeepInput bool `json:"keepInput,omitempty"`
	// Allow drop all the input samples after the aggregation
	// +optional
	DropInput bool `json:"dropInput,omitempty"`
	// Allows setting different de-duplication intervals per each configured remote storage
	// +optional
	DedupInterval string `json:"dedupInterval,omitempty"`
	// labels to drop from samples for aggregator before stream de-duplication and aggregation
	// +optional
	DropInputLabels []string `json:"dropInputLabels,omitempty"`
	// IgnoreFirstIntervals instructs to ignore first interval
	// +optional
	IgnoreFirstIntervals int `json:"ignoreFirstIntervals,omitempty"`
	// IgnoreOldSamples instructs to ignore samples with old timestamps outside the current aggregation interval.
	// +optional
	IgnoreOldSamples bool `json:"ignoreOldSamples,omitempty"`
	// EnableWindows enables aggregating data in separate windows ( available from v0.54.0).
	// +optional
	EnableWindows bool `json:"enableWindows,omitempty"`
}

StreamAggrConfig defines the stream aggregation config +k8s:openapi-gen=true

func (*StreamAggrConfig) DeepCopy

func (in *StreamAggrConfig) DeepCopy() *StreamAggrConfig

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

func (*StreamAggrConfig) DeepCopyInto

func (in *StreamAggrConfig) DeepCopyInto(out *StreamAggrConfig)

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

func (*StreamAggrConfig) HasAnyRule

func (config *StreamAggrConfig) HasAnyRule() bool

HasAnyRule returns true if there is at least one aggregation rule

type StreamAggrRule

type StreamAggrRule struct {
	// Match is a label selector (or list of label selectors) for filtering time series for the given selector.
	//
	// If the match isn't set, then all the input time series are processed.
	// +optional
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	Match StringOrArray `json:"match,omitempty" yaml:"match,omitempty"`

	// Interval is the interval between aggregations.
	Interval string `json:"interval" yaml:"interval"`

	// NoAlignFlushToInterval disables aligning of flushes to multiples of Interval.
	// By default flushes are aligned to Interval.
	// +optional
	NoAlignFlushToInterval *bool `json:"no_align_flush_to_interval,omitempty" yaml:"no_align_flush_to_interval,omitempty"`

	// FlushOnShutdown defines whether to flush the aggregation state on process termination
	// or config reload. Is `false` by default.
	// It is not recommended changing this setting, unless unfinished aggregations states
	// are preferred to missing data points.
	// +optional
	FlushOnShutdown bool `json:"flush_on_shutdown,omitempty" yaml:"flush_on_shutdown,omitempty"`

	// DedupInterval is an optional interval for deduplication.
	// +optional
	DedupInterval string `json:"dedup_interval,omitempty" yaml:"dedup_interval,omitempty"`
	// Staleness interval is interval after which the series state will be reset if no samples have been sent during it.
	// The parameter is only relevant for outputs: total, total_prometheus, increase, increase_prometheus and histogram_bucket.
	// +optional
	StalenessInterval string `json:"staleness_interval,omitempty" yaml:"staleness_interval,omitempty"`

	// Outputs is a list of output aggregate functions to produce.
	//
	// The following names are allowed:
	//
	// - total - aggregates input counters
	// - increase - counts the increase over input counters
	// - count_series - counts the input series
	// - count_samples - counts the input samples
	// - sum_samples - sums the input samples
	// - last - the last biggest sample value
	// - min - the minimum sample value
	// - max - the maximum sample value
	// - avg - the average value across all the samples
	// - stddev - standard deviation across all the samples
	// - stdvar - standard variance across all the samples
	// - histogram_bucket - creates VictoriaMetrics histogram for input samples
	// - quantiles(phi1, ..., phiN) - quantiles' estimation for phi in the range [0..1]
	//
	// The output time series will have the following names:
	//
	//   input_name:aggr_<interval>_<output>
	//
	Outputs []string `json:"outputs"`

	// KeepMetricNames instructs to leave metric names as is for the output time series without adding any suffix.
	// +optional
	KeepMetricNames *bool `json:"keep_metric_names,omitempty" yaml:"keep_metric_names,omitempty"`

	// IgnoreOldSamples instructs to ignore samples with old timestamps outside the current aggregation interval.
	// +optional
	IgnoreOldSamples *bool `json:"ignore_old_samples,omitempty" yaml:"ignore_old_samples,omitempty"`

	// By is an optional list of labels for grouping input series.
	//
	// See also Without.
	//
	// If neither By nor Without are set, then the Outputs are calculated
	// individually per each input time series.
	// +optional
	By []string `json:"by,omitempty" yaml:"by,omitempty"`

	// Without is an optional list of labels, which must be excluded when grouping input series.
	//
	// See also By.
	//
	// If neither By nor Without are set, then the Outputs are calculated
	// individually per each input time series.
	// +optional
	Without []string `json:"without,omitempty" yaml:"without,omitempty"`

	IgnoreFirstIntervals *int `json:"ignore_first_intervals,omitempty" yaml:"ignore_first_intervals,omitempty"`

	// DropInputLabels is an optional list with labels, which must be dropped before further processing of input samples.
	//
	// Labels are dropped before de-duplication and aggregation.
	// +optional
	DropInputLabels *[]string `json:"drop_input_labels,omitempty" yaml:"drop_input_labels,omitempty"`

	// InputRelabelConfigs is an optional relabeling rules, which are applied on the input
	// before aggregation.
	// +optional
	InputRelabelConfigs []RelabelConfig `json:"input_relabel_configs,omitempty" yaml:"input_relabel_configs,omitempty"`

	// OutputRelabelConfigs is an optional relabeling rules, which are applied
	// on the aggregated output before being sent to remote storage.
	// +optional
	OutputRelabelConfigs []RelabelConfig `json:"output_relabel_configs,omitempty" yaml:"output_relabel_configs,omitempty"`

	// EnableWindows enables aggregating data in separate windows
	// +optional
	EnableWindows bool `json:"enable_windows,omitempty" yaml:"enable_windows,omitempty"`
}

StreamAggrRule defines the rule in stream aggregation config +k8s:openapi-gen=true

func (*StreamAggrRule) DeepCopy

func (in *StreamAggrRule) DeepCopy() *StreamAggrRule

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

func (*StreamAggrRule) DeepCopyInto

func (in *StreamAggrRule) DeepCopyInto(out *StreamAggrRule)

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

type StringOrArray

type StringOrArray []string

StringOrArray is a helper type for storing string or array of string.

func (StringOrArray) DeepCopy

func (in StringOrArray) DeepCopy() StringOrArray

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

func (StringOrArray) DeepCopyInto

func (in StringOrArray) DeepCopyInto(out *StringOrArray)

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

func (*StringOrArray) MarshalJSON added in v0.55.0

func (m *StringOrArray) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaller interface

func (StringOrArray) MarshalYAML

func (m StringOrArray) MarshalYAML() (any, error)

MarshalYAML implements yaml.Marshaller interface

func (*StringOrArray) UnmarshalJSON

func (m *StringOrArray) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaller interface

func (*StringOrArray) UnmarshalYAML

func (m *StringOrArray) UnmarshalYAML(unmarshal func(any) error) error

UnmarshalYAML implements yaml.Unmarshaler interface

type SubRoute

type SubRoute Route

SubRoute alias for Route, its needed to proper use json parsing with raw input

func (*SubRoute) DeepCopy

func (in *SubRoute) DeepCopy() *SubRoute

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

func (*SubRoute) DeepCopyInto

func (in *SubRoute) DeepCopyInto(out *SubRoute)

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

type TLSClientConfig

type TLSClientConfig struct {
	// CA defines reference for secret with CA content under given key
	// mutually exclusive with CAFile
	// +optional
	CASecretRef *v1.SecretKeySelector `json:"ca_secret_ref,omitempty"`
	// CAFile defines path to the pre-mounted file with CA
	// mutually exclusive with CASecretRef
	// +optional
	CAFile string `json:"ca_file,omitempty"`
	// Cert defines reference for secret with CA content under given key
	// mutually exclusive with CertFile
	// +optional
	InsecureSkipVerify bool `json:"insecure_skip_verify,omitempty"`
	// ServerName indicates a name of a server
	// +optional
	ServerName string `json:"server_name,omitempty"`
	// Certs defines cert, CA and key for TLS auth
	Certs `json:",inline"`
}

TLSClientConfig defines TLS configuration for the application's client

func (*TLSClientConfig) DeepCopy

func (in *TLSClientConfig) DeepCopy() *TLSClientConfig

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

func (*TLSClientConfig) DeepCopyInto

func (in *TLSClientConfig) DeepCopyInto(out *TLSClientConfig)

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

type TLSConfig

type TLSConfig struct {
	// Path to the CA cert in the container to use for the targets.
	// +optional
	CAFile string `json:"caFile,omitempty" yaml:"ca_file,omitempty"`
	// Struct containing the CA cert to use for the targets.
	// +optional
	CA SecretOrConfigMap `json:"ca,omitempty"`

	// Path to the client cert file in the container for the targets.
	// +optional
	CertFile string `json:"certFile,omitempty" yaml:"cert_file,omitempty"`
	// Struct containing the client cert file for the targets.
	// +optional
	Cert SecretOrConfigMap `json:"cert,omitempty"`

	// Path to the client key file in the container for the targets.
	// +optional
	KeyFile string `json:"keyFile,omitempty" yaml:"key_file,omitempty"`
	// Secret containing the client key file for the targets.
	// +optional
	KeySecret *v1.SecretKeySelector `json:"keySecret,omitempty" yaml:"key_secret,omitempty"`

	// Used to verify the hostname for the targets.
	// +optional
	ServerName string `json:"serverName,omitempty" yaml:"server_name,omitempty"`
	// Disable target certificate validation.
	// +optional
	InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty" yaml:"insecure_skip_verify,omitempty"`
}

TLSConfig specifies TLSConfig configuration parameters. +k8s:openapi-gen=true

func (*TLSConfig) AsArgs

func (c *TLSConfig) AsArgs(args []string, prefix, pathPrefix string) []string

func (*TLSConfig) BuildAssetPath

func (c *TLSConfig) BuildAssetPath(prefix, name, key string) string

BuildAssetPath builds path for usage with assets

func (*TLSConfig) DeepCopy

func (in *TLSConfig) DeepCopy() *TLSConfig

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

func (*TLSConfig) DeepCopyInto

func (in *TLSConfig) DeepCopyInto(out *TLSConfig)

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

func (*TLSConfig) UnmarshalJSON added in v0.56.0

func (c *TLSConfig) UnmarshalJSON(data []byte) error

UnmarshalJSON implements json.Unmarshaller interface

func (*TLSConfig) Validate

func (c *TLSConfig) Validate() error

validate semantically validates the given TLSConfig.

type TLSConfigValidationError

type TLSConfigValidationError struct {
	// contains filtered or unexported fields
}

TLSConfigValidationError is returned by TLSConfig.validate() on semantically invalid tls configurations. +k8s:openapi-gen=false

func (*TLSConfigValidationError) DeepCopy

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

func (*TLSConfigValidationError) DeepCopyInto

func (in *TLSConfigValidationError) DeepCopyInto(out *TLSConfigValidationError)

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

func (*TLSConfigValidationError) Error

func (e *TLSConfigValidationError) Error() string

type TLSServerConfig

type TLSServerConfig struct {
	// ClientCASecretRef defines reference for secret with CA content under given key
	// mutually exclusive with ClientCAFile
	// +optional
	ClientCASecretRef *v1.SecretKeySelector `json:"client_ca_secret_ref,omitempty"`
	// ClientCAFile defines path to the pre-mounted file with CA
	// mutually exclusive with ClientCASecretRef
	// +optional
	ClientCAFile string `json:"client_ca_file,omitempty"`
	// Cert defines reference for secret with CA content under given key
	// mutually exclusive with CertFile
	// ClientAuthType defines server policy for client authentication
	// If you want to enable client authentication (aka mTLS), you need to use RequireAndVerifyClientCert
	// Note, mTLS is supported only at enterprise version of VictoriaMetrics components
	// +optional
	// +kubebuilder:validation:Enum=NoClientCert;RequireAndVerifyClientCert
	ClientAuthType string `json:"client_auth_type,omitempty"`
	// MinVersion minimum TLS version that is acceptable.
	// +optional
	// +kubebuilder:validation:Enum=TLS10;TLS11;TLS12;TLS13
	MinVersion string `json:"min_version,omitempty"`
	// MaxVersion maximum TLS version that is acceptable.
	// +optional
	// +kubebuilder:validation:Enum=TLS10;TLS11;TLS12;TLS13
	MaxVersion string `json:"max_version,omitempty"`
	// CipherSuites defines list of supported cipher suites for TLS versions up to TLS 1.2
	// https://golang.org/pkg/crypto/tls/#pkg-constants
	// +optional
	CipherSuites []string `json:"cipher_suites,omitempty"`
	// CurvePreferences defines elliptic curves that will be used in an ECDHE handshake, in preference order.
	// https://golang.org/pkg/crypto/tls/#CurveID
	// +optional
	CurvePreferences []string `json:"curve_preferences,omitempty"`
	// PreferServerCipherSuites controls whether the server selects the
	// client's most preferred ciphersuite
	// +optional
	PreferServerCipherSuites bool `json:"prefer_server_cipher_suites,omitempty"`
	// Certs defines cert, CA and key for TLS auth
	Certs `json:",inline"`
}

TLSServerConfig defines TLS configuration for the application's server

func (*TLSServerConfig) DeepCopy

func (in *TLSServerConfig) DeepCopy() *TLSServerConfig

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

func (*TLSServerConfig) DeepCopyInto

func (in *TLSServerConfig) DeepCopyInto(out *TLSServerConfig)

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

type TargetEndpoint

type TargetEndpoint struct {
	// Targets static targets addresses in form of ["192.122.55.55:9100","some-name:9100"].
	// +kubebuilder:validation:MinItems=1
	Targets []string `json:"targets"`
	// Labels static labels for targets.
	// +optional
	Labels               map[string]string `json:"labels,omitempty"`
	EndpointRelabelings  `json:",inline"`
	EndpointAuth         `json:",inline"`
	EndpointScrapeParams `json:",inline"`
}

TargetEndpoint defines single static target endpoint.

func (*TargetEndpoint) DeepCopy

func (in *TargetEndpoint) DeepCopy() *TargetEndpoint

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

func (*TargetEndpoint) DeepCopyInto

func (in *TargetEndpoint) DeepCopyInto(out *TargetEndpoint)

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

type TargetRef

type TargetRef struct {
	// CRD describes exist operator's CRD object,
	// operator generates access url based on CRD params.
	// +optional
	CRD *CRDRef `json:"crd,omitempty"`
	// Static - user defined url for traffic forward,
	// for instance http://vmsingle:8429
	// +optional
	Static *StaticRef `json:"static,omitempty"`
	// Paths - matched path to route.
	// +optional
	Paths []string `json:"paths,omitempty"`
	Hosts []string `json:"hosts,omitempty"`

	URLMapCommon `json:",omitempty"`

	// TargetPathSuffix allows to add some suffix to the target path
	// It allows to hide tenant configuration from user with crd as ref.
	// it also may contain any url encoded params.
	// +optional
	TargetPathSuffix string `json:"target_path_suffix,omitempty"`
	// TargetRefBasicAuth allow an target endpoint to authenticate over basic authentication
	// +optional
	TargetRefBasicAuth *TargetRefBasicAuth `json:"targetRefBasicAuth,omitempty"`
}

TargetRef describes target for user traffic forwarding. one of target types can be chosen: crd or static per targetRef. user can define multiple targetRefs with different ref Types.

func (*TargetRef) DeepCopy

func (in *TargetRef) DeepCopy() *TargetRef

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

func (*TargetRef) DeepCopyInto

func (in *TargetRef) DeepCopyInto(out *TargetRef)

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

type TargetRefBasicAuth

type TargetRefBasicAuth struct {
	// The secret in the service scrape namespace that contains the username
	// for authentication.
	// It must be at them same namespace as CRD
	Username v1.SecretKeySelector `json:"username"`
	// The secret in the service scrape namespace that contains the password
	// for authentication.
	// It must be at them same namespace as CRD
	Password v1.SecretKeySelector `json:"password"`
}

TargetRefBasicAuth target basic authentication

func (*TargetRefBasicAuth) DeepCopy

func (in *TargetRefBasicAuth) DeepCopy() *TargetRefBasicAuth

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

func (*TargetRefBasicAuth) DeepCopyInto

func (in *TargetRefBasicAuth) DeepCopyInto(out *TargetRefBasicAuth)

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

type TelegramConfig

type TelegramConfig struct {
	// SendResolved controls notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"send_resolved,omitempty" yaml:"send_resolved,omitempty"`
	// APIUrl the Telegram API URL i.e. https://api.telegram.org.
	// +optional
	APIUrl string `json:"api_url,omitempty" yaml:"api_url,omitempty"`
	// BotToken token for the bot
	// https://core.telegram.org/bots/api
	BotToken *v1.SecretKeySelector `json:"bot_token" yaml:"bot_token"`
	// ChatID is ID of the chat where to send the messages.
	ChatID int `json:"chat_id" yaml:"chat_id"`
	// MessageThreadID defines ID of the message thread where to send the messages.
	// +optional
	MessageThreadID int `json:"message_thread_id,omitempty"`
	// Message is templated message
	// +optional
	Message string `json:"message,omitempty"`
	// DisableNotifications
	// +optional
	DisableNotifications *bool `json:"disable_notifications,omitempty" yaml:"disable_notifications,omitempty"`
	// ParseMode for telegram message,
	// supported values are MarkdownV2, Markdown, Markdown and empty string for plain text.
	// +optional
	ParseMode string `json:"parse_mode,omitempty" yaml:"parse_mode"`
	// HTTP client configuration.
	// +optional
	HTTPConfig *HTTPConfig `json:"http_config,omitempty" yaml:"http_config,omitempty"`
}

TelegramConfig configures notification via telegram https://prometheus.io/docs/alerting/latest/configuration/#telegram_config

func (*TelegramConfig) DeepCopy

func (in *TelegramConfig) DeepCopy() *TelegramConfig

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

func (*TelegramConfig) DeepCopyInto

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

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

type TimeInterval

type TimeInterval struct {
	// Times defines time range for mute
	// +optional
	Times []TimeRange `json:"times,omitempty"`
	// Weekdays defines list of days of the week, where the week begins on Sunday and ends on Saturday.
	// +optional
	Weekdays []string `json:"weekdays,omitempty"`
	// DayOfMonth defines list of numerical days in the month. Days begin at 1. Negative values are also accepted.
	// for example, ['1:5', '-3:-1']
	// +optional
	DaysOfMonth []string `json:"days_of_month,omitempty" yaml:"days_of_month,omitempty"`
	// Months  defines list of calendar months identified by a case-insensitive name (e.g. ‘January’) or numeric 1.
	// For example, ['1:3', 'may:august', 'december']
	// +optional
	Months []string `json:"months,omitempty"`
	// Years defines numerical list of years, ranges are accepted.
	// For example, ['2020:2022', '2030']
	// +optional
	Years []string `json:"years,omitempty"`
	// Location in golang time location form, e.g. UTC
	// +optional
	Location string `json:"location,omitempty"`
}

TimeInterval defines intervals of time

func (*TimeInterval) DeepCopy

func (in *TimeInterval) DeepCopy() *TimeInterval

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

func (*TimeInterval) DeepCopyInto

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

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

type TimeIntervals

type TimeIntervals struct {
	// Name of interval
	// +required
	Name string `json:"name,omitempty"`
	// TimeIntervals interval configuration
	// +required
	TimeIntervals []TimeInterval `json:"time_intervals" yaml:"time_intervals"`
}

TimeIntervals for alerts

func (*TimeIntervals) DeepCopy

func (in *TimeIntervals) DeepCopy() *TimeIntervals

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

func (*TimeIntervals) DeepCopyInto

func (in *TimeIntervals) DeepCopyInto(out *TimeIntervals)

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

type TimeRange

type TimeRange struct {
	// StartTime for example  HH:MM
	// +required
	StartTime string `json:"start_time" yaml:"start_time"`
	// EndTime for example HH:MM
	// +required
	EndTime string `json:"end_time" yaml:"end_time"`
}

TimeRange ranges inclusive of the starting time and exclusive of the end time

func (*TimeRange) DeepCopy

func (in *TimeRange) DeepCopy() *TimeRange

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

func (*TimeRange) DeepCopyInto

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

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

type URLMapCommon

type URLMapCommon struct {
	// SrcQueryArgs is an optional list of query args, which must match request URL query args.
	SrcQueryArgs []string `json:"src_query_args,omitempty" yaml:"src_query_args,omitempty"`

	// SrcHeaders is an optional list of headers, which must match request headers.
	SrcHeaders []string `json:"src_headers,omitempty" yaml:"src_headers,omitempty"`

	// DiscoverBackendIPs instructs discovering URLPrefix backend IPs via DNS.
	DiscoverBackendIPs *bool `json:"discover_backend_ips,omitempty" yaml:"discover_backend_ips,omitempty"`

	// RequestHeaders represent additional http headers, that vmauth uses
	// in form of ["header_key: header_value"]
	// multiple values for header key:
	// ["header_key: value1,value2"]
	// it's available since 1.68.0 version of vmauth
	// +optional
	RequestHeaders []string `json:"headers,omitempty" yaml:"headers,omitempty"`
	// ResponseHeaders represent additional http headers, that vmauth adds for request response
	// in form of ["header_key: header_value"]
	// multiple values for header key:
	// ["header_key: value1,value2"]
	// it's available since 1.93.0 version of vmauth
	// +optional
	ResponseHeaders []string `json:"response_headers,omitempty" yaml:"response_headers,omitempty"`

	// RetryStatusCodes defines http status codes in numeric format for request retries
	// Can be defined per target or at VMUser.spec level
	// e.g. [429,503]
	// +optional
	RetryStatusCodes []int `json:"retry_status_codes,omitempty" yaml:"retry_status_codes,omitempty"`

	// LoadBalancingPolicy defines load balancing policy to use for backend urls.
	// Supported policies: least_loaded, first_available.
	// See [here](https://docs.victoriametrics.com/vmauth#load-balancing) for more details (default "least_loaded")
	// +optional
	// +kubebuilder:validation:Enum=least_loaded;first_available
	LoadBalancingPolicy *string `json:"load_balancing_policy,omitempty" yaml:"load_balancing_policy,omitempty"`

	// DropSrcPathPrefixParts is the number of `/`-delimited request path prefix parts to drop before proxying the request to backend.
	// See [here](https://docs.victoriametrics.com/vmauth#dropping-request-path-prefix) for more details.
	// +optional
	DropSrcPathPrefixParts *int `json:"drop_src_path_prefix_parts,omitempty" yaml:"drop_src_path_prefix_parts,omitempty"`
}

URLMapCommon contains common fields for unauthorized user and user in vmuser

func (*URLMapCommon) DeepCopy

func (in *URLMapCommon) DeepCopy() *URLMapCommon

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

func (*URLMapCommon) DeepCopyInto

func (in *URLMapCommon) DeepCopyInto(out *URLMapCommon)

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

type UnauthorizedAccessConfigURLMap

type UnauthorizedAccessConfigURLMap struct {
	// SrcPaths is an optional list of regular expressions, which must match the request path.
	SrcPaths []string `json:"src_paths,omitempty" yaml:"src_paths,omitempty"`

	// SrcHosts is an optional list of regular expressions, which must match the request hostname.
	SrcHosts []string `json:"src_hosts,omitempty" yaml:"src_hosts,omitempty"`

	// UrlPrefix contains backend url prefixes for the proxied request url.
	// URLPrefix defines prefix prefix for destination
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	URLPrefix StringOrArray `json:"url_prefix,omitempty" yaml:"url_prefix,omitempty"`

	URLMapCommon `json:",omitempty" yaml:",inline"`
}

UnauthorizedAccessConfigURLMap defines element of url_map routing configuration For UnauthorizedAccessConfig and VMAuthUnauthorizedUserAccessSpec.URLMap

func (*UnauthorizedAccessConfigURLMap) DeepCopy

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

func (*UnauthorizedAccessConfigURLMap) DeepCopyInto

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

type UpdateStatus

type UpdateStatus string

UpdateStatus defines status for application

const (
	UpdateStatusExpanding   UpdateStatus = "expanding"
	UpdateStatusOperational UpdateStatus = "operational"
	UpdateStatusFailed      UpdateStatus = "failed"
	UpdateStatusPaused      UpdateStatus = "paused"
)

type VLogs

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

	Spec VLogsSpec `json:"spec,omitempty"`
	// ParsedLastAppliedSpec contains last-applied configuration spec
	ParsedLastAppliedSpec *VLogsSpec `json:"-" yaml:"-"`

	Status VLogsStatus `json:"status,omitempty"`
}

VLogs is fast, cost-effective and scalable logs database. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +operator-sdk:gen-csv:customresourcedefinitions.displayName="VLogs App" +operator-sdk:gen-csv:customresourcedefinitions.resources="Deployment,apps" +operator-sdk:gen-csv:customresourcedefinitions.resources="Service,v1" +operator-sdk:gen-csv:customresourcedefinitions.resources="Secret,v1" +genclient +k8s:openapi-gen=true +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=vlogs,scope=Namespaced +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.status",description="Current status of logs instance update process" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" VLogs is the Schema for the vlogs API

func (*VLogs) AllLabels

func (cr *VLogs) AllLabels() map[string]string

func (*VLogs) AnnotationsFiltered

func (cr *VLogs) AnnotationsFiltered() map[string]string

func (*VLogs) AsOwner

func (r *VLogs) AsOwner() []metav1.OwnerReference

AsOwner returns owner references with current object as owner

func (*VLogs) AsURL

func (cr *VLogs) AsURL() string

func (*VLogs) DeepCopy

func (in *VLogs) DeepCopy() *VLogs

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

func (*VLogs) DeepCopyInto

func (in *VLogs) DeepCopyInto(out *VLogs)

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

func (*VLogs) DeepCopyObject

func (in *VLogs) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VLogs) GetAdditionalService

func (cr *VLogs) GetAdditionalService() *AdditionalServiceSpec

GetAdditionalService returns AdditionalServiceSpec settings

func (*VLogs) GetExtraArgs

func (cr *VLogs) GetExtraArgs() map[string]string

GetExtraArgs returns additionally configured command-line arguments

func (*VLogs) GetMetricPath

func (cr *VLogs) GetMetricPath() string

GetMetricPath returns prefixed path for metric requests

func (*VLogs) GetNSName

func (cr *VLogs) GetNSName() string

func (*VLogs) GetServiceAccountName

func (cr *VLogs) GetServiceAccountName() string

func (*VLogs) GetServiceScrape

func (cr *VLogs) GetServiceScrape() *VMServiceScrapeSpec

GetServiceScrape returns overrides for serviceScrape builder

func (*VLogs) HasSpecChanges

func (cr *VLogs) HasSpecChanges() (bool, error)

HasSpecChanges compares vlogs spec with last applied vlogs spec stored in annotation

func (*VLogs) IsOwnsServiceAccount

func (cr *VLogs) IsOwnsServiceAccount() bool

func (*VLogs) LastAppliedSpecAsPatch

func (cr *VLogs) LastAppliedSpecAsPatch() (client.Patch, error)

LastAppliedSpecAsPatch return last applied vlogs spec as patch annotation

func (*VLogs) Paused

func (cr *VLogs) Paused() bool

func (*VLogs) PodAnnotations

func (r *VLogs) PodAnnotations() map[string]string

func (*VLogs) PodLabels

func (cr *VLogs) PodLabels() map[string]string

func (*VLogs) PrefixedName

func (cr *VLogs) PrefixedName() string

func (*VLogs) Probe

func (cr *VLogs) Probe() *EmbeddedProbes

func (*VLogs) ProbeNeedLiveness

func (cr *VLogs) ProbeNeedLiveness() bool

func (*VLogs) ProbePath

func (cr *VLogs) ProbePath() string

func (*VLogs) ProbePort

func (cr *VLogs) ProbePort() string

func (*VLogs) ProbeScheme

func (cr *VLogs) ProbeScheme() string

func (*VLogs) SelectorLabels

func (cr *VLogs) SelectorLabels() map[string]string

func (*VLogs) SetUpdateStatusTo

func (cr *VLogs) SetUpdateStatusTo(ctx context.Context, c client.Client, status UpdateStatus, maybeErr error) error

SetStatusTo changes update status with optional reason of fail

func (*VLogs) UnmarshalJSON

func (cr *VLogs) UnmarshalJSON(src []byte) error

UnmarshalJSON implements json.Unmarshaler interface

func (*VLogs) Validate added in v0.55.0

func (cr *VLogs) Validate() error

Validate checks if spec is correct

type VLogsList

type VLogsList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VLogs `json:"items"`
}

VLogsList contains a list of VLogs

func (*VLogsList) DeepCopy

func (in *VLogsList) DeepCopy() *VLogsList

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

func (*VLogsList) DeepCopyInto

func (in *VLogsList) DeepCopyInto(out *VLogsList)

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

func (*VLogsList) DeepCopyObject

func (in *VLogsList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VLogsSpec

type VLogsSpec struct {
	// ParsingError contents error with context if operator was failed to parse json object from kubernetes api server
	ParsingError string `json:"-" yaml:"-"`

	// PodMetadata configures Labels and Annotations which are propagated to the VLogs pods.
	// +optional
	PodMetadata *EmbeddedObjectMetadata `json:"podMetadata,omitempty"`
	// ManagedMetadata defines metadata that will be added to the all objects
	// created by operator for the given CustomResource
	ManagedMetadata *ManagedObjectsMetadata `json:"managedMetadata,omitempty"`

	CommonDefaultableParams           `json:",inline,omitempty"`
	CommonApplicationDeploymentParams `json:",inline,omitempty"`

	// LogLevel for VictoriaLogs to be configured with.
	// +optional
	// +kubebuilder:validation:Enum=INFO;WARN;ERROR;FATAL;PANIC
	LogLevel string `json:"logLevel,omitempty"`
	// LogFormat for VLogs to be configured with.
	// +optional
	// +kubebuilder:validation:Enum=default;json
	LogFormat string `json:"logFormat,omitempty"`
	// StorageDataPath disables spec.storage option and overrides arg for victoria-logs binary --storageDataPath,
	// its users responsibility to mount proper device into given path.
	// +optional
	StorageDataPath string `json:"storageDataPath,omitempty"`
	// Storage is the definition of how storage will be used by the VLogs
	// by default it`s empty dir
	// +optional
	Storage *v1.PersistentVolumeClaimSpec `json:"storage,omitempty"`
	// StorageMeta defines annotations and labels attached to PVC for given vlogs CR
	// +optional
	StorageMetadata EmbeddedObjectMetadata `json:"storageMetadata,omitempty"`
	// RemovePvcAfterDelete - if true, controller adds ownership to pvc
	// and after VLogs object deletion - pvc will be garbage collected
	// by controller manager
	// +optional
	RemovePvcAfterDelete bool `json:"removePvcAfterDelete,omitempty"`
	// RetentionPeriod for the stored logs
	RetentionPeriod string `json:"retentionPeriod"`
	// FutureRetention for the stored logs
	// Log entries with timestamps bigger than now+futureRetention are rejected during data ingestion; see https://docs.victoriametrics.com/victorialogs/#retention
	FutureRetention string `json:"futureRetention,omitempty"`
	// LogNewStreams Whether to log creation of new streams; this can be useful for debugging of high cardinality issues with log streams; see https://docs.victoriametrics.com/victorialogs/keyconcepts/#stream-fields
	LogNewStreams bool `json:"logNewStreams,omitempty"`
	// Whether to log all the ingested log entries; this can be useful for debugging of data ingestion; see https://docs.victoriametrics.com/victorialogs/data-ingestion/
	LogIngestedRows bool `json:"logIngestedRows,omitempty"`
	// ServiceSpec that will be added to vlogs service spec
	// +optional
	ServiceSpec *AdditionalServiceSpec `json:"serviceSpec,omitempty"`
	// ServiceScrapeSpec that will be added to vlogs VMServiceScrape spec
	// +optional
	ServiceScrapeSpec *VMServiceScrapeSpec `json:"serviceScrapeSpec,omitempty"`
	// LivenessProbe that will be added to VLogs pod
	*EmbeddedProbes `json:",inline"`

	// ServiceAccountName is the name of the ServiceAccount to use to run the pods
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty"`
}

VLogsSpec defines the desired state of VLogs +k8s:openapi-gen=true

func (*VLogsSpec) DeepCopy

func (in *VLogsSpec) DeepCopy() *VLogsSpec

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

func (*VLogsSpec) DeepCopyInto

func (in *VLogsSpec) DeepCopyInto(out *VLogsSpec)

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

func (*VLogsSpec) UnmarshalJSON

func (cr *VLogsSpec) UnmarshalJSON(src []byte) error

UnmarshalJSON implements json.Unmarshaler interface

type VLogsStatus

type VLogsStatus struct {
	StatusMetadata `json:",inline"`
}

VLogsStatus defines the observed state of VLogs

func (*VLogsStatus) DeepCopy

func (in *VLogsStatus) DeepCopy() *VLogsStatus

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

func (*VLogsStatus) DeepCopyInto

func (in *VLogsStatus) DeepCopyInto(out *VLogsStatus)

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

func (*VLogsStatus) GetStatusMetadata

func (cr *VLogsStatus) GetStatusMetadata() *StatusMetadata

GetStatusMetadata returns metadata for object status

type VMAgent

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

	Spec VMAgentSpec `json:"spec,omitempty"`
	// ParsedLastAppliedSpec contains last-applied configuration spec
	ParsedLastAppliedSpec *VMAgentSpec `json:"-" yaml:"-"`

	Status VMAgentStatus `json:"status,omitempty"`
}

VMAgent - is a tiny but brave agent, which helps you collect metrics from various sources and stores them in VictoriaMetrics or any other Prometheus-compatible storage system that supports the remote_write protocol. +operator-sdk:gen-csv:customresourcedefinitions.displayName="VMAgent App" +operator-sdk:gen-csv:customresourcedefinitions.resources="Deployment,apps" +operator-sdk:gen-csv:customresourcedefinitions.resources="Service,v1" +operator-sdk:gen-csv:customresourcedefinitions.resources="Secret,v1" +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +genclient +k8s:openapi-gen=true +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=vmagents,scope=Namespaced +kubebuilder:subresource:scale:specpath=.spec.shardCount,statuspath=.status.shards,selectorpath=.status.selector +kubebuilder:printcolumn:name="Shards Count",type="integer",JSONPath=".status.shards",description="current number of shards" +kubebuilder:printcolumn:name="Replica Count",type="integer",JSONPath=".status.replicas",description="current number of replicas" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.updateStatus",description="Current status of update rollout" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

func (*VMAgent) AllLabels

func (cr *VMAgent) AllLabels() map[string]string

func (*VMAgent) AnnotationsFiltered

func (cr *VMAgent) AnnotationsFiltered() map[string]string

func (*VMAgent) AsCRDOwner

func (*VMAgent) AsCRDOwner() []metav1.OwnerReference

AsCRDOwner implements interface

func (*VMAgent) AsOwner

func (cr *VMAgent) AsOwner() []metav1.OwnerReference

AsOwner returns owner references with current object as owner

func (*VMAgent) AsURL

func (cr *VMAgent) AsURL() string

AsURL - returns url for http access

func (*VMAgent) DeepCopy

func (in *VMAgent) DeepCopy() *VMAgent

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

func (*VMAgent) DeepCopyInto

func (in *VMAgent) DeepCopyInto(out *VMAgent)

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

func (*VMAgent) DeepCopyObject

func (in *VMAgent) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VMAgent) GetAdditionalService

func (cr *VMAgent) GetAdditionalService() *AdditionalServiceSpec

GetAdditionalService returns AdditionalServiceSpec settings

func (*VMAgent) GetClusterRoleName

func (cr *VMAgent) GetClusterRoleName() string

func (*VMAgent) GetExtraArgs

func (cr *VMAgent) GetExtraArgs() map[string]string

ExtraArgs returns additionally configured command-line arguments

func (*VMAgent) GetMetricPath

func (cr *VMAgent) GetMetricPath() string

GetMetricPath returns prefixed path for metric requests

func (*VMAgent) GetNSName

func (cr *VMAgent) GetNSName() string

GetNSName implements build.builderOpts interface

func (*VMAgent) GetServiceAccountName

func (cr *VMAgent) GetServiceAccountName() string

func (*VMAgent) GetServiceScrape

func (cr *VMAgent) GetServiceScrape() *VMServiceScrapeSpec

ServiceScrape returns overrides for serviceScrape builder

func (*VMAgent) HasAnyRelabellingConfigs

func (cr *VMAgent) HasAnyRelabellingConfigs() bool

HasAnyRelabellingConfigs checks if vmagent has any defined relabeling rules

func (*VMAgent) HasAnyStreamAggrRule

func (cr *VMAgent) HasAnyStreamAggrRule() bool

HasAnyStreamAggrRule checks if vmagent has any defined aggregation rules

func (*VMAgent) HasSpecChanges

func (cr *VMAgent) HasSpecChanges() (bool, error)

HasSpecChanges compares spec with last applied cluster spec stored in annotation

func (*VMAgent) HealthPath

func (cr *VMAgent) HealthPath() string

func (*VMAgent) IsNodeScrapeUnmanaged

func (cr *VMAgent) IsNodeScrapeUnmanaged() bool

IsNodeScrapeUnmanaged checks if vmagent should managed any VMNodeScrape objects

func (*VMAgent) IsOwnsServiceAccount

func (cr *VMAgent) IsOwnsServiceAccount() bool

func (*VMAgent) IsPodScrapeUnmanaged

func (cr *VMAgent) IsPodScrapeUnmanaged() bool

IsUnmanaged checks if vmagent should managed any VMPodScrape objects

func (*VMAgent) IsProbeUnmanaged

func (cr *VMAgent) IsProbeUnmanaged() bool

IsProbeUnmanaged checks if vmagent should managed any VMProbe objects

func (*VMAgent) IsScrapeConfigUnmanaged

func (cr *VMAgent) IsScrapeConfigUnmanaged() bool

IsScrapeConfigUnmanaged checks if vmagent should managed any VMScrapeConfig objects

func (*VMAgent) IsServiceScrapeUnmanaged

func (cr *VMAgent) IsServiceScrapeUnmanaged() bool

IsServiceScrapeUnmanaged checks if vmagent should managed any VMServiceScrape objects

func (*VMAgent) IsStaticScrapeUnmanaged

func (cr *VMAgent) IsStaticScrapeUnmanaged() bool

IsStaticScrapeUnmanaged checks if vmagent should managed any VMStaticScrape objects

func (*VMAgent) IsUnmanaged

func (cr *VMAgent) IsUnmanaged() bool

IsUnmanaged checks if object should managed any config objects

func (*VMAgent) LastAppliedSpecAsPatch

func (cr *VMAgent) LastAppliedSpecAsPatch() (client.Patch, error)

LastAppliedSpecAsPatch return last applied cluster spec as patch annotation

func (*VMAgent) Paused

func (cr *VMAgent) Paused() bool

func (*VMAgent) PodAnnotations

func (cr *VMAgent) PodAnnotations() map[string]string

func (*VMAgent) PodLabels

func (cr *VMAgent) PodLabels() map[string]string

func (*VMAgent) PrefixedName

func (cr *VMAgent) PrefixedName() string

func (*VMAgent) Probe

func (cr *VMAgent) Probe() *EmbeddedProbes

func (*VMAgent) ProbeNeedLiveness

func (*VMAgent) ProbeNeedLiveness() bool

func (*VMAgent) ProbePath

func (cr *VMAgent) ProbePath() string

func (*VMAgent) ProbePort

func (cr *VMAgent) ProbePort() string

func (*VMAgent) ProbeScheme

func (cr *VMAgent) ProbeScheme() string

func (*VMAgent) RelabelingAssetName

func (cr *VMAgent) RelabelingAssetName() string

func (*VMAgent) SelectorLabels

func (cr *VMAgent) SelectorLabels() map[string]string

func (*VMAgent) SetUpdateStatusTo

func (cr *VMAgent) SetUpdateStatusTo(ctx context.Context, c client.Client, status UpdateStatus, maybeErr error) error

SetStatusTo changes update status with optional reason of fail

func (*VMAgent) StreamAggrConfigName

func (cr *VMAgent) StreamAggrConfigName() string

func (*VMAgent) TLSAssetName

func (cr *VMAgent) TLSAssetName() string

func (*VMAgent) UnmarshalJSON

func (cr *VMAgent) UnmarshalJSON(src []byte) error

UnmarshalJSON implements json.Unmarshaler interface

func (*VMAgent) Validate added in v0.55.0

func (cr *VMAgent) Validate() error

type VMAgentList

type VMAgentList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VMAgent `json:"items"`
}

VMAgentList contains a list of VMAgent +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*VMAgentList) DeepCopy

func (in *VMAgentList) DeepCopy() *VMAgentList

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

func (*VMAgentList) DeepCopyInto

func (in *VMAgentList) DeepCopyInto(out *VMAgentList)

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

func (*VMAgentList) DeepCopyObject

func (in *VMAgentList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VMAgentRemoteWriteSettings

type VMAgentRemoteWriteSettings struct {
	// The maximum size in bytes of unpacked request to send to remote storage
	// +optional
	MaxBlockSize *int32 `json:"maxBlockSize,omitempty"`

	// The maximum file-based buffer size in bytes at -remoteWrite.tmpDataPath
	// +optional
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	MaxDiskUsagePerURL *BytesString `json:"maxDiskUsagePerURL,omitempty"`
	// The number of concurrent queues
	// +optional
	Queues *int32 `json:"queues,omitempty"`
	// Whether to show -remoteWrite.url in the exported metrics. It is hidden by default, since it can contain sensitive auth info
	// +optional
	ShowURL *bool `json:"showURL,omitempty"`
	// Path to directory where temporary data for remote write component is stored (default vmagent-remotewrite-data)
	// +optional
	TmpDataPath *string `json:"tmpDataPath,omitempty"`
	// Interval for flushing the data to remote storage. (default 1s)
	// +optional
	// +kubebuilder:validation:Pattern:="[0-9]+(ms|s|m|h)"
	FlushInterval *string `json:"flushInterval,omitempty"`
	// Labels in the form 'name=value' to add to all the metrics before sending them. This overrides the label if it already exists.
	// +optional
	Labels map[string]string `json:"label,omitempty"`
	// Configures vmagent accepting data via the same multitenant endpoints as vminsert at VictoriaMetrics cluster does,
	// see [here](https://docs.victoriametrics.com/vmagent/#multitenancy).
	// it's global setting and affects all remote storage configurations
	// +optional
	UseMultiTenantMode bool `json:"useMultiTenantMode,omitempty"`
}

VMAgentRemoteWriteSettings - defines global settings for all remoteWrite urls.

func (*VMAgentRemoteWriteSettings) DeepCopy

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

func (*VMAgentRemoteWriteSettings) DeepCopyInto

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

type VMAgentRemoteWriteSpec

type VMAgentRemoteWriteSpec struct {
	// URL of the endpoint to send samples to.
	URL string `json:"url"`
	// BasicAuth allow an endpoint to authenticate over basic authentication
	// +optional
	BasicAuth *BasicAuth `json:"basicAuth,omitempty"`
	// Optional bearer auth token to use for -remoteWrite.url
	// +optional
	BearerTokenSecret *v1.SecretKeySelector `json:"bearerTokenSecret,omitempty"`

	// ConfigMap with relabeling config which is applied to metrics before sending them to the corresponding -remoteWrite.url
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Key at Configmap with relabelConfig for remoteWrite",xDescriptors="urn:alm:descriptor:io.kubernetes:ConfigMapKeySelector"
	UrlRelabelConfig *v1.ConfigMapKeySelector `json:"urlRelabelConfig,omitempty"`
	// InlineUrlRelabelConfig defines relabeling config for remoteWriteURL, it can be defined at crd spec.
	// +optional
	InlineUrlRelabelConfig []RelabelConfig `json:"inlineUrlRelabelConfig,omitempty"`
	// OAuth2 defines auth configuration
	// +optional
	OAuth2 *OAuth2 `json:"oauth2,omitempty"`
	// TLSConfig describes tls configuration for remote write target
	// +optional
	TLSConfig *TLSConfig `json:"tlsConfig,omitempty"`
	// Timeout for sending a single block of data to -remoteWrite.url (default 1m0s)
	// +optional
	// +kubebuilder:validation:Pattern:="[0-9]+(ms|s|m|h)"
	SendTimeout *string `json:"sendTimeout,omitempty"`
	// Headers allow configuring custom http headers
	// Must be in form of semicolon separated header with value
	// e.g.
	// headerName: headerValue
	// vmagent supports since 1.79.0 version
	// +optional
	Headers []string `json:"headers,omitempty"`
	// StreamAggrConfig defines stream aggregation configuration for VMAgent for -remoteWrite.url
	// +optional
	StreamAggrConfig *StreamAggrConfig `json:"streamAggrConfig,omitempty"`
	// MaxDiskUsage defines the maximum file-based buffer size in bytes for the given remoteWrite
	// It overrides global configuration defined at remoteWriteSettings.maxDiskUsagePerURL
	// +optional
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	MaxDiskUsage *BytesString `json:"maxDiskUsage,omitempty"`
	// ForceVMProto forces using VictoriaMetrics protocol for sending data to -remoteWrite.url
	// +optional
	ForceVMProto bool `json:"forceVMProto,omitempty"`
}

VMAgentRemoteWriteSpec defines the remote storage configuration for VmAgent +k8s:openapi-gen=true

func (*VMAgentRemoteWriteSpec) AsConfigMapKey

func (*VMAgentRemoteWriteSpec) AsConfigMapKey(idx int, suffix string) string

AsConfigMapKey key for kubernetes configmap

func (*VMAgentRemoteWriteSpec) AsMapKey

func (rw *VMAgentRemoteWriteSpec) AsMapKey() string

AsMapKey key for internal cache map

func (*VMAgentRemoteWriteSpec) AsSecretKey

func (*VMAgentRemoteWriteSpec) AsSecretKey(idx int, suffix string) string

AsSecretKey key for kubernetes secret data

func (*VMAgentRemoteWriteSpec) DeepCopy

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

func (*VMAgentRemoteWriteSpec) DeepCopyInto

func (in *VMAgentRemoteWriteSpec) DeepCopyInto(out *VMAgentRemoteWriteSpec)

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

type VMAgentSecurityEnforcements

type VMAgentSecurityEnforcements struct {
	// OverrideHonorLabels if set to true overrides all user configured honor_labels.
	// If HonorLabels is set in scrape objects  to true, this overrides honor_labels to false.
	// +optional
	OverrideHonorLabels bool `json:"overrideHonorLabels,omitempty"`
	// OverrideHonorTimestamps allows to globally enforce honoring timestamps in all scrape configs.
	// +optional
	OverrideHonorTimestamps bool `json:"overrideHonorTimestamps,omitempty"`
	// IgnoreNamespaceSelectors if set to true will ignore NamespaceSelector settings from
	// scrape objects, and they will only discover endpoints
	// within their current namespace.  Defaults to false.
	// +optional
	IgnoreNamespaceSelectors bool `json:"ignoreNamespaceSelectors,omitempty"`
	// EnforcedNamespaceLabel enforces adding a namespace label of origin for each alert
	// and metric that is user created. The label value will always be the namespace of the object that is
	// being created.
	// +optional
	EnforcedNamespaceLabel string `json:"enforcedNamespaceLabel,omitempty"`
	// ArbitraryFSAccessThroughSMs configures whether configuration
	// based on EndpointAuth can access arbitrary files on the file system
	// of the VMAgent container e.g. bearer token files, basic auth, tls certs
	// +optional
	ArbitraryFSAccessThroughSMs ArbitraryFSAccessThroughSMsConfig `json:"arbitraryFSAccessThroughSMs,omitempty"`
}

VMAgentSecurityEnforcements defines security configuration for endpoint scrapping

func (*VMAgentSecurityEnforcements) DeepCopy

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

func (*VMAgentSecurityEnforcements) DeepCopyInto

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

type VMAgentSpec

type VMAgentSpec struct {
	// ParsingError contents error with context if operator was failed to parse json object from kubernetes api server
	ParsingError string `json:"-" yaml:"-"`
	// PodMetadata configures Labels and Annotations which are propagated to the vmagent pods.
	// +optional
	PodMetadata *EmbeddedObjectMetadata `json:"podMetadata,omitempty"`
	// ManagedMetadata defines metadata that will be added to the all objects
	// created by operator for the given CustomResource
	ManagedMetadata *ManagedObjectsMetadata `json:"managedMetadata,omitempty"`
	// LogLevel for VMAgent to be configured with.
	// INFO, WARN, ERROR, FATAL, PANIC
	// +optional
	// +kubebuilder:validation:Enum=INFO;WARN;ERROR;FATAL;PANIC
	LogLevel string `json:"logLevel,omitempty"`
	// LogFormat for VMAgent to be configured with.
	// +optional
	// +kubebuilder:validation:Enum=default;json
	LogFormat string `json:"logFormat,omitempty"`

	// ScrapeInterval defines how often scrape targets by default
	// +optional
	// +kubebuilder:validation:Pattern:="[0-9]+(ms|s|m|h)"
	ScrapeInterval string `json:"scrapeInterval,omitempty"`
	// ScrapeTimeout defines global timeout for targets scrape
	// +optional
	// +kubebuilder:validation:Pattern:="[0-9]+(ms|s|m|h)"
	ScrapeTimeout string `json:"scrapeTimeout,omitempty"`

	// APIServerConfig allows specifying a host and auth methods to access apiserver.
	// If left empty, VMAgent is assumed to run inside of the cluster
	// and will discover API servers automatically and use the pod's CA certificate
	// and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount/.
	// aPIServerConfig is deprecated use apiServerConfig instead
	// +deprecated
	// +optional
	APIServerConfigDeprecated *APIServerConfig `json:"aPIServerConfig,omitempty"`
	// APIServerConfig allows specifying a host and auth methods to access apiserver.
	// If left empty, VMAgent is assumed to run inside of the cluster
	// and will discover API servers automatically and use the pod's CA certificate
	// and bearer token file at /var/run/secrets/kubernetes.io/serviceaccount/.
	// +optional
	APIServerConfig *APIServerConfig `json:"apiServerConfig,omitempty"`

	// VMAgentExternalLabelName Name of vmAgent external label used to denote vmAgent instance
	// name. Defaults to the value of `prometheus`. External label will
	// _not_ be added when value is set to empty string (`""`).
	// +optional
	VMAgentExternalLabelName *string `json:"vmAgentExternalLabelName,omitempty"`

	// ExternalLabels The labels to add to any time series scraped by vmagent.
	// it doesn't affect metrics ingested directly by push API's
	// +optional
	ExternalLabels map[string]string `json:"externalLabels,omitempty"`
	// RemoteWrite list of victoria metrics /some other remote write system
	// for vm it must looks like: http://victoria-metrics-single:8429/api/v1/write
	// or for cluster different url
	// https://github.com/VictoriaMetrics/VictoriaMetrics/tree/master/app/vmagent#splitting-data-streams-among-multiple-systems
	RemoteWrite []VMAgentRemoteWriteSpec `json:"remoteWrite"`
	// RemoteWriteSettings defines global settings for all remoteWrite urls.
	// +optional
	RemoteWriteSettings *VMAgentRemoteWriteSettings `json:"remoteWriteSettings,omitempty"`
	// RelabelConfig ConfigMap with global relabel config -remoteWrite.relabelConfig
	// This relabeling is applied to all the collected metrics before sending them to remote storage.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Key at Configmap with relabelConfig name",xDescriptors="urn:alm:descriptor:io.kubernetes:ConfigMapKeySelector"
	RelabelConfig *v1.ConfigMapKeySelector `json:"relabelConfig,omitempty"`
	// InlineRelabelConfig - defines GlobalRelabelConfig for vmagent, can be defined directly at CRD.
	// +optional
	InlineRelabelConfig []RelabelConfig `json:"inlineRelabelConfig,omitempty"`
	// StreamAggrConfig defines global stream aggregation configuration for VMAgent
	// +optional
	StreamAggrConfig *StreamAggrConfig `json:"streamAggrConfig,omitempty"`
	// SelectAllByDefault changes default behavior for empty CRD selectors, such ServiceScrapeSelector.
	// with selectAllByDefault: true and empty serviceScrapeSelector and ServiceScrapeNamespaceSelector
	// Operator selects all exist serviceScrapes
	// with selectAllByDefault: false - selects nothing
	// +optional
	SelectAllByDefault bool `json:"selectAllByDefault,omitempty"`
	// ServiceScrapeSelector defines ServiceScrapes to be selected for target discovery.
	// Works in combination with NamespaceSelector.
	// NamespaceSelector nil - only objects at VMAgent namespace.
	// Selector nil - only objects at NamespaceSelector namespaces.
	// If both nil - behaviour controlled by selectAllByDefault
	// +optional
	ServiceScrapeSelector *metav1.LabelSelector `json:"serviceScrapeSelector,omitempty"`
	// ServiceScrapeNamespaceSelector Namespaces to be selected for VMServiceScrape discovery.
	// Works in combination with Selector.
	// NamespaceSelector nil - only objects at VMAgent namespace.
	// Selector nil - only objects at NamespaceSelector namespaces.
	// If both nil - behaviour controlled by selectAllByDefault
	// +optional
	ServiceScrapeNamespaceSelector *metav1.LabelSelector `json:"serviceScrapeNamespaceSelector,omitempty"`
	// PodScrapeSelector defines PodScrapes to be selected for target discovery.
	// Works in combination with NamespaceSelector.
	// NamespaceSelector nil - only objects at VMAgent namespace.
	// Selector nil - only objects at NamespaceSelector namespaces.
	// If both nil - behaviour controlled by selectAllByDefault
	// +optional
	PodScrapeSelector *metav1.LabelSelector `json:"podScrapeSelector,omitempty"`
	// PodScrapeNamespaceSelector defines Namespaces to be selected for VMPodScrape discovery.
	// Works in combination with Selector.
	// NamespaceSelector nil - only objects at VMAgent namespace.
	// Selector nil - only objects at NamespaceSelector namespaces.
	// If both nil - behaviour controlled by selectAllByDefault
	// +optional
	PodScrapeNamespaceSelector *metav1.LabelSelector `json:"podScrapeNamespaceSelector,omitempty"`
	// ProbeSelector defines VMProbe to be selected for target probing.
	// Works in combination with NamespaceSelector.
	// NamespaceSelector nil - only objects at VMAgent namespace.
	// Selector nil - only objects at NamespaceSelector namespaces.
	// If both nil - behaviour controlled by selectAllByDefault
	// +optional
	ProbeSelector *metav1.LabelSelector `json:"probeSelector,omitempty"`
	// ProbeNamespaceSelector defines Namespaces to be selected for VMProbe discovery.
	// Works in combination with Selector.
	// NamespaceSelector nil - only objects at VMAgent namespace.
	// Selector nil - only objects at NamespaceSelector namespaces.
	// If both nil - behaviour controlled by selectAllByDefault
	// +optional
	ProbeNamespaceSelector *metav1.LabelSelector `json:"probeNamespaceSelector,omitempty"`
	// NodeScrapeSelector defines VMNodeScrape to be selected for scraping.
	// Works in combination with NamespaceSelector.
	// NamespaceSelector nil - only objects at VMAgent namespace.
	// Selector nil - only objects at NamespaceSelector namespaces.
	// If both nil - behaviour controlled by selectAllByDefault
	// +optional
	NodeScrapeSelector *metav1.LabelSelector `json:"nodeScrapeSelector,omitempty"`
	// NodeScrapeNamespaceSelector defines Namespaces to be selected for VMNodeScrape discovery.
	// Works in combination with Selector.
	// NamespaceSelector nil - only objects at VMAgent namespace.
	// Selector nil - only objects at NamespaceSelector namespaces.
	// If both nil - behaviour controlled by selectAllByDefault
	// +optional
	NodeScrapeNamespaceSelector *metav1.LabelSelector `json:"nodeScrapeNamespaceSelector,omitempty"`
	// StaticScrapeSelector defines VMStaticScrape to be selected for target discovery.
	// Works in combination with NamespaceSelector.
	// If both nil - match everything.
	// NamespaceSelector nil - only objects at VMAgent namespace.
	// Selector nil - only objects at NamespaceSelector namespaces.
	// +optional
	StaticScrapeSelector *metav1.LabelSelector `json:"staticScrapeSelector,omitempty"`
	// StaticScrapeNamespaceSelector defines Namespaces to be selected for VMStaticScrape discovery.
	// Works in combination with NamespaceSelector.
	// NamespaceSelector nil - only objects at VMAgent namespace.
	// Selector nil - only objects at NamespaceSelector namespaces.
	// If both nil - behaviour controlled by selectAllByDefault
	// +optional
	StaticScrapeNamespaceSelector *metav1.LabelSelector `json:"staticScrapeNamespaceSelector,omitempty"`
	// ScrapeConfigSelector defines VMScrapeConfig to be selected for target discovery.
	// Works in combination with NamespaceSelector.
	// +optional
	ScrapeConfigSelector *metav1.LabelSelector `json:"scrapeConfigSelector,omitempty"`
	// ScrapeConfigNamespaceSelector defines Namespaces to be selected for VMScrapeConfig discovery.
	// Works in combination with Selector.
	// NamespaceSelector nil - only objects at VMAgent namespace.
	// Selector nil - only objects at NamespaceSelector namespaces.
	// If both nil - behaviour controlled by selectAllByDefault
	// +optional
	ScrapeConfigNamespaceSelector *metav1.LabelSelector `json:"scrapeConfigNamespaceSelector,omitempty"`
	// InlineScrapeConfig As scrape configs are appended, the user is responsible to make sure it
	// is valid. Note that using this feature may expose the possibility to
	// break upgrades of VMAgent. It is advised to review VMAgent release
	// notes to ensure that no incompatible scrape configs are going to break
	// VMAgent after the upgrade.
	// it should be defined as single yaml file.
	// inlineScrapeConfig: |
	//     - job_name: "prometheus"
	//       static_configs:
	//       - targets: ["localhost:9090"]
	// +optional
	InlineScrapeConfig string `json:"inlineScrapeConfig,omitempty"`
	// AdditionalScrapeConfigs As scrape configs are appended, the user is responsible to make sure it
	// is valid. Note that using this feature may expose the possibility to
	// break upgrades of VMAgent. It is advised to review VMAgent release
	// notes to ensure that no incompatible scrape configs are going to break
	// VMAgent after the upgrade.
	// +optional
	AdditionalScrapeConfigs *v1.SecretKeySelector `json:"additionalScrapeConfigs,omitempty"`
	// InsertPorts - additional listen ports for data ingestion.
	InsertPorts *InsertPorts `json:"insertPorts,omitempty"`

	// ServiceSpec that will be added to vmagent service spec
	// +optional
	ServiceSpec *AdditionalServiceSpec `json:"serviceSpec,omitempty"`
	// ServiceScrapeSpec that will be added to vmagent VMServiceScrape spec
	// +optional
	ServiceScrapeSpec *VMServiceScrapeSpec `json:"serviceScrapeSpec,omitempty"`

	// ShardCount - numbers of shards of VMAgent
	// in this case operator will use 1 deployment/sts per shard with
	// replicas count according to spec.replicas,
	// see [here](https://docs.victoriametrics.com/vmagent/#scraping-big-number-of-targets)
	// +optional
	ShardCount *int `json:"shardCount,omitempty"`

	// UpdateStrategy - overrides default update strategy.
	// works only for deployments, statefulset always use OnDelete.
	// +kubebuilder:validation:Enum=Recreate;RollingUpdate
	// +optional
	UpdateStrategy *appsv1.DeploymentStrategyType `json:"updateStrategy,omitempty"`
	// RollingUpdate - overrides deployment update params.
	// +optional
	RollingUpdate *appsv1.RollingUpdateDeployment `json:"rollingUpdate,omitempty"`
	// PodDisruptionBudget created by operator
	// +optional
	PodDisruptionBudget *EmbeddedPodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"`
	*EmbeddedProbes     `json:",inline"`
	// ServiceScrapeRelabelTemplate defines relabel config, that will be added to each VMServiceScrape.
	// it's useful for adding specific labels to all targets
	// +optional
	ServiceScrapeRelabelTemplate []*RelabelConfig `json:"serviceScrapeRelabelTemplate,omitempty"`
	// PodScrapeRelabelTemplate defines relabel config, that will be added to each VMPodScrape.
	// it's useful for adding specific labels to all targets
	// +optional
	PodScrapeRelabelTemplate []*RelabelConfig `json:"podScrapeRelabelTemplate,omitempty"`
	// NodeScrapeRelabelTemplate defines relabel config, that will be added to each VMNodeScrape.
	// it's useful for adding specific labels to all targets
	// +optional
	NodeScrapeRelabelTemplate []*RelabelConfig `json:"nodeScrapeRelabelTemplate,omitempty"`
	// StaticScrapeRelabelTemplate defines relabel config, that will be added to each VMStaticScrape.
	// it's useful for adding specific labels to all targets
	// +optional
	StaticScrapeRelabelTemplate []*RelabelConfig `json:"staticScrapeRelabelTemplate,omitempty"`
	// ProbeScrapeRelabelTemplate defines relabel config, that will be added to each VMProbeScrape.
	// it's useful for adding specific labels to all targets
	// +optional
	ProbeScrapeRelabelTemplate []*RelabelConfig `json:"probeScrapeRelabelTemplate,omitempty"`
	// ScrapeConfigRelabelTemplate defines relabel config, that will be added to each VMScrapeConfig.
	// it's useful for adding specific labels to all targets
	// +optional
	ScrapeConfigRelabelTemplate []*RelabelConfig `json:"scrapeConfigRelabelTemplate,omitempty"`
	// MinScrapeInterval allows limiting minimal scrape interval for VMServiceScrape, VMPodScrape and other scrapes
	// If interval is lower than defined limit, `minScrapeInterval` will be used.
	MinScrapeInterval *string `json:"minScrapeInterval,omitempty"`
	// MaxScrapeInterval allows limiting maximum scrape interval for VMServiceScrape, VMPodScrape and other scrapes
	// If interval is higher than defined limit, `maxScrapeInterval` will be used.
	MaxScrapeInterval *string `json:"maxScrapeInterval,omitempty"`
	// DaemonSetMode enables DaemonSet deployment mode instead of Deployment.
	// Supports only VMPodScrape
	// (available from v0.55.0).
	// Cannot be used with statefulMode
	// +optional
	DaemonSetMode bool `json:"daemonSetMode,omitempty"`
	// StatefulMode enables StatefulSet for `VMAgent` instead of Deployment
	// it allows using persistent storage for vmagent's persistentQueue
	// +optional
	StatefulMode bool `json:"statefulMode,omitempty"`
	// StatefulStorage configures storage for StatefulSet
	// +optional
	StatefulStorage *StorageSpec `json:"statefulStorage,omitempty"`
	// StatefulRollingUpdateStrategy allows configuration for strategyType
	// set it to RollingUpdate for disabling operator statefulSet rollingUpdate
	// +optional
	StatefulRollingUpdateStrategy appsv1.StatefulSetUpdateStrategyType `json:"statefulRollingUpdateStrategy,omitempty"`

	// ClaimTemplates allows adding additional VolumeClaimTemplates for VMAgent in StatefulMode
	ClaimTemplates []v1.PersistentVolumeClaim `json:"claimTemplates,omitempty"`
	// IngestOnlyMode switches vmagent into unmanaged mode
	// it disables any config generation for scraping
	// Currently it prevents vmagent from managing tls and auth options for remote write
	// +optional
	IngestOnlyMode bool `json:"ingestOnlyMode,omitempty"`

	// License allows to configure license key to be used for enterprise features.
	// Using license key is supported starting from VictoriaMetrics v1.94.0.
	// See [here](https://docs.victoriametrics.com/enterprise)
	// +optional
	License *License `json:"license,omitempty"`

	// ServiceAccountName is the name of the ServiceAccount to use to run the pods
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty"`

	// EnableKubernetesAPISelectors instructs vmagent to use CRD scrape objects spec.selectors for
	// Kubernetes API list and watch requests.
	// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#list-and-watch-filtering
	// It could be useful to reduce Kubernetes API server resource usage for serving less than 100 CRD scrape objects in total.
	// +optional
	EnableKubernetesAPISelectors bool `json:"enableKubernetesAPISelectors,omitempty"`

	VMAgentSecurityEnforcements       `json:",inline"`
	CommonDefaultableParams           `json:",inline,omitempty"`
	CommonConfigReloaderParams        `json:",inline,omitempty"`
	CommonApplicationDeploymentParams `json:",inline,omitempty"`
}

VMAgentSpec defines the desired state of VMAgent +k8s:openapi-gen=true

func (*VMAgentSpec) DeepCopy

func (in *VMAgentSpec) DeepCopy() *VMAgentSpec

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

func (*VMAgentSpec) DeepCopyInto

func (in *VMAgentSpec) DeepCopyInto(out *VMAgentSpec)

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

func (*VMAgentSpec) UnmarshalJSON

func (cr *VMAgentSpec) UnmarshalJSON(src []byte) error

UnmarshalJSON implements json.Unmarshaler interface

type VMAgentStatus

type VMAgentStatus struct {
	// Shards represents total number of vmagent deployments with uniq scrape targets
	Shards int32 `json:"shards,omitempty"`
	// Selector string form of label value set for autoscaling
	Selector string `json:"selector,omitempty"`
	// ReplicaCount Total number of pods targeted by this VMAgent
	Replicas       int32 `json:"replicas,omitempty"`
	StatusMetadata `json:",inline"`
}

VMAgentStatus defines the observed state of VMAgent +k8s:openapi-gen=true

func (*VMAgentStatus) DeepCopy

func (in *VMAgentStatus) DeepCopy() *VMAgentStatus

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

func (*VMAgentStatus) DeepCopyInto

func (in *VMAgentStatus) DeepCopyInto(out *VMAgentStatus)

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

func (*VMAgentStatus) GetStatusMetadata

func (cr *VMAgentStatus) GetStatusMetadata() *StatusMetadata

GetStatusMetadata returns metadata for object status

type VMAlert

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

	Spec VMAlertSpec `json:"spec,omitempty"`
	// ParsedLastAppliedSpec contains last-applied configuration spec
	ParsedLastAppliedSpec *VMAlertSpec `json:"-" yaml:"-"`

	Status VMAlertStatus `json:"status,omitempty"`
}

VMAlert executes a list of given alerting or recording rules against configured address. +operator-sdk:gen-csv:customresourcedefinitions.displayName="VMAlert App" +operator-sdk:gen-csv:customresourcedefinitions.resources="Deployment,v1" +operator-sdk:gen-csv:customresourcedefinitions.resources="Service,v1" +operator-sdk:gen-csv:customresourcedefinitions.resources="Secret,v1" +genclient +k8s:openapi-gen=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=vmalerts,scope=Namespaced +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.updateStatus",description="Current status of update rollout" +kubebuilder:printcolumn:name="ReplicaCount",type="integer",JSONPath=".spec.replicaCount",description="The desired replicas number of Alertmanagers" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

func (*VMAlert) AllLabels

func (cr *VMAlert) AllLabels() map[string]string

func (*VMAlert) AnnotationsFiltered

func (cr *VMAlert) AnnotationsFiltered() map[string]string

func (*VMAlert) AsCRDOwner

func (*VMAlert) AsCRDOwner() []metav1.OwnerReference

AsCRDOwner implements interface

func (*VMAlert) AsOwner

func (cr *VMAlert) AsOwner() []metav1.OwnerReference

AsOwner returns owner references with current object as owner

func (*VMAlert) AsURL

func (cr *VMAlert) AsURL() string

func (*VMAlert) DeepCopy

func (in *VMAlert) DeepCopy() *VMAlert

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

func (*VMAlert) DeepCopyInto

func (in *VMAlert) DeepCopyInto(out *VMAlert)

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

func (*VMAlert) DeepCopyObject

func (in *VMAlert) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VMAlert) GetAdditionalService

func (cr *VMAlert) GetAdditionalService() *AdditionalServiceSpec

GetAdditionalService returns AdditionalServiceSpec settings

func (*VMAlert) GetExtraArgs

func (cr *VMAlert) GetExtraArgs() map[string]string

GetExtraArgs returns additionally configured command-line arguments

func (*VMAlert) GetMetricPath

func (cr *VMAlert) GetMetricPath() string

GetMetricPath returns prefixed path for metric requests

func (*VMAlert) GetNSName

func (cr *VMAlert) GetNSName() string

GetNSName implements build.builderOpts interface

func (*VMAlert) GetNotifierSelectors

func (cr *VMAlert) GetNotifierSelectors() []*DiscoverySelector

func (*VMAlert) GetServiceAccountName

func (cr *VMAlert) GetServiceAccountName() string

func (*VMAlert) GetServiceScrape

func (cr *VMAlert) GetServiceScrape() *VMServiceScrapeSpec

GetServiceScrape returns overrides for serviceScrape builder

func (*VMAlert) HasSpecChanges

func (cr *VMAlert) HasSpecChanges() (bool, error)

HasSpecChanges compares spec with last applied cluster spec stored in annotation

func (*VMAlert) IsOwnsServiceAccount

func (cr *VMAlert) IsOwnsServiceAccount() bool

func (*VMAlert) IsUnmanaged

func (cr *VMAlert) IsUnmanaged() bool

IsUnmanaged checks if object should managed any config objects

func (*VMAlert) LastAppliedSpecAsPatch

func (cr *VMAlert) LastAppliedSpecAsPatch() (client.Patch, error)

LastAppliedSpecAsPatch return last applied cluster spec as patch annotation

func (*VMAlert) NeedDedupRules

func (cr *VMAlert) NeedDedupRules() bool

func (*VMAlert) NotifierAsMapKey

func (cr *VMAlert) NotifierAsMapKey(i int) string

NotifierAsMapKey - returns cr name with suffix for notifier token/auth maps.

func (*VMAlert) Paused

func (cr *VMAlert) Paused() bool

func (*VMAlert) PodAnnotations

func (cr *VMAlert) PodAnnotations() map[string]string

func (*VMAlert) PodLabels

func (cr *VMAlert) PodLabels() map[string]string

func (*VMAlert) PrefixedName

func (cr *VMAlert) PrefixedName() string

func (*VMAlert) Probe

func (cr *VMAlert) Probe() *EmbeddedProbes

func (*VMAlert) ProbeNeedLiveness

func (*VMAlert) ProbeNeedLiveness() bool

func (*VMAlert) ProbePath

func (cr *VMAlert) ProbePath() string

func (*VMAlert) ProbePort

func (cr *VMAlert) ProbePort() string

func (*VMAlert) ProbeScheme

func (cr *VMAlert) ProbeScheme() string

func (*VMAlert) RulesConfigMapSelector

func (cr *VMAlert) RulesConfigMapSelector() client.ListOption

func (*VMAlert) SelectorLabels

func (cr *VMAlert) SelectorLabels() map[string]string

func (*VMAlert) SetUpdateStatusTo

func (cr *VMAlert) SetUpdateStatusTo(ctx context.Context, c client.Client, status UpdateStatus, maybeErr error) error

SetStatusTo changes update status with optional reason of fail

func (*VMAlert) TLSAssetName

func (cr *VMAlert) TLSAssetName() string

func (*VMAlert) UnmarshalJSON

func (cr *VMAlert) UnmarshalJSON(src []byte) error

UnmarshalJSON implements json.Unmarshaler interface

func (*VMAlert) Validate added in v0.55.0

func (cr *VMAlert) Validate() error

Validate checks VMAlert spec

type VMAlertDatasourceSpec

type VMAlertDatasourceSpec struct {
	// Victoria Metrics or VMSelect url. Required parameter. E.g. http://127.0.0.1:8428
	URL string `json:"url"`
	// HTTPAuth generic auth methods
	HTTPAuth `json:",inline,omitempty"`
}

VMAlertDatasourceSpec defines the remote storage configuration for VmAlert to read alerts from +k8s:openapi-gen=true

func (*VMAlertDatasourceSpec) DeepCopy

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

func (*VMAlertDatasourceSpec) DeepCopyInto

func (in *VMAlertDatasourceSpec) DeepCopyInto(out *VMAlertDatasourceSpec)

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

type VMAlertList

type VMAlertList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VMAlert `json:"items"`
}

VMAlertList contains a list of VMAlert

func (*VMAlertList) DeepCopy

func (in *VMAlertList) DeepCopy() *VMAlertList

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

func (*VMAlertList) DeepCopyInto

func (in *VMAlertList) DeepCopyInto(out *VMAlertList)

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

func (*VMAlertList) DeepCopyObject

func (in *VMAlertList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VMAlertNotifierSpec

type VMAlertNotifierSpec struct {
	// AlertManager url.  E.g. http://127.0.0.1:9093
	// +optional
	URL string `json:"url,omitempty"`
	// Selector allows service discovery for alertmanager
	// in this case all matched vmalertmanager replicas will be added into vmalert notifier.url
	// as statefulset pod.fqdn
	// +optional
	Selector *DiscoverySelector `json:"selector,omitempty"`

	HTTPAuth `json:",inline,omitempty"`
}

VMAlertNotifierSpec defines the notifier url for sending information about alerts +k8s:openapi-gen=true

func (*VMAlertNotifierSpec) DeepCopy

func (in *VMAlertNotifierSpec) DeepCopy() *VMAlertNotifierSpec

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

func (*VMAlertNotifierSpec) DeepCopyInto

func (in *VMAlertNotifierSpec) DeepCopyInto(out *VMAlertNotifierSpec)

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

type VMAlertRemoteReadSpec

type VMAlertRemoteReadSpec struct {
	// URL of the endpoint to send samples to.
	URL string `json:"url"`
	// Lookback defines how far to look into past for alerts timeseries. For example, if lookback=1h then range from now() to now()-1h will be scanned. (default 1h0m0s)
	// Applied only to RemoteReadSpec
	// +optional
	Lookback *string `json:"lookback,omitempty"`

	HTTPAuth `json:",inline,omitempty"`
}

VMAlertRemoteReadSpec defines the remote storage configuration for VmAlert to read alerts from +k8s:openapi-gen=true

func (*VMAlertRemoteReadSpec) DeepCopy

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

func (*VMAlertRemoteReadSpec) DeepCopyInto

func (in *VMAlertRemoteReadSpec) DeepCopyInto(out *VMAlertRemoteReadSpec)

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

type VMAlertRemoteWriteSpec

type VMAlertRemoteWriteSpec struct {
	// URL of the endpoint to send samples to.
	URL string `json:"url"`
	// Defines number of readers that concurrently write into remote storage (default 1)
	// +optional
	Concurrency *int32 `json:"concurrency,omitempty"`
	// Defines interval of flushes to remote write endpoint (default 5s)
	// +optional
	// +kubebuilder:validation:Pattern:="[0-9]+(ms|s|m|h)"
	FlushInterval *string `json:"flushInterval,omitempty"`
	// Defines defines max number of timeseries to be flushed at once (default 1000)
	// +optional
	MaxBatchSize *int32 `json:"maxBatchSize,omitempty"`
	// Defines the max number of pending datapoints to remote write endpoint (default 100000)
	// +optional
	MaxQueueSize *int32 `json:"maxQueueSize,omitempty"`
	// HTTPAuth generic auth methods
	HTTPAuth `json:",inline,omitempty"`
}

VMAlertRemoteWriteSpec defines the remote storage configuration for VmAlert +k8s:openapi-gen=true

func (*VMAlertRemoteWriteSpec) DeepCopy

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

func (*VMAlertRemoteWriteSpec) DeepCopyInto

func (in *VMAlertRemoteWriteSpec) DeepCopyInto(out *VMAlertRemoteWriteSpec)

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

type VMAlertSpec

type VMAlertSpec struct {
	// ParsingError contents error with context if operator was failed to parse json object from kubernetes api server
	ParsingError string `json:"-" yaml:"-"`
	// PodMetadata configures Labels and Annotations which are propagated to the VMAlert pods.
	PodMetadata *EmbeddedObjectMetadata `json:"podMetadata,omitempty"`
	// ManagedMetadata defines metadata that will be added to the all objects
	// created by operator for the given CustomResource
	ManagedMetadata *ManagedObjectsMetadata `json:"managedMetadata,omitempty"`

	// LogFormat for VMAlert to be configured with.
	// default or json
	// +optional
	// +kubebuilder:validation:Enum=default;json
	LogFormat string `json:"logFormat,omitempty"`
	// LogLevel for VMAlert to be configured with.
	// +optional
	// +kubebuilder:validation:Enum=INFO;WARN;ERROR;FATAL;PANIC
	LogLevel string `json:"logLevel,omitempty"`

	// EvaluationInterval defines how often to evaluate rules by default
	// +optional
	// +kubebuilder:validation:Pattern:="[0-9]+(ms|s|m|h)"
	EvaluationInterval string `json:"evaluationInterval,omitempty"`
	// EnforcedNamespaceLabel enforces adding a namespace label of origin for each alert
	// and metric that is user created. The label value will always be the namespace of the object that is
	// being created.
	// +optional
	EnforcedNamespaceLabel string `json:"enforcedNamespaceLabel,omitempty"`
	// SelectAllByDefault changes default behavior for empty CRD selectors, such RuleSelector.
	// with selectAllByDefault: true and empty serviceScrapeSelector and RuleNamespaceSelector
	// Operator selects all exist serviceScrapes
	// with selectAllByDefault: false - selects nothing
	// +optional
	SelectAllByDefault bool `json:"selectAllByDefault,omitempty"`
	// RuleSelector selector to select which VMRules to mount for loading alerting
	// rules from.
	// Works in combination with NamespaceSelector.
	// If both nil - behaviour controlled by selectAllByDefault
	// NamespaceSelector nil - only objects at VMAlert namespace.
	// +optional
	RuleSelector *metav1.LabelSelector `json:"ruleSelector,omitempty"`
	// RuleNamespaceSelector to be selected for VMRules discovery.
	// Works in combination with Selector.
	// If both nil - behaviour controlled by selectAllByDefault
	// NamespaceSelector nil - only objects at VMAlert namespace.
	// +optional
	RuleNamespaceSelector *metav1.LabelSelector `json:"ruleNamespaceSelector,omitempty"`

	// Notifier prometheus alertmanager endpoint spec. Required at least one of notifier or notifiers when there are alerting rules. e.g. http://127.0.0.1:9093
	// If specified both notifier and notifiers, notifier will be added as last element to notifiers.
	// only one of notifier options could be chosen: notifierConfigRef or notifiers +  notifier
	// +optional
	Notifier *VMAlertNotifierSpec `json:"notifier,omitempty"`

	// Notifiers prometheus alertmanager endpoints. Required at least one of notifier or notifiers when there are alerting rules. e.g. http://127.0.0.1:9093
	// If specified both notifier and notifiers, notifier will be added as last element to notifiers.
	// only one of notifier options could be chosen: notifierConfigRef or notifiers +  notifier
	// +optional
	Notifiers []VMAlertNotifierSpec `json:"notifiers,omitempty"`

	// NotifierConfigRef reference for secret with notifier configuration for vmalert
	// only one of notifier options could be chosen: notifierConfigRef or notifiers +  notifier
	// +optional
	NotifierConfigRef *v1.SecretKeySelector `json:"notifierConfigRef,omitempty"`

	// RemoteWrite Optional URL to remote-write compatible storage to persist
	// vmalert state and rule results to.
	// Rule results will be persisted according to each rule.
	// Alerts state will be persisted in the form of time series named ALERTS and ALERTS_FOR_STATE
	// see -remoteWrite.url docs in vmalerts for details.
	// E.g. http://127.0.0.1:8428
	// +optional
	RemoteWrite *VMAlertRemoteWriteSpec `json:"remoteWrite,omitempty"`

	// RemoteRead Optional URL to read vmalert state (persisted via RemoteWrite)
	// This configuration only makes sense if alerts state has been successfully
	// persisted (via RemoteWrite) before.
	// see -remoteRead.url docs in vmalerts for details.
	// E.g. http://127.0.0.1:8428
	// +optional
	RemoteRead *VMAlertRemoteReadSpec `json:"remoteRead,omitempty"`

	// RulePath to the file with alert rules.
	// Supports patterns. Flag can be specified multiple times.
	// Examples:
	// -rule /path/to/file. Path to a single file with alerting rules
	// -rule dir/*.yaml -rule /*.yaml. Relative path to all .yaml files in folder,
	// absolute path to all .yaml files in root.
	// by default operator adds /etc/vmalert/configs/base/vmalert.yaml
	// +optional
	RulePath []string `json:"rulePath,omitempty"`
	// Datasource Victoria Metrics or VMSelect url. Required parameter. e.g. http://127.0.0.1:8428
	Datasource VMAlertDatasourceSpec `json:"datasource"`

	// ExternalLabels in the form 'name: value' to add to all generated recording rules and alerts.
	// +optional
	ExternalLabels map[string]string `json:"externalLabels,omitempty"`

	// ServiceSpec that will be added to vmalert service spec
	// +optional
	ServiceSpec *AdditionalServiceSpec `json:"serviceSpec,omitempty"`
	// ServiceScrapeSpec that will be added to vmalert VMServiceScrape spec
	// +optional
	ServiceScrapeSpec *VMServiceScrapeSpec `json:"serviceScrapeSpec,omitempty"`

	// UpdateStrategy - overrides default update strategy.
	// +kubebuilder:validation:Enum=Recreate;RollingUpdate
	// +optional
	UpdateStrategy *appsv1.DeploymentStrategyType `json:"updateStrategy,omitempty"`
	// RollingUpdate - overrides deployment update params.
	// +optional
	RollingUpdate *appsv1.RollingUpdateDeployment `json:"rollingUpdate,omitempty"`
	// PodDisruptionBudget created by operator
	// +optional
	PodDisruptionBudget *EmbeddedPodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"`
	*EmbeddedProbes     `json:",inline"`
	// License allows to configure license key to be used for enterprise features.
	// Using license key is supported starting from VictoriaMetrics v1.94.0.
	// See [here](https://docs.victoriametrics.com/enterprise)
	// +optional
	License *License `json:"license,omitempty"`

	// ServiceAccountName is the name of the ServiceAccount to use to run the pods
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty"`

	CommonDefaultableParams           `json:",inline,omitempty"`
	CommonConfigReloaderParams        `json:",inline,omitempty"`
	CommonApplicationDeploymentParams `json:",inline,omitempty"`
}

VMAlertSpec defines the desired state of VMAlert +k8s:openapi-gen=true

func (*VMAlertSpec) DeepCopy

func (in *VMAlertSpec) DeepCopy() *VMAlertSpec

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

func (*VMAlertSpec) DeepCopyInto

func (in *VMAlertSpec) DeepCopyInto(out *VMAlertSpec)

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

func (*VMAlertSpec) UnmarshalJSON

func (cr *VMAlertSpec) UnmarshalJSON(src []byte) error

UnmarshalJSON implements json.Unmarshaler interface

type VMAlertStatus

type VMAlertStatus struct {
	StatusMetadata `json:",inline"`
}

VMAlertStatus defines the observed state of VMAlert +k8s:openapi-gen=true

func (*VMAlertStatus) DeepCopy

func (in *VMAlertStatus) DeepCopy() *VMAlertStatus

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

func (*VMAlertStatus) DeepCopyInto

func (in *VMAlertStatus) DeepCopyInto(out *VMAlertStatus)

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

func (*VMAlertStatus) GetStatusMetadata

func (cr *VMAlertStatus) GetStatusMetadata() *StatusMetadata

GetStatusMetadata returns metadata for object status

type VMAlertmanager

type VMAlertmanager struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// Specification of the desired behavior of the VMAlertmanager cluster. More info:
	// https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
	Spec VMAlertmanagerSpec `json:"spec"`
	// ParsedLastAppliedSpec contains last-applied configuration spec
	ParsedLastAppliedSpec *VMAlertmanagerSpec `json:"-" yaml:"-"`

	// Most recent observed status of the VMAlertmanager cluster.
	// Operator API itself. More info:
	// https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
	Status VMAlertmanagerStatus `json:"status,omitempty"`
}

VMAlertmanager represents Victoria-Metrics deployment for Alertmanager. +operator-sdk:gen-csv:customresourcedefinitions.displayName="VMAlertmanager App" +operator-sdk:gen-csv:customresourcedefinitions.resources="StatefulSet,apps" +operator-sdk:gen-csv:customresourcedefinitions.resources="Service,v1" +operator-sdk:gen-csv:customresourcedefinitions.resources="Secret,v1" +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +genclient +k8s:openapi-gen=true +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="ReplicaCount",type="integer",JSONPath=".spec.replicaCount",description="The desired replicas number of Alertmanagers" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:resource:path=vmalertmanagers,scope=Namespaced,shortName=vma,singular=vmalertmanager +kubebuilder:printcolumn:name="Update Status",type="string",JSONPath=".status.updateStatus",description="Current update status"

func (*VMAlertmanager) AllLabels

func (cr *VMAlertmanager) AllLabels() map[string]string

func (*VMAlertmanager) AnnotationsFiltered

func (cr *VMAlertmanager) AnnotationsFiltered() map[string]string

func (*VMAlertmanager) AsCRDOwner

func (*VMAlertmanager) AsCRDOwner() []metav1.OwnerReference

AsCRDOwner implements interface

func (*VMAlertmanager) AsNotifiers

func (cr *VMAlertmanager) AsNotifiers() []VMAlertNotifierSpec

AsNotifiers converts VMAlertmanager into VMAlertNotifierSpec

func (*VMAlertmanager) AsOwner

func (cr *VMAlertmanager) AsOwner() []metav1.OwnerReference

AsOwner returns owner references with current object as owner

func (*VMAlertmanager) AsURL

func (cr *VMAlertmanager) AsURL() string

AsURL returns url for accessing alertmanager via corresponding service

func (*VMAlertmanager) ConfigSecretName

func (cr *VMAlertmanager) ConfigSecretName() string

ConfigSecretName returns configuration secret name for alertmanager

func (*VMAlertmanager) DeepCopy

func (in *VMAlertmanager) DeepCopy() *VMAlertmanager

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

func (*VMAlertmanager) DeepCopyInto

func (in *VMAlertmanager) DeepCopyInto(out *VMAlertmanager)

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

func (*VMAlertmanager) DeepCopyObject

func (in *VMAlertmanager) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VMAlertmanager) GetAdditionalService

func (cr *VMAlertmanager) GetAdditionalService() *AdditionalServiceSpec

GetAdditionalService returns AdditionalServiceSpec settings

func (*VMAlertmanager) GetExtraArgs

func (cr *VMAlertmanager) GetExtraArgs() map[string]string

GetExtraArgs returns additionally configured command-line arguments

func (*VMAlertmanager) GetMetricPath

func (cr *VMAlertmanager) GetMetricPath() string

GetMetricPath returns prefixed path for metric requests

func (*VMAlertmanager) GetNSName

func (cr *VMAlertmanager) GetNSName() string

GetNSName implements build.builderOpts interface

func (*VMAlertmanager) GetServiceAccountName

func (cr *VMAlertmanager) GetServiceAccountName() string

func (*VMAlertmanager) GetServiceScrape

func (cr *VMAlertmanager) GetServiceScrape() *VMServiceScrapeSpec

GetServiceScrape returns overrides for serviceScrape builder

func (*VMAlertmanager) GetVolumeName

func (cr *VMAlertmanager) GetVolumeName() string

func (*VMAlertmanager) HasSpecChanges

func (cr *VMAlertmanager) HasSpecChanges() (bool, error)

HasSpecChanges compares spec with last applied cluster spec stored in annotation

func (*VMAlertmanager) IsOwnsServiceAccount

func (cr *VMAlertmanager) IsOwnsServiceAccount() bool

func (*VMAlertmanager) IsUnmanaged

func (cr *VMAlertmanager) IsUnmanaged() bool

IsUnmanaged checks if alertmanager should managed any alertmanager config objects

func (*VMAlertmanager) LastAppliedSpecAsPatch

func (cr *VMAlertmanager) LastAppliedSpecAsPatch() (client.Patch, error)

LastAppliedSpecAsPatch return last applied cluster spec as patch annotation

func (*VMAlertmanager) Paused

func (cr *VMAlertmanager) Paused() bool

func (*VMAlertmanager) PodAnnotations

func (cr *VMAlertmanager) PodAnnotations() map[string]string

func (*VMAlertmanager) PodLabels

func (cr *VMAlertmanager) PodLabels() map[string]string

func (*VMAlertmanager) Port

func (cr *VMAlertmanager) Port() string

Port returns port for accessing alertmanager

func (*VMAlertmanager) PrefixedName

func (cr *VMAlertmanager) PrefixedName() string

func (*VMAlertmanager) Probe

func (cr *VMAlertmanager) Probe() *EmbeddedProbes

func (*VMAlertmanager) ProbeNeedLiveness

func (*VMAlertmanager) ProbeNeedLiveness() bool

func (*VMAlertmanager) ProbePath

func (cr *VMAlertmanager) ProbePath() string

func (*VMAlertmanager) ProbePort

func (cr *VMAlertmanager) ProbePort() string

func (*VMAlertmanager) ProbeScheme

func (cr *VMAlertmanager) ProbeScheme() string

ProbeScheme returns scheme for probe

func (*VMAlertmanager) SelectorLabels

func (cr *VMAlertmanager) SelectorLabels() map[string]string

func (*VMAlertmanager) SetUpdateStatusTo

func (cr *VMAlertmanager) SetUpdateStatusTo(ctx context.Context, c client.Client, status UpdateStatus, maybeErr error) error

SetStatusTo changes update status with optional reason of fail

func (*VMAlertmanager) UnmarshalJSON

func (cr *VMAlertmanager) UnmarshalJSON(src []byte) error

UnmarshalJSON implements json.Unmarshaler interface

func (*VMAlertmanager) Validate added in v0.55.0

func (cr *VMAlertmanager) Validate() error

type VMAlertmanagerConfig

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

	Spec   VMAlertmanagerConfigSpec   `json:"spec,omitempty"`
	Status VMAlertmanagerConfigStatus `json:"status,omitempty"`
}

VMAlertmanagerConfig is the Schema for the vmalertmanagerconfigs API +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.updateStatus" +kubebuilder:printcolumn:name="Sync Error",type="string",JSONPath=".status.reason" +genclient +k8s:openapi-gen=true

func (*VMAlertmanagerConfig) AsKey

func (r *VMAlertmanagerConfig) AsKey() string

func (*VMAlertmanagerConfig) DeepCopy

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

func (*VMAlertmanagerConfig) DeepCopyInto

func (in *VMAlertmanagerConfig) DeepCopyInto(out *VMAlertmanagerConfig)

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

func (*VMAlertmanagerConfig) DeepCopyObject

func (in *VMAlertmanagerConfig) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VMAlertmanagerConfig) GetStatusMetadata

func (r *VMAlertmanagerConfig) GetStatusMetadata() *StatusMetadata

GetStatusMetadata implements reconcile.objectWithStatus interface

func (*VMAlertmanagerConfig) UnmarshalJSON

func (r *VMAlertmanagerConfig) UnmarshalJSON(src []byte) error

UnmarshalJSON implements json.Unmarshaler interface

func (*VMAlertmanagerConfig) Validate

func (r *VMAlertmanagerConfig) Validate() error

type VMAlertmanagerConfigList

type VMAlertmanagerConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VMAlertmanagerConfig `json:"items"`
}

VMAlertmanagerConfigList contains a list of VMAlertmanagerConfig

func (*VMAlertmanagerConfigList) DeepCopy

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

func (*VMAlertmanagerConfigList) DeepCopyInto

func (in *VMAlertmanagerConfigList) DeepCopyInto(out *VMAlertmanagerConfigList)

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

func (*VMAlertmanagerConfigList) DeepCopyObject

func (in *VMAlertmanagerConfigList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VMAlertmanagerConfigSpec

type VMAlertmanagerConfigSpec struct {
	// Route definition for alertmanager, may include nested routes.
	Route *Route `json:"route"`
	// Receivers defines alert receivers
	Receivers []Receiver `json:"receivers"`
	// InhibitRules will only apply for alerts matching
	// the resource's namespace.
	// +optional
	InhibitRules []InhibitRule `json:"inhibit_rules,omitempty" yaml:"inhibit_rules,omitempty"`

	// TimeIntervals defines named interval for active/mute notifications interval
	// See https://prometheus.io/docs/alerting/latest/configuration/#time_interval
	// +optional
	TimeIntervals []TimeIntervals `json:"time_intervals,omitempty" yaml:"time_intervals,omitempty"`
	// ParsingError contents error with context if operator was failed to parse json object from kubernetes api server
	ParsingError string `json:"-" yaml:"-"`
}

VMAlertmanagerConfigSpec defines configuration for VMAlertmanagerConfig it must reference only locally defined objects

func (*VMAlertmanagerConfigSpec) DeepCopy

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

func (*VMAlertmanagerConfigSpec) DeepCopyInto

func (in *VMAlertmanagerConfigSpec) DeepCopyInto(out *VMAlertmanagerConfigSpec)

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

type VMAlertmanagerConfigStatus

type VMAlertmanagerConfigStatus struct {
	// ObservedGeneration defines current generation picked by operator for the
	// reconcile
	StatusMetadata                  `json:",inline"`
	LastErrorParentAlertmanagerName string `json:"lastErrorParentAlertmanagerName,omitempty"`
}

VMAlertmanagerConfigStatus defines the observed state of VMAlertmanagerConfig

func (*VMAlertmanagerConfigStatus) DeepCopy

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

func (*VMAlertmanagerConfigStatus) DeepCopyInto

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

type VMAlertmanagerList

type VMAlertmanagerList struct {
	metav1.TypeMeta `json:",inline"`
	// Standard list metadata
	// More info: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#metadata
	metav1.ListMeta `json:"metadata,omitempty"`
	// List of Alertmanagers
	Items []VMAlertmanager `json:"items"`
}

VMAlertmanagerList is a list of Alertmanagers. +k8s:openapi-gen=true +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*VMAlertmanagerList) DeepCopy

func (in *VMAlertmanagerList) DeepCopy() *VMAlertmanagerList

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

func (*VMAlertmanagerList) DeepCopyInto

func (in *VMAlertmanagerList) DeepCopyInto(out *VMAlertmanagerList)

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

func (*VMAlertmanagerList) DeepCopyObject

func (in *VMAlertmanagerList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VMAlertmanagerSpec

type VMAlertmanagerSpec struct {
	// ParsingError contents error with context if operator was failed to parse json object from kubernetes api server
	ParsingError string `json:"-" yaml:"-"`

	// PodMetadata configures Labels and Annotations which are propagated to the alertmanager pods.
	// +optional
	PodMetadata *EmbeddedObjectMetadata `json:"podMetadata,omitempty"`
	// ManagedMetadata defines metadata that will be added to the all objects
	// created by operator for the given CustomResource
	ManagedMetadata *ManagedObjectsMetadata `json:"managedMetadata,omitempty"`

	// Templates is a list of ConfigMap key references for ConfigMaps in the same namespace as the VMAlertmanager
	// object, which shall be mounted into the VMAlertmanager Pods.
	// The Templates are mounted into /etc/vm/templates/<configmap-name>/<configmap-key>.
	// +optional
	Templates []ConfigMapKeyReference `json:"templates,omitempty"`

	// ConfigRawYaml - raw configuration for alertmanager,
	// it helps it to start without secret.
	// priority -> hardcoded ConfigRaw -> ConfigRaw, provided by user -> ConfigSecret.
	// +optional
	ConfigRawYaml string `json:"configRawYaml,omitempty"`
	// ConfigSecret is the name of a Kubernetes Secret in the same namespace as the
	// VMAlertmanager object, which contains configuration for this VMAlertmanager,
	// configuration must be inside secret key: alertmanager.yaml.
	// It must be created by user.
	// instance. Defaults to 'vmalertmanager-<alertmanager-name>'
	// The secret is mounted into /etc/alertmanager/config.
	// +optional
	// +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Secret with alertmanager config",xDescriptors="urn:alm:descriptor:io.kubernetes:Secret"
	ConfigSecret string `json:"configSecret,omitempty"`
	// Log level for VMAlertmanager to be configured with.
	// +optional
	// +kubebuilder:validation:Enum=debug;info;warn;error;DEBUG;INFO;WARN;ERROR
	LogLevel string `json:"logLevel,omitempty"`
	// LogFormat for VMAlertmanager to be configured with.
	// +optional
	// +kubebuilder:validation:Enum=logfmt;json
	LogFormat string `json:"logFormat,omitempty"`

	// Retention Time duration VMAlertmanager shall retain data for. Default is '120h',
	// and must match the regular expression `[0-9]+(ms|s|m|h)` (milliseconds seconds minutes hours).
	// +kubebuilder:validation:Pattern:="[0-9]+(ms|s|m|h)"
	// +optional
	Retention string `json:"retention,omitempty"`
	// Storage is the definition of how storage will be used by the VMAlertmanager
	// instances.
	// +optional
	Storage *StorageSpec `json:"storage,omitempty"`

	// ExternalURL the VMAlertmanager instances will be available under. This is
	// necessary to generate correct URLs. This is necessary if VMAlertmanager is not
	// served from root of a DNS name.
	// +optional
	ExternalURL string `json:"externalURL,omitempty"`
	// RoutePrefix VMAlertmanager registers HTTP handlers for. This is useful,
	// if using ExternalURL and a proxy is rewriting HTTP routes of a request,
	// and the actual ExternalURL is still true, but the server serves requests
	// under a different route prefix. For example for use with `kubectl proxy`.
	// +optional
	RoutePrefix string `json:"routePrefix,omitempty"`

	// ClusterDomainName defines domain name suffix for in-cluster dns addresses
	// aka .cluster.local
	// used to build pod peer addresses for in-cluster communication
	// +optional
	ClusterDomainName string `json:"clusterDomainName,omitempty"`
	// ListenLocal makes the VMAlertmanager server listen on loopback, so that it
	// does not bind against the Pod IP. Note this is only for the VMAlertmanager
	// UI, not the gossip communication.
	// +optional
	ListenLocal bool `json:"listenLocal,omitempty"`
	// AdditionalPeers allows injecting a set of additional Alertmanagers to peer with to form a highly available cluster.
	AdditionalPeers []string `json:"additionalPeers,omitempty"`
	// ClusterAdvertiseAddress is the explicit address to advertise in cluster.
	// Needs to be provided for non RFC1918 [1] (public) addresses.
	// [1] RFC1918: https://tools.ietf.org/html/rfc1918
	// +optional
	ClusterAdvertiseAddress string `json:"clusterAdvertiseAddress,omitempty"`
	// PortName used for the pods and governing service.
	// This defaults to web
	// +optional
	PortName string `json:"portName,omitempty"`
	// ServiceSpec that will be added to vmalertmanager service spec
	// +optional
	ServiceSpec *AdditionalServiceSpec `json:"serviceSpec,omitempty"`
	// ServiceScrapeSpec that will be added to vmalertmanager VMServiceScrape spec
	// +optional
	ServiceScrapeSpec *VMServiceScrapeSpec `json:"serviceScrapeSpec,omitempty"`
	// PodDisruptionBudget created by operator
	// +optional
	PodDisruptionBudget *EmbeddedPodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"`
	*EmbeddedProbes     `json:",inline"`
	// SelectAllByDefault changes default behavior for empty CRD selectors, such ConfigSelector.
	// with selectAllByDefault: true and undefined ConfigSelector and ConfigNamespaceSelector
	// Operator selects all exist alertManagerConfigs
	// with selectAllByDefault: false - selects nothing
	// +optional
	SelectAllByDefault bool `json:"selectAllByDefault,omitempty"`
	// ConfigSelector defines selector for VMAlertmanagerConfig, result config will be merged with with Raw or Secret config.
	// Works in combination with NamespaceSelector.
	// NamespaceSelector nil - only objects at VMAlertmanager namespace.
	// Selector nil - only objects at NamespaceSelector namespaces.
	// If both nil - behaviour controlled by selectAllByDefault
	// +optional
	ConfigSelector *metav1.LabelSelector `json:"configSelector,omitempty"`
	//  ConfigNamespaceSelector defines namespace selector for VMAlertmanagerConfig.
	// Works in combination with Selector.
	// NamespaceSelector nil - only objects at VMAlertmanager namespace.
	// Selector nil - only objects at NamespaceSelector namespaces.
	// If both nil - behaviour controlled by selectAllByDefault
	// +optional
	ConfigNamespaceSelector *metav1.LabelSelector `json:"configNamespaceSelector,omitempty"`

	// DisableNamespaceMatcher disables top route namespace label matcher for VMAlertmanagerConfig
	// It may be useful if alert doesn't have namespace label for some reason
	// +optional
	DisableNamespaceMatcher bool `json:"disableNamespaceMatcher,omitempty"`

	// DisableRouteContinueEnforce cancel the behavior for VMAlertmanagerConfig that always enforce first-level route continue to true
	// +optional
	DisableRouteContinueEnforce bool `json:"disableRouteContinueEnforce,omitempty"`

	// EnforcedTopRouteMatchers defines label matchers to be added for the top route
	// of VMAlertmanagerConfig
	// It allows to make some set of labels required for alerts.
	// https://prometheus.io/docs/alerting/latest/configuration/#matcher
	EnforcedTopRouteMatchers []string `json:"enforcedTopRouteMatchers,omitempty"`

	// RollingUpdateStrategy defines strategy for application updates
	// Default is OnDelete, in this case operator handles update process
	// Can be changed for RollingUpdate
	// +optional
	RollingUpdateStrategy appsv1.StatefulSetUpdateStrategyType `json:"rollingUpdateStrategy,omitempty"`
	// ClaimTemplates allows adding additional VolumeClaimTemplates for StatefulSet
	ClaimTemplates []v1.PersistentVolumeClaim `json:"claimTemplates,omitempty"`

	// WebConfig defines configuration for webserver
	// https://github.com/prometheus/alertmanager/blob/main/docs/https.md
	// +optional
	WebConfig *AlertmanagerWebConfig `json:"webConfig,omitempty"`

	// GossipConfig defines gossip TLS configuration for Alertmanager cluster
	// +optional
	GossipConfig *AlertmanagerGossipConfig `json:"gossipConfig,omitempty"`

	// ServiceAccountName is the name of the ServiceAccount to use to run the pods
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty"`

	CommonDefaultableParams           `json:",inline,omitempty"`
	CommonConfigReloaderParams        `json:",inline,omitempty"`
	CommonApplicationDeploymentParams `json:",inline,omitempty"`
}

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

func (*VMAlertmanagerSpec) DeepCopy

func (in *VMAlertmanagerSpec) DeepCopy() *VMAlertmanagerSpec

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

func (*VMAlertmanagerSpec) DeepCopyInto

func (in *VMAlertmanagerSpec) DeepCopyInto(out *VMAlertmanagerSpec)

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

func (*VMAlertmanagerSpec) UnmarshalJSON

func (cr *VMAlertmanagerSpec) UnmarshalJSON(src []byte) error

UnmarshalJSON implements json.Unmarshaler interface

type VMAlertmanagerStatus

type VMAlertmanagerStatus struct {
	StatusMetadata `json:",inline"`
}

VMAlertmanagerStatus is the most recent observed status of the VMAlertmanager cluster Operator API itself. More info:

func (*VMAlertmanagerStatus) DeepCopy

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

func (*VMAlertmanagerStatus) DeepCopyInto

func (in *VMAlertmanagerStatus) DeepCopyInto(out *VMAlertmanagerStatus)

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

func (*VMAlertmanagerStatus) GetStatusMetadata

func (cr *VMAlertmanagerStatus) GetStatusMetadata() *StatusMetadata

GetStatusMetadata returns metadata for object status

type VMAuth

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

	Spec VMAuthSpec `json:"spec,omitempty"`
	// ParsedLastAppliedSpec contains last-applied configuration spec
	ParsedLastAppliedSpec *VMAuthSpec `json:"-" yaml:"-"`

	Status VMAuthStatus `json:"status,omitempty"`
}

VMAuth is the Schema for the vmauths API +kubebuilder:object:root=true +kubebuilder:subresource:status +genclient +k8s:openapi-gen=true +kubebuilder:object:root=true +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.updateStatus",description="Current status of update rollout" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:printcolumn:name="ReplicaCount",type="integer",JSONPath=".spec.replicaCount",description="The desired replicas number of Alertmanagers"

func (*VMAuth) AllLabels

func (cr *VMAuth) AllLabels() map[string]string

func (*VMAuth) AnnotationsFiltered

func (cr *VMAuth) AnnotationsFiltered() map[string]string

func (*VMAuth) AsCRDOwner

func (cr *VMAuth) AsCRDOwner() []metav1.OwnerReference

AsCRDOwner implements interface

func (*VMAuth) AsOwner

func (cr *VMAuth) AsOwner() []metav1.OwnerReference

AsOwner returns owner references with current object as owner

func (*VMAuth) ConfigSecretName

func (cr *VMAuth) ConfigSecretName() string

func (*VMAuth) DeepCopy

func (in *VMAuth) DeepCopy() *VMAuth

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

func (*VMAuth) DeepCopyInto

func (in *VMAuth) DeepCopyInto(out *VMAuth)

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

func (*VMAuth) DeepCopyObject

func (in *VMAuth) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VMAuth) GetAdditionalService

func (cr *VMAuth) GetAdditionalService() *AdditionalServiceSpec

GetAdditionalService returns AdditionalServiceSpec settings

func (*VMAuth) GetExtraArgs

func (cr *VMAuth) GetExtraArgs() map[string]string

GetExtraArgs returns additionally configured command-line arguments

func (*VMAuth) GetMetricPath

func (cr *VMAuth) GetMetricPath() string

GetMetricPath returns prefixed path for metric requests

func (*VMAuth) GetNSName

func (cr *VMAuth) GetNSName() string

GetNSName implements build.builderOpts interface

func (*VMAuth) GetServiceAccountName

func (cr *VMAuth) GetServiceAccountName() string

func (*VMAuth) GetServiceScrape

func (cr *VMAuth) GetServiceScrape() *VMServiceScrapeSpec

GetServiceScrape returns overrides for serviceScrape builder

func (*VMAuth) HasSpecChanges

func (cr *VMAuth) HasSpecChanges() (bool, error)

HasSpecChanges compares spec with last applied cluster spec stored in annotation

func (*VMAuth) IsOwnsServiceAccount

func (cr *VMAuth) IsOwnsServiceAccount() bool

func (*VMAuth) IsUnmanaged

func (cr *VMAuth) IsUnmanaged() bool

IsUnmanaged checks if object should managed any config objects

func (*VMAuth) LastAppliedSpecAsPatch

func (cr *VMAuth) LastAppliedSpecAsPatch() (client.Patch, error)

LastAppliedSpecAsPatch return last applied cluster spec as patch annotation

func (*VMAuth) Paused

func (cr *VMAuth) Paused() bool

func (*VMAuth) PodAnnotations

func (cr *VMAuth) PodAnnotations() map[string]string

func (*VMAuth) PodLabels

func (cr *VMAuth) PodLabels() map[string]string

func (*VMAuth) PrefixedName

func (cr *VMAuth) PrefixedName() string

func (*VMAuth) Probe

func (cr *VMAuth) Probe() *EmbeddedProbes

func (*VMAuth) ProbeNeedLiveness

func (*VMAuth) ProbeNeedLiveness() bool

func (*VMAuth) ProbePath

func (cr *VMAuth) ProbePath() string

func (*VMAuth) ProbePort

func (cr *VMAuth) ProbePort() string

func (*VMAuth) ProbeScheme

func (cr *VMAuth) ProbeScheme() string

func (*VMAuth) SelectorLabels

func (cr *VMAuth) SelectorLabels() map[string]string

func (*VMAuth) SetUpdateStatusTo

func (cr *VMAuth) SetUpdateStatusTo(ctx context.Context, c client.Client, status UpdateStatus, maybeErr error) error

SetStatusTo changes update status with optional reason of fail

func (*VMAuth) UnmarshalJSON

func (cr *VMAuth) UnmarshalJSON(src []byte) error

UnmarshalJSON implements json.Unmarshaler interface

func (*VMAuth) Validate added in v0.55.0

func (cr *VMAuth) Validate() error

type VMAuthList

type VMAuthList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VMAuth `json:"items"`
}

VMAuthList contains a list of VMAuth

func (*VMAuthList) DeepCopy

func (in *VMAuthList) DeepCopy() *VMAuthList

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

func (*VMAuthList) DeepCopyInto

func (in *VMAuthList) DeepCopyInto(out *VMAuthList)

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

func (*VMAuthList) DeepCopyObject

func (in *VMAuthList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VMAuthLoadBalancer

type VMAuthLoadBalancer struct {
	Enabled                bool                   `json:"enabled,omitempty"`
	DisableInsertBalancing bool                   `json:"disableInsertBalancing,omitempty"`
	DisableSelectBalancing bool                   `json:"disableSelectBalancing,omitempty"`
	Spec                   VMAuthLoadBalancerSpec `json:"spec,omitempty"`
}

VMAuthLoadBalancer configures vmauth as a load balancer for the requests

func (*VMAuthLoadBalancer) DeepCopy

func (in *VMAuthLoadBalancer) DeepCopy() *VMAuthLoadBalancer

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

func (*VMAuthLoadBalancer) DeepCopyInto

func (in *VMAuthLoadBalancer) DeepCopyInto(out *VMAuthLoadBalancer)

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

type VMAuthLoadBalancerSpec

type VMAuthLoadBalancerSpec struct {
	// Common params for scheduling
	// PodMetadata configures Labels and Annotations which are propagated to the vmauth lb pods.
	PodMetadata *EmbeddedObjectMetadata `json:"podMetadata,omitempty"`
	// AdditionalServiceSpec defines service override configuration for vmauth lb deployment
	// it'll be only applied to vmclusterlb- service
	AdditionalServiceSpec *AdditionalServiceSpec `json:"serviceSpec,omitempty"`
	// ServiceScrapeSpec that will be added to vmauthlb VMServiceScrape spec
	// +optional
	ServiceScrapeSpec *VMServiceScrapeSpec `json:"serviceScrapeSpec,omitempty"`

	// LogFormat for vmauth
	// default or json
	// +optional
	// +kubebuilder:validation:Enum=default;json
	LogFormat string `json:"logFormat,omitempty"`
	// LogLevel for vmauth container.
	// +optional
	// +kubebuilder:validation:Enum=INFO;WARN;ERROR;FATAL;PANIC
	LogLevel                          string `json:"logLevel,omitempty"`
	CommonApplicationDeploymentParams `json:",inline"`
	CommonDefaultableParams           `json:",inline"`
	*EmbeddedProbes                   `json:",inline"`
	// PodDisruptionBudget created by operator
	// +optional
	PodDisruptionBudget *EmbeddedPodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"`
}

VMAuthLoadBalancerSpec defines configuration spec for VMAuth used as load-balancer for VMCluster component

func (*VMAuthLoadBalancerSpec) DeepCopy

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

func (*VMAuthLoadBalancerSpec) DeepCopyInto

func (in *VMAuthLoadBalancerSpec) DeepCopyInto(out *VMAuthLoadBalancerSpec)

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

func (*VMAuthLoadBalancerSpec) GetExtraArgs

func (cr *VMAuthLoadBalancerSpec) GetExtraArgs() map[string]string

GetExtraArgs implements build.serviceScrapeBuilder interface

func (*VMAuthLoadBalancerSpec) GetMetricPath

func (cr *VMAuthLoadBalancerSpec) GetMetricPath() string

GetMetricPath implements build.serviceScrapeBuilder interface

func (*VMAuthLoadBalancerSpec) GetServiceScrape

func (cr *VMAuthLoadBalancerSpec) GetServiceScrape() *VMServiceScrapeSpec

GetServiceScrape implements build.serviceScrapeBuilder interface

func (*VMAuthLoadBalancerSpec) Probe

ProbePath returns path for probe requests

func (*VMAuthLoadBalancerSpec) ProbeNeedLiveness

func (*VMAuthLoadBalancerSpec) ProbeNeedLiveness() bool

ProbeNeedLiveness implements build.probeCRD interface

func (*VMAuthLoadBalancerSpec) ProbePath

func (cr *VMAuthLoadBalancerSpec) ProbePath() string

ProbePath returns path for probe requests

func (*VMAuthLoadBalancerSpec) ProbePort

func (cr *VMAuthLoadBalancerSpec) ProbePort() string

ProbePort returns port for probe requests

func (*VMAuthLoadBalancerSpec) ProbeScheme

func (cr *VMAuthLoadBalancerSpec) ProbeScheme() string

ProbeScheme returns scheme for probe requests

type VMAuthSpec

type VMAuthSpec struct {
	// ParsingError contents error with context if operator was failed to parse json object from kubernetes api server
	ParsingError string `json:"-" yaml:"-"`
	// PodMetadata configures Labels and Annotations which are propagated to the VMAuth pods.
	// +optional
	PodMetadata *EmbeddedObjectMetadata `json:"podMetadata,omitempty" yaml:"podMetadata,omitempty"`
	// ManagedMetadata defines metadata that will be added to the all objects
	// created by operator for the given CustomResource
	ManagedMetadata *ManagedObjectsMetadata `json:"managedMetadata,omitempty" yaml:"managedMetadata,omitempty"`
	// LogLevel for victoria metrics single to be configured with.
	// +optional
	// +kubebuilder:validation:Enum=INFO;WARN;ERROR;FATAL;PANIC
	LogLevel string `json:"logLevel,omitempty" yaml:"logLevel,omitempty"`
	// LogFormat for VMAuth to be configured with.
	// +optional
	// +kubebuilder:validation:Enum=default;json
	LogFormat string `json:"logFormat,omitempty" yaml:"logFormat,omitempty"`
	// SelectAllByDefault changes default behavior for empty CRD selectors, such userSelector.
	// with selectAllByDefault: true and empty userSelector and userNamespaceSelector
	// Operator selects all exist users
	// with selectAllByDefault: false - selects nothing
	// +optional
	SelectAllByDefault bool `json:"selectAllByDefault,omitempty" yaml:"selectAllByDefault,omitempty"`
	// UserSelector defines VMUser to be selected for config file generation.
	// Works in combination with NamespaceSelector.
	// NamespaceSelector nil - only objects at VMAuth namespace.
	// If both nil - behaviour controlled by selectAllByDefault
	// +optional
	UserSelector *metav1.LabelSelector `json:"userSelector,omitempty" yaml:"userSelector,omitempty"`
	// UserNamespaceSelector Namespaces to be selected for  VMAuth discovery.
	// Works in combination with Selector.
	// NamespaceSelector nil - only objects at VMAuth namespace.
	// Selector nil - only objects at NamespaceSelector namespaces.
	// If both nil - behaviour controlled by selectAllByDefault
	// +optional
	UserNamespaceSelector *metav1.LabelSelector `json:"userNamespaceSelector,omitempty" yaml:"userNamespaceSelector,omitempty"`

	// ServiceSpec that will be added to vmsingle service spec
	// +optional
	ServiceSpec *AdditionalServiceSpec `json:"serviceSpec,omitempty" yaml:"serviceSpec,omitempty"`
	// ServiceScrapeSpec that will be added to vmauth VMServiceScrape spec
	// +optional
	ServiceScrapeSpec *VMServiceScrapeSpec `json:"serviceScrapeSpec,omitempty" yaml:"serviceScrapeSpec,omitempty"`
	// PodDisruptionBudget created by operator
	// +optional
	PodDisruptionBudget *EmbeddedPodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty" yaml:"podDisruptionBudget,omitempty"`
	// Ingress enables ingress configuration for VMAuth.
	Ingress *EmbeddedIngress `json:"ingress,omitempty"`
	// LivenessProbe that will be added to VMAuth pod
	*EmbeddedProbes `json:",inline"`
	// UnauthorizedAccessConfig configures access for un authorized users
	//
	// Deprecated, use unauthorizedUserAccessSpec instead
	// will be removed at v1.0 release
	// +deprecated
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	UnauthorizedAccessConfig []UnauthorizedAccessConfigURLMap `json:"unauthorizedAccessConfig,omitempty" yaml:"unauthorizedAccessConfig,omitempty"`
	// UnauthorizedUserAccessSpec defines unauthorized_user config section of vmauth config
	// +optional
	UnauthorizedUserAccessSpec *VMAuthUnauthorizedUserAccessSpec `json:"unauthorizedUserAccessSpec,omitempty" yaml:"unauthorizedUserAccessSpec,omitempty"`
	// IPFilters global access ip filters
	// supported only with enterprise version of [vmauth](https://docs.victoriametrics.com/vmauth/#ip-filters)
	// +optional
	// will be added after removal of VMUserConfigOptions
	// currently it has collision with inlined fields
	// IPFilters VMUserIPFilters `json:"ip_filters,omitempty"`
	// will be removed at v1.0 release
	// +deprecated
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	VMUserConfigOptions `json:",inline" yaml:",inline"`
	// License allows to configure license key to be used for enterprise features.
	// Using license key is supported starting from VictoriaMetrics v1.94.0.
	// See [here](https://docs.victoriametrics.com/enterprise)
	// +optional
	License *License `json:"license,omitempty"`
	// ConfigSecret is the name of a Kubernetes Secret in the same namespace as the
	// VMAuth object, which contains auth configuration for vmauth,
	// configuration must be inside secret key: config.yaml.
	// It must be created and managed manually.
	// If it's defined, configuration for vmauth becomes unmanaged and operator'll not create any related secrets/config-reloaders
	// Deprecated, use externalConfig.secretRef instead
	ConfigSecret string `json:"configSecret,omitempty" yaml:"configSecret,omitempty"`
	// ExternalConfig defines a source of external VMAuth configuration.
	// If it's defined, configuration for vmauth becomes unmanaged and operator'll not create any related secrets/config-reloaders
	// +optional
	ExternalConfig `json:"externalConfig,omitempty" yaml:"externalConfig,omitempty"`

	// ServiceAccountName is the name of the ServiceAccount to use to run the pods
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty" yaml:"serviceAccountName,omitempty"`

	CommonDefaultableParams           `json:",inline,omitempty" yaml:",inline"`
	CommonConfigReloaderParams        `json:",inline,omitempty" yaml:",inline"`
	CommonApplicationDeploymentParams `json:",inline,omitempty" yaml:",inline"`
	// InternalListenPort instructs vmauth to serve internal routes at given port
	// available from v0.56.0 operator
	// and v1.111.0 vmauth version
	// related doc https://docs.victoriametrics.com/vmauth/#security
	// +optional
	InternalListenPort string `json:"internalListenPort,omitempty"`

	// UseProxyProtocol enables proxy protocol for vmauth
	// https://www.haproxy.org/download/2.3/doc/proxy-protocol.txt
	UseProxyProtocol bool `json:"useProxyProtocol,omitempty"`
}

VMAuthSpec defines the desired state of VMAuth

func (*VMAuthSpec) DeepCopy

func (in *VMAuthSpec) DeepCopy() *VMAuthSpec

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

func (*VMAuthSpec) DeepCopyInto

func (in *VMAuthSpec) DeepCopyInto(out *VMAuthSpec)

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

func (*VMAuthSpec) UnmarshalJSON

func (cr *VMAuthSpec) UnmarshalJSON(src []byte) error

UnmarshalJSON implements json.Unmarshaler interface

type VMAuthStatus

type VMAuthStatus struct {
	StatusMetadata `json:",inline"`
}

VMAuthStatus defines the observed state of VMAuth

func (*VMAuthStatus) DeepCopy

func (in *VMAuthStatus) DeepCopy() *VMAuthStatus

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

func (*VMAuthStatus) DeepCopyInto

func (in *VMAuthStatus) DeepCopyInto(out *VMAuthStatus)

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

func (*VMAuthStatus) GetStatusMetadata

func (cr *VMAuthStatus) GetStatusMetadata() *StatusMetadata

GetStatusMetadata returns metadata for object status

type VMAuthUnauthorizedUserAccessSpec

type VMAuthUnauthorizedUserAccessSpec struct {
	// URLPrefix defines prefix prefix for destination
	// +kubebuilder:validation:Schemaless
	// +kubebuilder:pruning:PreserveUnknownFields
	URLPrefix StringOrArray                    `json:"url_prefix,omitempty" yaml:"url_prefix,omitempty"`
	URLMap    []UnauthorizedAccessConfigURLMap `json:"url_map,omitempty" yaml:"url_map,omitempty"`

	VMUserConfigOptions `json:",inline" yaml:",inline"`
	// MetricLabels - additional labels for metrics exported by vmauth for given user.
	// +optional
	MetricLabels map[string]string `json:"metric_labels,omitempty" yaml:"metric_labels"`
}

VMAuthUnauthorizedUserAccessSpec defines unauthorized_user section configuration for vmauth

func (*VMAuthUnauthorizedUserAccessSpec) DeepCopy

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

func (*VMAuthUnauthorizedUserAccessSpec) DeepCopyInto

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

func (*VMAuthUnauthorizedUserAccessSpec) Validate

func (vmuua *VMAuthUnauthorizedUserAccessSpec) Validate() error

Validate performs semantic syntax validation

type VMBackup

type VMBackup struct {
	// AcceptEULA accepts enterprise feature usage, must be set to true.
	// otherwise backupmanager cannot be added to single/cluster version.
	// https://victoriametrics.com/legal/esa/
	// +optional
	AcceptEULA bool `json:"acceptEULA"`
	// SnapshotCreateURL overwrites url for snapshot create
	// +optional
	SnapshotCreateURL string `json:"snapshotCreateURL,omitempty"`
	// SnapShotDeleteURL overwrites url for snapshot delete
	// +optional
	SnapShotDeleteURL string `json:"snapshotDeleteURL,omitempty"`
	// Defines number of concurrent workers. Higher concurrency may reduce backup duration (default 10)
	// +optional
	Concurrency *int32 `json:"concurrency,omitempty"`
	// Defines destination for backup
	Destination string `json:"destination,omitempty"`
	// DestinationDisableSuffixAdd - disables suffix adding for cluster version backups
	// each vmstorage backup must have unique backup folder
	// so operator adds POD_NAME as suffix for backup destination folder.
	// +optional
	DestinationDisableSuffixAdd bool `json:"destinationDisableSuffixAdd,omitempty"`
	// Custom S3 endpoint for use with S3-compatible storages (e.g. MinIO). S3 is used if not set
	// +optional
	CustomS3Endpoint *string `json:"customS3Endpoint,omitempty"`
	// CredentialsSecret is secret in the same namespace for access to remote storage
	// The secret is mounted into /etc/vm/creds.
	// +optional
	CredentialsSecret *v1.SecretKeySelector `json:"credentialsSecret,omitempty"`

	// Defines if hourly backups disabled (default false)
	// +optional
	DisableHourly *bool `json:"disableHourly,omitempty"`
	// Defines if daily backups disabled (default false)
	// +optional
	DisableDaily *bool `json:"disableDaily,omitempty"`
	// Defines if weekly backups disabled (default false)
	// +optional
	DisableWeekly *bool `json:"disableWeekly,omitempty"`
	// Defines if monthly backups disabled (default false)
	// +optional
	DisableMonthly *bool `json:"disableMonthly,omitempty"`
	// Image - docker image settings for VMBackuper
	// +optional
	Image Image `json:"image,omitempty"`
	// Port for health check connections
	Port string `json:"port,omitempty"`
	// LogFormat for VMBackup to be configured with.
	// default or json
	// +optional
	// +kubebuilder:validation:Enum=default;json
	LogFormat *string `json:"logFormat,omitempty"`
	// LogLevel for VMBackup to be configured with.
	// +optional
	// +kubebuilder:validation:Enum=INFO;WARN;ERROR;FATAL;PANIC
	LogLevel *string `json:"logLevel,omitempty"`
	// Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
	// if not defined default resources from operator config will be used
	// +optional
	Resources v1.ResourceRequirements `json:"resources,omitempty"`
	// extra args like maxBytesPerSecond default 0
	// +optional
	ExtraArgs map[string]string `json:"extraArgs,omitempty"`
	// +optional
	ExtraEnvs []v1.EnvVar `json:"extraEnvs,omitempty"`
	// ExtraEnvsFrom defines source of env variables for the application container
	// could either be secret or configmap
	// +optional
	ExtraEnvsFrom []v1.EnvFromSource `json:"extraEnvsFrom,omitempty"`

	// VolumeMounts allows configuration of additional VolumeMounts on the output Deployment definition.
	// VolumeMounts specified will be appended to other VolumeMounts in the vmbackupmanager container,
	// that are generated as a result of StorageSpec objects.
	// +optional
	VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"`

	// Restore Allows to enable restore options for pod
	// Read [more](https://docs.victoriametrics.com/vmbackupmanager#restore-commands)
	// +optional
	Restore *VMRestore `json:"restore,omitempty"`
}

func (*VMBackup) DeepCopy

func (in *VMBackup) DeepCopy() *VMBackup

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

func (*VMBackup) DeepCopyInto

func (in *VMBackup) DeepCopyInto(out *VMBackup)

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

func (*VMBackup) SnapshotCreatePathWithFlags

func (*VMBackup) SnapshotCreatePathWithFlags(port string, extraArgs map[string]string) string

SnapshotCreatePathWithFlags returns url for accessing vmbackupmanager component

func (*VMBackup) SnapshotDeletePathWithFlags

func (*VMBackup) SnapshotDeletePathWithFlags(port string, extraArgs map[string]string) string

SnapshotDeletePathWithFlags returns url for accessing vmbackupmanager component

type VMCluster

type VMCluster struct {
	// +optional
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              VMClusterSpec `json:"spec"`
	// ParsedLastAppliedSpec contains last-applied configuration spec
	ParsedLastAppliedSpec *VMClusterSpec `json:"-" yaml:"-"`
	// +optional
	Status VMClusterStatus `json:"status,omitempty"`
}

VMCluster is fast, cost-effective and scalable time-series database. Cluster version with +operator-sdk:gen-csv:customresourcedefinitions.displayName="VMCluster App" +operator-sdk:gen-csv:customresourcedefinitions.resources="Deployment,apps" +operator-sdk:gen-csv:customresourcedefinitions.resources="Statefulset,apps" +operator-sdk:gen-csv:customresourcedefinitions.resources="Service,v1" +genclient +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:object:root=true +kubebuilder:resource:path=vmclusters,scope=Namespaced +kubebuilder:printcolumn:name="Insert Count",type="string",JSONPath=".spec.vminsert.replicaCount",description="replicas of VMInsert" +kubebuilder:printcolumn:name="Storage Count",type="string",JSONPath=".spec.vmstorage.replicaCount",description="replicas of VMStorage" +kubebuilder:printcolumn:name="Select Count",type="string",JSONPath=".spec.vmselect.replicaCount",description="replicas of VMSelect" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.updateStatus",description="Current status of cluster" +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*VMCluster) AnnotationsFiltered

func (cr *VMCluster) AnnotationsFiltered() map[string]string

AnnotationsFiltered returns global annotations to be applied by objects generate for vmcluster

func (*VMCluster) AsCRDOwner

func (*VMCluster) AsCRDOwner() []metav1.OwnerReference

AsCRDOwner implements interface

func (*VMCluster) AsOwner

func (cr *VMCluster) AsOwner() []metav1.OwnerReference

AsOwner returns owner references with current object as owner

func (*VMCluster) AsURL

func (cr *VMCluster) AsURL() string

AsURL implements stub for interface.

func (*VMCluster) AvailableStorageNodeIDs

func (cr *VMCluster) AvailableStorageNodeIDs(requestsType string) []int32

AvailableStorageNodeIDs returns ids of the storage nodes for the provided component

func (*VMCluster) DeepCopy

func (in *VMCluster) DeepCopy() *VMCluster

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

func (*VMCluster) DeepCopyInto

func (in *VMCluster) DeepCopyInto(out *VMCluster)

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

func (*VMCluster) DeepCopyObject

func (in *VMCluster) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VMCluster) FinalLabels

func (cr *VMCluster) FinalLabels(selectorLabels map[string]string) map[string]string

FinalLabels adds cluster labels to the base labels and filters by prefix if needed

func (*VMCluster) GetNSName

func (cr *VMCluster) GetNSName() string

GetNSName implements build.builderOpts interface

func (*VMCluster) GetServiceAccountName

func (cr *VMCluster) GetServiceAccountName() string

GetServiceAccountName returns service account name for all vmcluster components

func (*VMCluster) GetVMAuthLBName

func (cr *VMCluster) GetVMAuthLBName() string

GetVMAuthLBName returns prefixed name for the loadbalanacer components

func (*VMCluster) GetVMInsertLBName

func (cr *VMCluster) GetVMInsertLBName() string

GetVMInsertLBName returns headless proxy service name for insert component

func (*VMCluster) GetVMInsertName

func (cr *VMCluster) GetVMInsertName() string

GetVMInsertName returns vminsert component name

func (*VMCluster) GetVMSelectLBName

func (cr *VMCluster) GetVMSelectLBName() string

GetVMSelectLBName returns headless proxy service name for select component

func (*VMCluster) GetVMSelectName

func (cr *VMCluster) GetVMSelectName() string

GetInsertName returns select component name

func (*VMCluster) GetVMStorageName

func (cr *VMCluster) GetVMStorageName() string

func (*VMCluster) HasSpecChanges

func (cr *VMCluster) HasSpecChanges() (bool, error)

HasSpecChanges compares cluster spec with last applied cluster spec stored in annotation

func (*VMCluster) IsOwnsServiceAccount

func (cr *VMCluster) IsOwnsServiceAccount() bool

func (*VMCluster) LastAppliedSpecAsPatch

func (cr *VMCluster) LastAppliedSpecAsPatch() (client.Patch, error)

LastAppliedSpecAsPatch return last applied cluster spec as patch annotation

func (*VMCluster) Paused

func (cr *VMCluster) Paused() bool

func (*VMCluster) PrefixedName

func (cr *VMCluster) PrefixedName() string

PrefixedName format name of the component with hard-coded prefix

func (*VMCluster) SelectorLabels

func (cr *VMCluster) SelectorLabels() map[string]string

SelectorLabels defines labels for objects generated used by all cluster components

func (*VMCluster) SetUpdateStatusTo

func (cr *VMCluster) SetUpdateStatusTo(ctx context.Context, c client.Client, status UpdateStatus, maybeErr error) error

SetStatusTo changes update status with optional reason of fail

func (*VMCluster) UnmarshalJSON

func (cr *VMCluster) UnmarshalJSON(src []byte) error

UnmarshalJSON implements json.Unmarshaler interface

func (*VMCluster) VMAuthLBPodAnnotations added in v0.55.0

func (cr *VMCluster) VMAuthLBPodAnnotations() map[string]string

VMAuthLBPodAnnotations returns pod annotations for vmstorage cluster component

func (*VMCluster) VMAuthLBPodLabels added in v0.55.0

func (cr *VMCluster) VMAuthLBPodLabels() map[string]string

VMAuthLBPodLabels returns pod labels for vmclusterlb-vmauth-balancer cluster component

func (*VMCluster) VMAuthLBSelectorLabels

func (cr *VMCluster) VMAuthLBSelectorLabels() map[string]string

VMAuthLBSelectorLabels defines selector labels for vmauth balancer

func (*VMCluster) VMInsertPodAnnotations

func (cr *VMCluster) VMInsertPodAnnotations() map[string]string

VMInsertPodAnnotations returns pod annotations for vminsert cluster component

func (*VMCluster) VMInsertPodLabels

func (cr *VMCluster) VMInsertPodLabels() map[string]string

VMInsertPodLabels returns pod labels for vminsert cluster component

func (*VMCluster) VMInsertSelectorLabels

func (cr *VMCluster) VMInsertSelectorLabels() map[string]string

VMInsertSelectorLabels returns selector labels for vminsert cluster component

func (*VMCluster) VMInsertURL

func (cr *VMCluster) VMInsertURL() string

func (*VMCluster) VMSelectPodAnnotations

func (cr *VMCluster) VMSelectPodAnnotations() map[string]string

VMSelectPodAnnotations returns pod annotations for vmselect cluster component

func (*VMCluster) VMSelectPodLabels

func (cr *VMCluster) VMSelectPodLabels() map[string]string

VMSelectPodLabels returns pod labels for vmselect cluster component

func (*VMCluster) VMSelectSelectorLabels

func (cr *VMCluster) VMSelectSelectorLabels() map[string]string

VMSelectSelectorLabels returns selector labels for vmselect cluster component

func (*VMCluster) VMSelectURL

func (cr *VMCluster) VMSelectURL() string

func (*VMCluster) VMStoragePodAnnotations

func (cr *VMCluster) VMStoragePodAnnotations() map[string]string

VMStoragePodAnnotations returns pod annotations for vmstorage cluster component

func (*VMCluster) VMStoragePodLabels

func (cr *VMCluster) VMStoragePodLabels() map[string]string

VMStoragePodLabels returns pod labels for the vmstorage cluster component

func (*VMCluster) VMStorageSelectorLabels

func (cr *VMCluster) VMStorageSelectorLabels() map[string]string

VMStorageSelectorLabels returns pod labels for vmstorage cluster component

func (*VMCluster) VMStorageURL

func (cr *VMCluster) VMStorageURL() string

func (*VMCluster) Validate added in v0.55.0

func (cr *VMCluster) Validate() error

type VMClusterList

type VMClusterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VMCluster `json:"items"`
}

VMClusterList contains a list of VMCluster +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*VMClusterList) DeepCopy

func (in *VMClusterList) DeepCopy() *VMClusterList

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

func (*VMClusterList) DeepCopyInto

func (in *VMClusterList) DeepCopyInto(out *VMClusterList)

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

func (*VMClusterList) DeepCopyObject

func (in *VMClusterList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VMClusterSpec

type VMClusterSpec struct {
	// ParsingError contents error with context if operator was failed to parse json object from kubernetes api server
	ParsingError string `json:"-" yaml:"-"`
	// RetentionPeriod defines how long to retain stored metrics, specified as a duration (e.g., "1d", "1w", "1m").
	// Data with timestamps outside the RetentionPeriod is automatically deleted. The minimum allowed value is 1d, or 24h.
	// The default value is 1 (one month).
	// See [retention](https://docs.victoriametrics.com/victoriametrics/single-server-victoriametrics/#retention) docs for details.
	// +optional
	// +kubebuilder:validation:Pattern:="^[0-9]+(h|d|y)?$"
	RetentionPeriod string `json:"retentionPeriod,omitempty"`
	// ReplicationFactor defines how many copies of data make among
	// distinct storage nodes
	// +optional
	ReplicationFactor *int32 `json:"replicationFactor,omitempty"`

	// ServiceAccountName is the name of the ServiceAccount to use to run the
	// VMSelect, VMStorage and VMInsert Pods.
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty"`

	// ClusterVersion defines default images tag for all components.
	// it can be overwritten with component specific image.tag value.
	// +optional
	ClusterVersion string `json:"clusterVersion,omitempty"`
	// ClusterDomainName defines domain name suffix for in-cluster dns addresses
	// aka .cluster.local
	// used by vminsert and vmselect to build vmstorage address
	// +optional
	ClusterDomainName string `json:"clusterDomainName,omitempty"`

	// ImagePullSecrets An optional list of references to secrets in the same namespace
	// to use for pulling images from registries
	// see https://kubernetes.io/docs/concepts/containers/images/#referring-to-an-imagepullsecrets-on-a-pod
	// +optional
	ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets,omitempty"`

	// License allows to configure license key to be used for enterprise features.
	// Using license key is supported starting from VictoriaMetrics v1.94.0.
	// See [here](https://docs.victoriametrics.com/enterprise)
	// +optional
	License *License `json:"license,omitempty"`

	// +optional
	VMSelect *VMSelect `json:"vmselect,omitempty"`
	// +optional
	VMInsert *VMInsert `json:"vminsert,omitempty"`
	// +optional
	VMStorage *VMStorage `json:"vmstorage,omitempty"`
	// Paused If set to true all actions on the underlying managed objects are not
	// going to be performed, except for delete actions.
	// +optional
	Paused bool `json:"paused,omitempty"`
	// UseStrictSecurity enables strict security mode for component
	// it restricts disk writes access
	// uses non-root user out of the box
	// drops not needed security permissions
	// +optional
	UseStrictSecurity *bool `json:"useStrictSecurity,omitempty"`

	// RequestsLoadBalancer configures load-balancing for vminsert and vmselect requests.
	// It helps to evenly spread load across pods.
	// Usually it's not possible with Kubernetes TCP-based services.
	// See more [here](https://docs.victoriametrics.com/operator/resources/vmcluster/#requests-load-balancing)
	RequestsLoadBalancer VMAuthLoadBalancer `json:"requestsLoadBalancer,omitempty"`
	// ManagedMetadata defines metadata that will be added to the all objects
	// created by operator for the given CustomResource
	ManagedMetadata *ManagedObjectsMetadata `json:"managedMetadata,omitempty"`
}

VMClusterSpec defines the desired state of VMCluster +k8s:openapi-gen=true

func (*VMClusterSpec) DeepCopy

func (in *VMClusterSpec) DeepCopy() *VMClusterSpec

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

func (*VMClusterSpec) DeepCopyInto

func (in *VMClusterSpec) DeepCopyInto(out *VMClusterSpec)

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

func (*VMClusterSpec) UnmarshalJSON

func (cr *VMClusterSpec) UnmarshalJSON(src []byte) error

UnmarshalJSON implements json.Unmarshaler interface

type VMClusterStatus

type VMClusterStatus struct {
	StatusMetadata `json:",inline"`
	// LegacyStatus is deprecated and will be removed at v0.52.0 version
	LegacyStatus UpdateStatus `json:"clusterStatus,omitempty"`
}

VMClusterStatus defines the observed state of VMCluster

func (*VMClusterStatus) DeepCopy

func (in *VMClusterStatus) DeepCopy() *VMClusterStatus

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

func (*VMClusterStatus) DeepCopyInto

func (in *VMClusterStatus) DeepCopyInto(out *VMClusterStatus)

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

func (*VMClusterStatus) GetStatusMetadata

func (cr *VMClusterStatus) GetStatusMetadata() *StatusMetadata

GetStatusMetadata returns metadata for object status

type VMInsert

type VMInsert struct {
	// PodMetadata configures Labels and Annotations which are propagated to the VMInsert pods.
	PodMetadata *EmbeddedObjectMetadata `json:"podMetadata,omitempty"`
	// LogFormat for VMInsert to be configured with.
	// default or json
	// +optional
	// +kubebuilder:validation:Enum=default;json
	LogFormat string `json:"logFormat,omitempty"`
	// LogLevel for VMInsert to be configured with.
	// +optional
	// +kubebuilder:validation:Enum=INFO;WARN;ERROR;FATAL;PANIC
	LogLevel string `json:"logLevel,omitempty"`

	// InsertPorts - additional listen ports for data ingestion.
	InsertPorts *InsertPorts `json:"insertPorts,omitempty"`

	// ClusterNativePort for multi-level cluster setup.
	// More [details](https://docs.victoriametrics.com/Cluster-VictoriaMetrics#multi-level-cluster-setup)
	// +optional
	ClusterNativePort string `json:"clusterNativeListenPort,omitempty"`

	// ServiceSpec that will be added to vminsert service spec
	// +optional
	ServiceSpec *AdditionalServiceSpec `json:"serviceSpec,omitempty"`
	// ServiceScrapeSpec that will be added to vminsert VMServiceScrape spec
	// +optional
	ServiceScrapeSpec *VMServiceScrapeSpec `json:"serviceScrapeSpec,omitempty"`

	// UpdateStrategy - overrides default update strategy.
	// +kubebuilder:validation:Enum=Recreate;RollingUpdate
	// +optional
	UpdateStrategy *appsv1.DeploymentStrategyType `json:"updateStrategy,omitempty"`
	// RollingUpdate - overrides deployment update params.
	// +optional
	RollingUpdate *appsv1.RollingUpdateDeployment `json:"rollingUpdate,omitempty"`
	// PodDisruptionBudget created by operator
	// +optional
	PodDisruptionBudget *EmbeddedPodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"`
	*EmbeddedProbes     `json:",inline"`
	// HPA defines kubernetes PodAutoScaling configuration version 2.
	HPA *EmbeddedHPA `json:"hpa,omitempty"`

	CommonDefaultableParams           `json:",inline"`
	CommonApplicationDeploymentParams `json:",inline"`
}

func (*VMInsert) DeepCopy

func (in *VMInsert) DeepCopy() *VMInsert

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

func (*VMInsert) DeepCopyInto

func (in *VMInsert) DeepCopyInto(out *VMInsert)

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

func (*VMInsert) GetAdditionalService

func (cr *VMInsert) GetAdditionalService() *AdditionalServiceSpec

GetAdditionalService returns AdditionalServiceSpec settings

func (*VMInsert) GetExtraArgs

func (cr *VMInsert) GetExtraArgs() map[string]string

ExtraArgs returns additionally configured command-line arguments

func (*VMInsert) GetMetricPath

func (cr *VMInsert) GetMetricPath() string

GetMetricPath returns prefixed path for metric requests

func (*VMInsert) GetServiceScrape

func (cr *VMInsert) GetServiceScrape() *VMServiceScrapeSpec

ServiceScrape returns overrides for serviceScrape builder

func (*VMInsert) Probe

func (cr *VMInsert) Probe() *EmbeddedProbes

func (*VMInsert) ProbeNeedLiveness

func (*VMInsert) ProbeNeedLiveness() bool

func (*VMInsert) ProbePath

func (cr *VMInsert) ProbePath() string

func (*VMInsert) ProbePort

func (cr *VMInsert) ProbePort() string

func (*VMInsert) ProbeScheme

func (cr *VMInsert) ProbeScheme() string

type VMNodeScrape

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

	Spec   VMNodeScrapeSpec   `json:"spec,omitempty"`
	Status ScrapeObjectStatus `json:"status,omitempty"`
}

VMNodeScrape defines discovery for targets placed on kubernetes nodes, usually its node-exporters and other host services. InternalIP is used as __address__ for scraping. +kubebuilder:object:root=true +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.updateStatus" +kubebuilder:printcolumn:name="Sync Error",type="string",JSONPath=".status.reason" +genclient

func (*VMNodeScrape) AsMapKey

func (cr *VMNodeScrape) AsMapKey() string

AsMapKey - returns cr name with suffix for token/auth maps.

func (*VMNodeScrape) AsProxyKey

func (cr *VMNodeScrape) AsProxyKey() string

AsProxyKey builds key for proxy cache maps

func (*VMNodeScrape) DeepCopy

func (in *VMNodeScrape) DeepCopy() *VMNodeScrape

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

func (*VMNodeScrape) DeepCopyInto

func (in *VMNodeScrape) DeepCopyInto(out *VMNodeScrape)

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

func (*VMNodeScrape) DeepCopyObject

func (in *VMNodeScrape) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VMNodeScrape) GetStatusMetadata

func (cr *VMNodeScrape) GetStatusMetadata() *StatusMetadata

GetStatusMetadata implements reconcile.objectWithStatus interface

type VMNodeScrapeList

type VMNodeScrapeList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VMNodeScrape `json:"items"`
}

VMNodeScrapeList contains a list of VMNodeScrape

func (*VMNodeScrapeList) DeepCopy

func (in *VMNodeScrapeList) DeepCopy() *VMNodeScrapeList

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

func (*VMNodeScrapeList) DeepCopyInto

func (in *VMNodeScrapeList) DeepCopyInto(out *VMNodeScrapeList)

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

func (*VMNodeScrapeList) DeepCopyObject

func (in *VMNodeScrapeList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VMNodeScrapeSpec

type VMNodeScrapeSpec struct {
	// The label to use to retrieve the job name from.
	// +optional
	JobLabel string `json:"jobLabel,omitempty"`
	// TargetLabels transfers labels on the Kubernetes Node onto the target.
	// +optional
	TargetLabels []string `json:"targetLabels,omitempty"`
	// Name of the port exposed at Node.
	// +optional
	Port                 string `json:"port,omitempty"`
	EndpointRelabelings  `json:",inline"`
	EndpointAuth         `json:",inline"`
	EndpointScrapeParams `json:",inline"`

	// Selector to select kubernetes Nodes.
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.displayName="Service selector"
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.x-descriptors="urn:alm:descriptor:com.tectonic.ui:selector:"
	// +optional
	Selector metav1.LabelSelector `json:"selector,omitempty"`
}

VMNodeScrapeSpec defines specification for VMNodeScrape.

func (*VMNodeScrapeSpec) DeepCopy

func (in *VMNodeScrapeSpec) DeepCopy() *VMNodeScrapeSpec

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

func (*VMNodeScrapeSpec) DeepCopyInto

func (in *VMNodeScrapeSpec) DeepCopyInto(out *VMNodeScrapeSpec)

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

type VMPodScrape

type VMPodScrape struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   VMPodScrapeSpec    `json:"spec,omitempty"`
	Status ScrapeObjectStatus `json:"status,omitempty"`
}

VMPodScrape is scrape configuration for pods, it generates vmagent's config for scraping pod targets based on selectors. +operator-sdk:gen-csv:customresourcedefinitions.displayName="VMPodScrape" +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=vmpodscrapes,scope=Namespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.updateStatus" +kubebuilder:printcolumn:name="Sync Error",type="string",JSONPath=".status.reason" +genclient

func (*VMPodScrape) AsMapKey

func (cr *VMPodScrape) AsMapKey(i int) string

AsMapKey builds key for cache secret map

func (*VMPodScrape) AsProxyKey

func (cr *VMPodScrape) AsProxyKey(i int) string

AsProxyKey builds key for proxy cache maps

func (*VMPodScrape) DeepCopy

func (in *VMPodScrape) DeepCopy() *VMPodScrape

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

func (*VMPodScrape) DeepCopyInto

func (in *VMPodScrape) DeepCopyInto(out *VMPodScrape)

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

func (*VMPodScrape) DeepCopyObject

func (in *VMPodScrape) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VMPodScrape) GetStatusMetadata

func (cr *VMPodScrape) GetStatusMetadata() *StatusMetadata

GetStatusMetadata implements reconcile.objectWithStatus interface

type VMPodScrapeList

type VMPodScrapeList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VMPodScrape `json:"items"`
}

VMPodScrapeList contains a list of VMPodScrape

func (*VMPodScrapeList) DeepCopy

func (in *VMPodScrapeList) DeepCopy() *VMPodScrapeList

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

func (*VMPodScrapeList) DeepCopyInto

func (in *VMPodScrapeList) DeepCopyInto(out *VMPodScrapeList)

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

func (*VMPodScrapeList) DeepCopyObject

func (in *VMPodScrapeList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VMPodScrapeSpec

type VMPodScrapeSpec struct {
	// The label to use to retrieve the job name from.
	// +optional
	JobLabel string `json:"jobLabel,omitempty"`
	// PodTargetLabels transfers labels on the Kubernetes Pod onto the target.
	// +optional
	PodTargetLabels []string `json:"podTargetLabels,omitempty"`
	// A list of endpoints allowed as part of this PodMonitor.
	PodMetricsEndpoints []PodMetricsEndpoint `json:"podMetricsEndpoints"`
	// Selector to select Pod objects.
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.displayName="Pod selector"
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.x-descriptors="urn:alm:descriptor:com.tectonic.ui:selector:"
	// +optional
	Selector metav1.LabelSelector `json:"selector,omitempty"`
	// Selector to select which namespaces the Endpoints objects are discovered from.
	// +optional
	NamespaceSelector NamespaceSelector `json:"namespaceSelector,omitempty"`
	// SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
	// +optional
	SampleLimit uint64 `json:"sampleLimit,omitempty"`
	// SeriesLimit defines per-scrape limit on number of unique time series
	// a single target can expose during all the scrapes on the time window of 24h.
	// +optional
	SeriesLimit uint64 `json:"seriesLimit,omitempty"`
	// AttachMetadata configures metadata attaching from service discovery
	// +optional
	AttachMetadata AttachMetadata `json:"attach_metadata,omitempty"`
}

VMPodScrapeSpec defines the desired state of VMPodScrape

func (*VMPodScrapeSpec) DeepCopy

func (in *VMPodScrapeSpec) DeepCopy() *VMPodScrapeSpec

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

func (*VMPodScrapeSpec) DeepCopyInto

func (in *VMPodScrapeSpec) DeepCopyInto(out *VMPodScrapeSpec)

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

type VMProbe

type VMProbe struct {
	// +optional
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   VMProbeSpec        `json:"spec"`
	Status ScrapeObjectStatus `json:"status,omitempty"`
}

VMProbe defines a probe for targets, that will be executed with prober, like blackbox exporter. It helps to monitor reachability of target with various checks. +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.updateStatus" +kubebuilder:printcolumn:name="Sync Error",type="string",JSONPath=".status.reason" +genclient +k8s:openapi-gen=true

func (*VMProbe) AsMapKey

func (cr *VMProbe) AsMapKey() string

func (*VMProbe) AsProxyKey

func (cr *VMProbe) AsProxyKey() string

AsProxyKey builds key for proxy cache maps

func (*VMProbe) DeepCopy

func (in *VMProbe) DeepCopy() *VMProbe

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

func (*VMProbe) DeepCopyInto

func (in *VMProbe) DeepCopyInto(out *VMProbe)

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

func (*VMProbe) DeepCopyObject

func (in *VMProbe) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VMProbe) GetStatusMetadata

func (cr *VMProbe) GetStatusMetadata() *StatusMetadata

GetStatusMetadata implements reconcile.objectWithStatus interface

type VMProbeList

type VMProbeList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VMProbe `json:"items"`
}

VMProbeList contains a list of VMProbe +kubebuilder:object:root=true

func (*VMProbeList) DeepCopy

func (in *VMProbeList) DeepCopy() *VMProbeList

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

func (*VMProbeList) DeepCopyInto

func (in *VMProbeList) DeepCopyInto(out *VMProbeList)

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

func (*VMProbeList) DeepCopyObject

func (in *VMProbeList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VMProbeSpec

type VMProbeSpec struct {
	// The job name assigned to scraped metrics by default.
	JobName string `json:"jobName,omitempty"`
	// Specification for the prober to use for probing targets.
	// The prober.URL parameter is required. Targets cannot be probed if left empty.
	VMProberSpec VMProberSpec `json:"vmProberSpec"`
	// The module to use for probing specifying how to probe the target.
	// Example module configuring in the blackbox exporter:
	// https://github.com/prometheus/blackbox_exporter/blob/master/example.yml
	Module string `json:"module,omitempty"`
	// Targets defines a set of static and/or dynamically discovered targets to be probed using the prober.
	Targets VMProbeTargets `json:"targets,omitempty"`
	// MetricRelabelConfigs to apply to samples after scrapping.
	// +optional
	MetricRelabelConfigs []*RelabelConfig `json:"metricRelabelConfigs,omitempty"`

	EndpointAuth         `json:",inline"`
	EndpointScrapeParams `json:",inline"`
}

VMProbeSpec contains specification parameters for a Probe. +k8s:openapi-gen=true

func (*VMProbeSpec) DeepCopy

func (in *VMProbeSpec) DeepCopy() *VMProbeSpec

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

func (*VMProbeSpec) DeepCopyInto

func (in *VMProbeSpec) DeepCopyInto(out *VMProbeSpec)

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

type VMProbeTargetStaticConfig

type VMProbeTargetStaticConfig struct {
	// Targets is a list of URLs to probe using the configured prober.
	Targets []string `json:"targets"`
	// Labels assigned to all metrics scraped from the targets.
	Labels map[string]string `json:"labels,omitempty"`
	// RelabelConfigs to apply to samples during service discovery.
	RelabelConfigs []*RelabelConfig `json:"relabelingConfigs,omitempty"`
}

VMProbeTargetStaticConfig defines the set of static targets considered for probing. +k8s:openapi-gen=true

func (*VMProbeTargetStaticConfig) DeepCopy

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

func (*VMProbeTargetStaticConfig) DeepCopyInto

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

type VMProbeTargets

type VMProbeTargets struct {
	// StaticConfig defines static targets which are considers for probing.
	StaticConfig *VMProbeTargetStaticConfig `json:"staticConfig,omitempty"`
	// Ingress defines the set of dynamically discovered ingress objects which hosts are considered for probing.
	Ingress *ProbeTargetIngress `json:"ingress,omitempty"`
}

VMProbeTargets defines a set of static and dynamically discovered targets for the prober. +k8s:openapi-gen=true

func (*VMProbeTargets) DeepCopy

func (in *VMProbeTargets) DeepCopy() *VMProbeTargets

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

func (*VMProbeTargets) DeepCopyInto

func (in *VMProbeTargets) DeepCopyInto(out *VMProbeTargets)

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

type VMProberSpec

type VMProberSpec struct {
	// Mandatory URL of the prober.
	URL string `json:"url"`
	// HTTP scheme to use for scraping.
	// Defaults to `http`.
	// +optional
	// +kubebuilder:validation:Enum=http;https
	Scheme string `json:"scheme,omitempty"`
	// Path to collect metrics from.
	// Defaults to `/probe`.
	Path string `json:"path,omitempty"`
}

VMProberSpec contains specification parameters for the Prober used for probing. +k8s:openapi-gen=true

func (*VMProberSpec) DeepCopy

func (in *VMProberSpec) DeepCopy() *VMProberSpec

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

func (*VMProberSpec) DeepCopyInto

func (in *VMProberSpec) DeepCopyInto(out *VMProberSpec)

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

type VMRestore

type VMRestore struct {
	// OnStart defines configuration for restore on pod start
	// +optional
	OnStart *VMRestoreOnStartConfig `json:"onStart,omitempty"`
}

VMRestore defines config options for vmrestore start-up

func (*VMRestore) DeepCopy

func (in *VMRestore) DeepCopy() *VMRestore

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

func (*VMRestore) DeepCopyInto

func (in *VMRestore) DeepCopyInto(out *VMRestore)

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

type VMRestoreOnStartConfig

type VMRestoreOnStartConfig struct {
	// Enabled defines if restore on start enabled
	// +optional
	Enabled bool `json:"enabled,omitempty"`
}

VMRestoreOnStartConfig controls vmrestore setting

func (*VMRestoreOnStartConfig) DeepCopy

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

func (*VMRestoreOnStartConfig) DeepCopyInto

func (in *VMRestoreOnStartConfig) DeepCopyInto(out *VMRestoreOnStartConfig)

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

type VMRule

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

	Spec VMRuleSpec `json:"spec"`
	// +optional
	Status VMRuleStatus `json:"status,omitempty"`
}

VMRule defines rule records for vmalert application +operator-sdk:gen-csv:customresourcedefinitions.displayName="VMRule" +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=vmrules,scope=Namespaced +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.updateStatus" +kubebuilder:printcolumn:name="Sync Error",type="string",JSONPath=".status.reason" +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*VMRule) DeepCopy

func (in *VMRule) DeepCopy() *VMRule

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

func (*VMRule) DeepCopyInto

func (in *VMRule) DeepCopyInto(out *VMRule)

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

func (*VMRule) DeepCopyObject

func (in *VMRule) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VMRule) GetStatusMetadata

func (cr *VMRule) GetStatusMetadata() *StatusMetadata

GetStatusMetadata implements reconcile.objectWithStatus interface

func (*VMRule) Validate

func (cr *VMRule) Validate() error

Validate performs semantic validation of object

type VMRuleList

type VMRuleList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	// Items list of VMRule
	Items []VMRule `json:"items"`
}

VMRuleList contains a list of VMRule

func (*VMRuleList) DeepCopy

func (in *VMRuleList) DeepCopy() *VMRuleList

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

func (*VMRuleList) DeepCopyInto

func (in *VMRuleList) DeepCopyInto(out *VMRuleList)

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

func (*VMRuleList) DeepCopyObject

func (in *VMRuleList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VMRuleSpec

type VMRuleSpec struct {
	// Groups list of group rules
	Groups []RuleGroup `json:"groups"`
}

VMRuleSpec defines the desired state of VMRule

func (*VMRuleSpec) DeepCopy

func (in *VMRuleSpec) DeepCopy() *VMRuleSpec

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

func (*VMRuleSpec) DeepCopyInto

func (in *VMRuleSpec) DeepCopyInto(out *VMRuleSpec)

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

type VMRuleStatus

type VMRuleStatus struct {
	StatusMetadata `json:",inline"`
}

VMRuleStatus defines the observed state of VMRule

func (*VMRuleStatus) DeepCopy

func (in *VMRuleStatus) DeepCopy() *VMRuleStatus

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

func (*VMRuleStatus) DeepCopyInto

func (in *VMRuleStatus) DeepCopyInto(out *VMRuleStatus)

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

type VMScrapeConfig

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

	Spec   VMScrapeConfigSpec `json:"spec,omitempty"`
	Status ScrapeObjectStatus `json:"status,omitempty"`
}

VMScrapeConfig specifies a set of targets and parameters describing how to scrape them. +operator-sdk:gen-csv:customresourcedefinitions.displayName="VMScrapeConfig" +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=vmscrapeconfigs,scope=Namespaced +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.updateStatus" +kubebuilder:printcolumn:name="Sync Error",type="string",JSONPath=".status.reason" +genclient

func (*VMScrapeConfig) AsMapKey

func (cr *VMScrapeConfig) AsMapKey(prefix string, i int) string

AsMapKey - returns cr name with suffix for token/auth maps.

func (*VMScrapeConfig) AsProxyKey

func (cr *VMScrapeConfig) AsProxyKey(prefix string, i int) string

AsProxyKey builds key for proxy cache maps

func (*VMScrapeConfig) DeepCopy

func (in *VMScrapeConfig) DeepCopy() *VMScrapeConfig

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

func (*VMScrapeConfig) DeepCopyInto

func (in *VMScrapeConfig) DeepCopyInto(out *VMScrapeConfig)

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

func (*VMScrapeConfig) DeepCopyObject

func (in *VMScrapeConfig) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VMScrapeConfig) GetStatusMetadata

func (cr *VMScrapeConfig) GetStatusMetadata() *StatusMetadata

GetStatusMetadata implements reconcile.objectWithStatus interface

type VMScrapeConfigList

type VMScrapeConfigList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VMScrapeConfig `json:"items"`
}

VMScrapeConfigList contains a list of VMScrapeConfig

func (*VMScrapeConfigList) DeepCopy

func (in *VMScrapeConfigList) DeepCopy() *VMScrapeConfigList

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

func (*VMScrapeConfigList) DeepCopyInto

func (in *VMScrapeConfigList) DeepCopyInto(out *VMScrapeConfigList)

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

func (*VMScrapeConfigList) DeepCopyObject

func (in *VMScrapeConfigList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VMScrapeConfigSpec

type VMScrapeConfigSpec 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"`
	EndpointScrapeParams  `json:",inline"`
	EndpointRelabelings   `json:",inline"`
	EndpointAuth          `json:",inline"`
}

VMScrapeConfigSpec defines the desired state of VMScrapeConfig

func (*VMScrapeConfigSpec) DeepCopy

func (in *VMScrapeConfigSpec) DeepCopy() *VMScrapeConfigSpec

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

func (*VMScrapeConfigSpec) DeepCopyInto

func (in *VMScrapeConfigSpec) DeepCopyInto(out *VMScrapeConfigSpec)

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

type VMScrapeParams

type VMScrapeParams struct {
	// DisableCompression
	// +optional
	DisableCompression *bool `json:"disable_compression,omitempty"`
	// disable_keepalive allows disabling HTTP keep-alive when scraping targets.
	// By default, HTTP keep-alive is enabled, so TCP connections to scrape targets
	// could be reused.
	// See https://docs.victoriametrics.com/vmagent#scrape_config-enhancements
	// +optional
	DisableKeepAlive *bool `json:"disable_keep_alive,omitempty"`
	// +optional
	DisableStaleMarkers *bool `json:"no_stale_markers,omitempty"`
	// +optional
	StreamParse *bool `json:"stream_parse,omitempty"`
	// +optional
	ScrapeAlignInterval *string `json:"scrape_align_interval,omitempty"`
	// +optional
	ScrapeOffset *string `json:"scrape_offset,omitempty"`
	// ProxyClientConfig configures proxy auth settings for scraping
	// See feature description https://docs.victoriametrics.com/vmagent#scraping-targets-via-a-proxy
	// +optional
	ProxyClientConfig *ProxyAuth `json:"proxy_client_config,omitempty"`
	// Headers allows sending custom headers to scrape targets
	// must be in of semicolon separated header with it's value
	// eg:
	// headerName: headerValue
	// vmagent supports since 1.79.0 version
	// +optional
	Headers []string `json:"headers,omitempty"`
}

VMScrapeParams defines scrape target configuration that compatible only with VictoriaMetrics scrapers VMAgent and VMSingle

func (*VMScrapeParams) DeepCopy

func (in *VMScrapeParams) DeepCopy() *VMScrapeParams

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

func (*VMScrapeParams) DeepCopyInto

func (in *VMScrapeParams) DeepCopyInto(out *VMScrapeParams)

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

type VMSelect

type VMSelect struct {
	// PodMetadata configures Labels and Annotations which are propagated to the VMSelect pods.
	PodMetadata *EmbeddedObjectMetadata `json:"podMetadata,omitempty"`
	// LogFormat for VMSelect to be configured with.
	// default or json
	// +optional
	// +kubebuilder:validation:Enum=default;json
	LogFormat string `json:"logFormat,omitempty"`
	// LogLevel for VMSelect to be configured with.
	// +optional
	// +kubebuilder:validation:Enum=INFO;WARN;ERROR;FATAL;PANIC
	LogLevel string `json:"logLevel,omitempty"`
	// CacheMountPath allows to add cache persistent for VMSelect,
	// will use "/cache" as default if not specified.
	// +optional
	CacheMountPath string `json:"cacheMountPath,omitempty"`

	// Storage - add persistent volume for cacheMountPath
	// its useful for persistent cache
	// use storage instead of persistentVolume.
	// +deprecated
	// +optional
	Storage *StorageSpec `json:"persistentVolume,omitempty"`
	// StorageSpec - add persistent volume claim for cacheMountPath
	// its needed for persistent cache
	// +optional
	StorageSpec *StorageSpec `json:"storage,omitempty"`
	// ClusterNativePort for multi-level cluster setup.
	// More [details](https://docs.victoriametrics.com/Cluster-VictoriaMetrics#multi-level-cluster-setup)
	// +optional
	ClusterNativePort string `json:"clusterNativeListenPort,omitempty"`

	// ServiceSpec that will be added to vmselect service spec
	// +optional
	ServiceSpec *AdditionalServiceSpec `json:"serviceSpec,omitempty"`
	// ServiceScrapeSpec that will be added to vmselect VMServiceScrape spec
	// +optional
	ServiceScrapeSpec *VMServiceScrapeSpec `json:"serviceScrapeSpec,omitempty"`
	// PodDisruptionBudget created by operator
	// +optional
	PodDisruptionBudget *EmbeddedPodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"`
	*EmbeddedProbes     `json:",inline"`
	// Configures horizontal pod autoscaling.
	// Note, enabling this option disables vmselect to vmselect communication. In most cases it's not an issue.
	// +optional
	HPA *EmbeddedHPA `json:"hpa,omitempty"`
	// RollingUpdateStrategy defines strategy for application updates
	// Default is OnDelete, in this case operator handles update process
	// Can be changed for RollingUpdate
	// +optional
	RollingUpdateStrategy appsv1.StatefulSetUpdateStrategyType `json:"rollingUpdateStrategy,omitempty"`
	// ClaimTemplates allows adding additional VolumeClaimTemplates for StatefulSet
	ClaimTemplates []v1.PersistentVolumeClaim `json:"claimTemplates,omitempty"`

	CommonDefaultableParams           `json:",inline"`
	CommonApplicationDeploymentParams `json:",inline"`
}

VMSelect defines configuration section for vmselect components of the victoria-metrics cluster

func (*VMSelect) DeepCopy

func (in *VMSelect) DeepCopy() *VMSelect

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

func (*VMSelect) DeepCopyInto

func (in *VMSelect) DeepCopyInto(out *VMSelect)

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

func (*VMSelect) GetAdditionalService

func (cr *VMSelect) GetAdditionalService() *AdditionalServiceSpec

GetAdditionalService returns AdditionalServiceSpec settings

func (*VMSelect) GetCacheMountVolumeName

func (cr *VMSelect) GetCacheMountVolumeName() string

GetCacheMountVolumeName returns formatted name for vmselect volume

func (*VMSelect) GetExtraArgs

func (cr *VMSelect) GetExtraArgs() map[string]string

ExtraArgs returns additionally configured command-line arguments

func (*VMSelect) GetMetricPath

func (cr *VMSelect) GetMetricPath() string

GetMetricPath returns prefixed path for metric requests

func (*VMSelect) GetServiceScrape

func (cr *VMSelect) GetServiceScrape() *VMServiceScrapeSpec

ServiceScrape returns overrides for serviceScrape builder

func (*VMSelect) Probe

func (cr *VMSelect) Probe() *EmbeddedProbes

func (*VMSelect) ProbeNeedLiveness

func (*VMSelect) ProbeNeedLiveness() bool

func (*VMSelect) ProbePath

func (cr *VMSelect) ProbePath() string

func (*VMSelect) ProbePort

func (cr *VMSelect) ProbePort() string

func (*VMSelect) ProbeScheme

func (cr *VMSelect) ProbeScheme() string

type VMServiceScrape

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

	Spec   VMServiceScrapeSpec `json:"spec"`
	Status ScrapeObjectStatus  `json:"status,omitempty"`
}

VMServiceScrape is scrape configuration for endpoints associated with kubernetes service, it generates scrape configuration for vmagent based on selectors. result config will scrape service endpoints +operator-sdk:gen-csv:customresourcedefinitions.displayName="VMServiceScrape" +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=vmservicescrapes,scope=Namespaced +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.updateStatus" +kubebuilder:printcolumn:name="Sync Error",type="string",JSONPath=".status.reason" +genclient

func (*VMServiceScrape) AsMapKey

func (cr *VMServiceScrape) AsMapKey(i int) string

AsMapKey - returns cr name with suffix for token/auth maps.

func (*VMServiceScrape) AsProxyKey

func (cr *VMServiceScrape) AsProxyKey(i int) string

AsProxyKey builds key for proxy cache maps

func (*VMServiceScrape) DeepCopy

func (in *VMServiceScrape) DeepCopy() *VMServiceScrape

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

func (*VMServiceScrape) DeepCopyInto

func (in *VMServiceScrape) DeepCopyInto(out *VMServiceScrape)

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

func (*VMServiceScrape) DeepCopyObject

func (in *VMServiceScrape) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VMServiceScrape) GetStatusMetadata

func (cr *VMServiceScrape) GetStatusMetadata() *StatusMetadata

GetStatusMetadata implements reconcile.objectWithStatus interface

type VMServiceScrapeList

type VMServiceScrapeList struct {
	metav1.TypeMeta `json:",inline"`
	// +optional
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VMServiceScrape `json:"items"`
}

VMServiceScrapeList contains a list of VMServiceScrape

func (*VMServiceScrapeList) DeepCopy

func (in *VMServiceScrapeList) DeepCopy() *VMServiceScrapeList

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

func (*VMServiceScrapeList) DeepCopyInto

func (in *VMServiceScrapeList) DeepCopyInto(out *VMServiceScrapeList)

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

func (*VMServiceScrapeList) DeepCopyObject

func (in *VMServiceScrapeList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VMServiceScrapeSpec

type VMServiceScrapeSpec struct {
	// DiscoveryRole - defines kubernetes_sd role for objects discovery.
	// by default, its endpoints.
	// can be changed to service or endpointslices.
	// note, that with service setting, you have to use port: "name"
	// and cannot use targetPort for endpoints.
	// +optional
	// +kubebuilder:validation:Enum=endpoints;service;endpointslices
	DiscoveryRole string `json:"discoveryRole,omitempty"`
	// The label to use to retrieve the job name from.
	// +optional
	JobLabel string `json:"jobLabel,omitempty"`
	// TargetLabels transfers labels on the Kubernetes Service onto the target.
	// +optional
	TargetLabels []string `json:"targetLabels,omitempty"`
	// PodTargetLabels transfers labels on the Kubernetes Pod onto the target.
	// +optional
	PodTargetLabels []string `json:"podTargetLabels,omitempty"`
	// A list of endpoints allowed as part of this ServiceScrape.
	Endpoints []Endpoint `json:"endpoints"`
	// Selector to select Endpoints objects by corresponding Service labels.
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.displayName="Service selector"
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.x-descriptors="urn:alm:descriptor:com.tectonic.ui:selector:"
	// +optional
	Selector metav1.LabelSelector `json:"selector,omitempty"`
	// Selector to select which namespaces the Endpoints objects are discovered from.
	// +optional
	NamespaceSelector NamespaceSelector `json:"namespaceSelector,omitempty"`
	// SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
	// +optional
	SampleLimit uint64 `json:"sampleLimit,omitempty"`
	// SeriesLimit defines per-scrape limit on number of unique time series
	// a single target can expose during all the scrapes on the time window of 24h.
	// +optional
	SeriesLimit uint64 `json:"seriesLimit,omitempty"`
	// AttachMetadata configures metadata attaching from service discovery
	// +optional
	AttachMetadata AttachMetadata `json:"attach_metadata,omitempty"`
}

VMServiceScrapeSpec defines the desired state of VMServiceScrape

func (*VMServiceScrapeSpec) DeepCopy

func (in *VMServiceScrapeSpec) DeepCopy() *VMServiceScrapeSpec

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

func (*VMServiceScrapeSpec) DeepCopyInto

func (in *VMServiceScrapeSpec) DeepCopyInto(out *VMServiceScrapeSpec)

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

type VMSingle

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

	Spec VMSingleSpec `json:"spec,omitempty"`
	// ParsedLastAppliedSpec contains last-applied configuration spec
	ParsedLastAppliedSpec *VMSingleSpec `json:"-" yaml:"-"`

	Status VMSingleStatus `json:"status,omitempty"`
}

VMSingle is fast, cost-effective and scalable time-series database. +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +operator-sdk:gen-csv:customresourcedefinitions.displayName="VMSingle App" +operator-sdk:gen-csv:customresourcedefinitions.resources="Deployment,apps" +operator-sdk:gen-csv:customresourcedefinitions.resources="Service,v1" +operator-sdk:gen-csv:customresourcedefinitions.resources="Secret,v1" +genclient +k8s:openapi-gen=true +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:path=vmsingles,scope=Namespaced +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.updateStatus",description="Current status of single node update process" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

func (*VMSingle) AllLabels

func (cr *VMSingle) AllLabels() map[string]string

func (*VMSingle) AnnotationsFiltered

func (cr *VMSingle) AnnotationsFiltered() map[string]string

func (*VMSingle) AsCRDOwner

func (*VMSingle) AsCRDOwner() []metav1.OwnerReference

AsCRDOwner implements interface

func (*VMSingle) AsOwner

func (cr *VMSingle) AsOwner() []metav1.OwnerReference

AsOwner returns owner references with current object as owner

func (*VMSingle) AsURL

func (cr *VMSingle) AsURL() string

func (*VMSingle) DeepCopy

func (in *VMSingle) DeepCopy() *VMSingle

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

func (*VMSingle) DeepCopyInto

func (in *VMSingle) DeepCopyInto(out *VMSingle)

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

func (*VMSingle) DeepCopyObject

func (in *VMSingle) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VMSingle) GetAdditionalService

func (cr *VMSingle) GetAdditionalService() *AdditionalServiceSpec

GetAdditionalService returns AdditionalServiceSpec settings

func (*VMSingle) GetExtraArgs

func (cr *VMSingle) GetExtraArgs() map[string]string

ExtraArgs returns additionally configured command-line arguments

func (*VMSingle) GetMetricPath

func (cr *VMSingle) GetMetricPath() string

GetMetricPath returns prefixed path for metric requests

func (*VMSingle) GetNSName

func (cr *VMSingle) GetNSName() string

GetNSName implements build.builderOpts interface

func (*VMSingle) GetServiceAccountName

func (cr *VMSingle) GetServiceAccountName() string

func (*VMSingle) GetServiceScrape

func (cr *VMSingle) GetServiceScrape() *VMServiceScrapeSpec

ServiceScrape returns overrides for serviceScrape builder

func (*VMSingle) HasAnyStreamAggrRule

func (cr *VMSingle) HasAnyStreamAggrRule() bool

HasAnyStreamAggrRule checks if vmsingle has any defined aggregation rules

func (*VMSingle) HasSpecChanges

func (cr *VMSingle) HasSpecChanges() (bool, error)

HasSpecChanges compares single spec with last applied single spec stored in annotation

func (*VMSingle) IsOwnsServiceAccount

func (cr *VMSingle) IsOwnsServiceAccount() bool

func (*VMSingle) LastAppliedSpecAsPatch

func (cr *VMSingle) LastAppliedSpecAsPatch() (client.Patch, error)

LastAppliedSpecAsPatch return last applied single spec as patch annotation

func (*VMSingle) Paused

func (cr *VMSingle) Paused() bool

func (*VMSingle) PodAnnotations

func (cr *VMSingle) PodAnnotations() map[string]string

func (*VMSingle) PodLabels

func (cr *VMSingle) PodLabels() map[string]string

func (*VMSingle) PrefixedName

func (cr *VMSingle) PrefixedName() string

func (*VMSingle) Probe

func (cr *VMSingle) Probe() *EmbeddedProbes

func (*VMSingle) ProbeNeedLiveness

func (cr *VMSingle) ProbeNeedLiveness() bool

func (*VMSingle) ProbePath

func (cr *VMSingle) ProbePath() string

func (*VMSingle) ProbePort

func (cr *VMSingle) ProbePort() string

func (*VMSingle) ProbeScheme

func (cr *VMSingle) ProbeScheme() string

func (*VMSingle) SelectorLabels

func (cr *VMSingle) SelectorLabels() map[string]string

func (*VMSingle) SetUpdateStatusTo

func (cr *VMSingle) SetUpdateStatusTo(ctx context.Context, c client.Client, status UpdateStatus, maybeErr error) error

SetStatusTo changes update status with optional reason of fail

func (*VMSingle) StreamAggrConfigName

func (cr *VMSingle) StreamAggrConfigName() string

func (*VMSingle) UnmarshalJSON

func (cr *VMSingle) UnmarshalJSON(src []byte) error

UnmarshalJSON implements json.Unmarshaler interface

func (*VMSingle) Validate added in v0.55.0

func (cr *VMSingle) Validate() error

type VMSingleList

type VMSingleList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VMSingle `json:"items"`
}

VMSingleList contains a list of VMSingle +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object

func (*VMSingleList) DeepCopy

func (in *VMSingleList) DeepCopy() *VMSingleList

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

func (*VMSingleList) DeepCopyInto

func (in *VMSingleList) DeepCopyInto(out *VMSingleList)

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

func (*VMSingleList) DeepCopyObject

func (in *VMSingleList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VMSingleSpec

type VMSingleSpec struct {
	// ParsingError contents error with context if operator was failed to parse json object from kubernetes api server
	ParsingError string `json:"-" yaml:"-"`
	// PodMetadata configures Labels and Annotations which are propagated to the VMSingle pods.
	// +optional
	PodMetadata *EmbeddedObjectMetadata `json:"podMetadata,omitempty"`
	// ManagedMetadata defines metadata that will be added to the all objects
	// created by operator for the given CustomResource
	ManagedMetadata *ManagedObjectsMetadata `json:"managedMetadata,omitempty"`
	// LogLevel for victoria metrics single to be configured with.
	// +optional
	// +kubebuilder:validation:Enum=INFO;WARN;ERROR;FATAL;PANIC
	LogLevel string `json:"logLevel,omitempty"`
	// LogFormat for VMSingle to be configured with.
	// +optional
	// +kubebuilder:validation:Enum=default;json
	LogFormat string `json:"logFormat,omitempty"`
	// StorageDataPath disables spec.storage option and overrides arg for victoria-metrics binary --storageDataPath,
	// its users responsibility to mount proper device into given path.
	// It requires to provide spec.volumes and spec.volumeMounts with at least 1 value
	// +optional
	StorageDataPath string `json:"storageDataPath,omitempty"`
	// Storage is the definition of how storage will be used by the VMSingle
	// by default it`s empty dir
	// this option is ignored if storageDataPath is set
	// +optional
	Storage *v1.PersistentVolumeClaimSpec `json:"storage,omitempty"`

	// StorageMeta defines annotations and labels attached to PVC for given vmsingle CR
	// +optional
	StorageMetadata EmbeddedObjectMetadata `json:"storageMetadata,omitempty"`

	// InsertPorts - additional listen ports for data ingestion.
	InsertPorts *InsertPorts `json:"insertPorts,omitempty"`
	// RemovePvcAfterDelete - if true, controller adds ownership to pvc
	// and after VMSingle object deletion - pvc will be garbage collected
	// by controller manager
	// +optional
	RemovePvcAfterDelete bool `json:"removePvcAfterDelete,omitempty"`

	// RetentionPeriod defines how long to retain stored metrics, specified as a duration (e.g., "1d", "1w", "1m").
	// Data with timestamps outside the RetentionPeriod is automatically deleted. The minimum allowed value is 1d, or 24h.
	// The default value is 1 (one month).
	// See [retention](https://docs.victoriametrics.com/victoriametrics/single-server-victoriametrics/#retention) docs for details.
	// +optional
	// +kubebuilder:validation:Pattern:="^[0-9]+(h|d|y)?$"
	RetentionPeriod string `json:"retentionPeriod,omitempty"`
	// VMBackup configuration for backup
	// +optional
	VMBackup *VMBackup `json:"vmBackup,omitempty"`
	// License allows to configure license key to be used for enterprise features.
	// Using license key is supported starting from VictoriaMetrics v1.94.0.
	// See [here](https://docs.victoriametrics.com/enterprise)
	// +optional
	License *License `json:"license,omitempty"`
	// ServiceSpec that will be added to vmsingle service spec
	// +optional
	ServiceSpec *AdditionalServiceSpec `json:"serviceSpec,omitempty"`
	// ServiceScrapeSpec that will be added to vmsingle VMServiceScrape spec
	// +optional
	ServiceScrapeSpec *VMServiceScrapeSpec `json:"serviceScrapeSpec,omitempty"`
	// LivenessProbe that will be added to VMSingle pod
	*EmbeddedProbes `json:",inline"`
	// StreamAggrConfig defines stream aggregation configuration for VMSingle
	StreamAggrConfig *StreamAggrConfig `json:"streamAggrConfig,omitempty"`

	// ServiceAccountName is the name of the ServiceAccount to use to run the pods
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty"`

	CommonDefaultableParams           `json:",inline"`
	CommonApplicationDeploymentParams `json:",inline"`
}

VMSingleSpec defines the desired state of VMSingle +k8s:openapi-gen=true

func (*VMSingleSpec) DeepCopy

func (in *VMSingleSpec) DeepCopy() *VMSingleSpec

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

func (*VMSingleSpec) DeepCopyInto

func (in *VMSingleSpec) DeepCopyInto(out *VMSingleSpec)

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

func (*VMSingleSpec) UnmarshalJSON

func (cr *VMSingleSpec) UnmarshalJSON(src []byte) error

UnmarshalJSON implements json.Unmarshaler interface

type VMSingleStatus

type VMSingleStatus struct {
	StatusMetadata `json:",inline"`
	// LegacyStatus is deprecated and will be removed at v0.52.0 version
	LegacyStatus UpdateStatus `json:"singleStatus,omitempty"`
}

VMSingleStatus defines the observed state of VMSingle +k8s:openapi-gen=true

func (*VMSingleStatus) DeepCopy

func (in *VMSingleStatus) DeepCopy() *VMSingleStatus

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

func (*VMSingleStatus) DeepCopyInto

func (in *VMSingleStatus) DeepCopyInto(out *VMSingleStatus)

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

func (*VMSingleStatus) GetStatusMetadata

func (cr *VMSingleStatus) GetStatusMetadata() *StatusMetadata

GetStatusMetadata returns metadata for object status

type VMStaticScrape

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

	Spec   VMStaticScrapeSpec `json:"spec,omitempty"`
	Status ScrapeObjectStatus `json:"status,omitempty"`
}

VMStaticScrape defines static targets configuration for scraping. +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.updateStatus" +kubebuilder:printcolumn:name="Sync Error",type="string",JSONPath=".status.reason" +genclient

func (*VMStaticScrape) AsMapKey

func (cr *VMStaticScrape) AsMapKey(i int) string

AsMapKey builds key for cache secret map

func (*VMStaticScrape) AsProxyKey

func (cr *VMStaticScrape) AsProxyKey(i int) string

AsProxyKey builds key for proxy cache maps

func (*VMStaticScrape) DeepCopy

func (in *VMStaticScrape) DeepCopy() *VMStaticScrape

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

func (*VMStaticScrape) DeepCopyInto

func (in *VMStaticScrape) DeepCopyInto(out *VMStaticScrape)

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

func (*VMStaticScrape) DeepCopyObject

func (in *VMStaticScrape) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VMStaticScrape) GetStatusMetadata

func (cr *VMStaticScrape) GetStatusMetadata() *StatusMetadata

GetStatusMetadata implements reconcile.objectWithStatus interface

type VMStaticScrapeList

type VMStaticScrapeList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VMStaticScrape `json:"items"`
}

+kubebuilder:object:root=true VMStaticScrapeList contains a list of VMStaticScrape

func (*VMStaticScrapeList) DeepCopy

func (in *VMStaticScrapeList) DeepCopy() *VMStaticScrapeList

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

func (*VMStaticScrapeList) DeepCopyInto

func (in *VMStaticScrapeList) DeepCopyInto(out *VMStaticScrapeList)

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

func (*VMStaticScrapeList) DeepCopyObject

func (in *VMStaticScrapeList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VMStaticScrapeSpec

type VMStaticScrapeSpec struct {
	// JobName name of job.
	JobName string `json:"jobName,omitempty"`
	// A list of target endpoints to scrape metrics from.
	TargetEndpoints []*TargetEndpoint `json:"targetEndpoints"`
	// SampleLimit defines per-scrape limit on number of scraped samples that will be accepted.
	// +optional
	SampleLimit uint64 `json:"sampleLimit,omitempty"`
	// SeriesLimit defines per-scrape limit on number of unique time series
	// a single target can expose during all the scrapes on the time window of 24h.
	// +optional
	SeriesLimit uint64 `json:"seriesLimit,omitempty"`
}

VMStaticScrapeSpec defines the desired state of VMStaticScrape.

func (*VMStaticScrapeSpec) DeepCopy

func (in *VMStaticScrapeSpec) DeepCopy() *VMStaticScrapeSpec

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

func (*VMStaticScrapeSpec) DeepCopyInto

func (in *VMStaticScrapeSpec) DeepCopyInto(out *VMStaticScrapeSpec)

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

type VMStorage

type VMStorage struct {
	// PodMetadata configures Labels and Annotations which are propagated to the VMStorage pods.
	PodMetadata *EmbeddedObjectMetadata `json:"podMetadata,omitempty"`
	// LogFormat for VMStorage to be configured with.
	// default or json
	// +optional
	// +kubebuilder:validation:Enum=default;json
	LogFormat string `json:"logFormat,omitempty"`
	// LogLevel for VMStorage to be configured with.
	// +optional
	// +kubebuilder:validation:Enum=INFO;WARN;ERROR;FATAL;PANIC
	LogLevel string `json:"logLevel,omitempty"`
	// StorageDataPath - path to storage data
	// +optional
	StorageDataPath string `json:"storageDataPath,omitempty"`
	// Storage - add persistent volume for StorageDataPath
	// its useful for persistent cache
	// +optional
	Storage *StorageSpec `json:"storage,omitempty"`

	// VMInsertPort for VMInsert connections
	// +optional
	VMInsertPort string `json:"vmInsertPort,omitempty"`

	// VMSelectPort for VMSelect connections
	// +optional
	VMSelectPort string `json:"vmSelectPort,omitempty"`

	// VMBackup configuration for backup
	// +optional
	VMBackup *VMBackup `json:"vmBackup,omitempty"`
	// ServiceSpec that will be create additional service for vmstorage
	// +optional
	ServiceSpec *AdditionalServiceSpec `json:"serviceSpec,omitempty"`
	// ServiceScrapeSpec that will be added to vmstorage VMServiceScrape spec
	// +optional
	ServiceScrapeSpec *VMServiceScrapeSpec `json:"serviceScrapeSpec,omitempty"`
	// PodDisruptionBudget created by operator
	// +optional
	PodDisruptionBudget *EmbeddedPodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"`
	*EmbeddedProbes     `json:",inline"`
	// MaintenanceInsertNodeIDs - excludes given node ids from insert requests routing, must contain pod suffixes - for pod-0, id will be 0 and etc.
	// lets say, you have pod-0, pod-1, pod-2, pod-3. to exclude pod-0 and pod-3 from insert routing, define nodeIDs: [0,3].
	// Useful at storage expanding, when you want to rebalance some data at cluster.
	// +optional
	MaintenanceInsertNodeIDs []int32 `json:"maintenanceInsertNodeIDs,omitempty"`
	// MaintenanceInsertNodeIDs - excludes given node ids from select requests routing, must contain pod suffixes - for pod-0, id will be 0 and etc.
	MaintenanceSelectNodeIDs []int32 `json:"maintenanceSelectNodeIDs,omitempty"`

	// RollingUpdateStrategy defines strategy for application updates
	// Default is OnDelete, in this case operator handles update process
	// Can be changed for RollingUpdate
	// +optional
	RollingUpdateStrategy appsv1.StatefulSetUpdateStrategyType `json:"rollingUpdateStrategy,omitempty"`

	// ClaimTemplates allows adding additional VolumeClaimTemplates for StatefulSet
	ClaimTemplates []v1.PersistentVolumeClaim `json:"claimTemplates,omitempty"`

	CommonDefaultableParams           `json:",inline"`
	CommonApplicationDeploymentParams `json:",inline"`
}

func (*VMStorage) DeepCopy

func (in *VMStorage) DeepCopy() *VMStorage

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

func (*VMStorage) DeepCopyInto

func (in *VMStorage) DeepCopyInto(out *VMStorage)

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

func (*VMStorage) GetAdditionalService

func (cr *VMStorage) GetAdditionalService() *AdditionalServiceSpec

GetAdditionalService returns AdditionalServiceSpec settings

func (*VMStorage) GetExtraArgs

func (cr *VMStorage) GetExtraArgs() map[string]string

ExtraArgs returns additionally configured command-line arguments

func (*VMStorage) GetMetricPath

func (cr *VMStorage) GetMetricPath() string

GetMetricPath returns prefixed path for metric requests

func (*VMStorage) GetServiceScrape

func (cr *VMStorage) GetServiceScrape() *VMServiceScrapeSpec

ServiceScrape returns overrides for serviceScrape builder

func (*VMStorage) GetStorageVolumeName

func (cr *VMStorage) GetStorageVolumeName() string

GetStorageVolumeName returns formatted name for vmstorage volume

func (*VMStorage) Probe

func (cr *VMStorage) Probe() *EmbeddedProbes

func (*VMStorage) ProbeNeedLiveness

func (*VMStorage) ProbeNeedLiveness() bool

ProbeNeedLiveness implements build.probeCRD interface

func (*VMStorage) ProbePath

func (cr *VMStorage) ProbePath() string

func (*VMStorage) ProbePort

func (cr *VMStorage) ProbePort() string

func (*VMStorage) ProbeScheme

func (cr *VMStorage) ProbeScheme() string

type VMUser

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

	Spec   VMUserSpec   `json:"spec,omitempty"`
	Status VMUserStatus `json:"status,omitempty"`
}

VMUser is the Schema for the vmusers API +kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.updateStatus" +kubebuilder:printcolumn:name="Sync Error",type="string",JSONPath=".status.reason" +genclient

func (*VMUser) AllLabels

func (cr *VMUser) AllLabels() map[string]string

AllLabels returns combined labels for VMUser

func (*VMUser) AnnotationsFiltered

func (cr *VMUser) AnnotationsFiltered() map[string]string

func (*VMUser) AsOwner

func (cr *VMUser) AsOwner() []metav1.OwnerReference

AsOwner returns owner references with current object as owner

func (*VMUser) DeepCopy

func (in *VMUser) DeepCopy() *VMUser

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

func (*VMUser) DeepCopyInto

func (in *VMUser) DeepCopyInto(out *VMUser)

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

func (*VMUser) DeepCopyObject

func (in *VMUser) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*VMUser) GetStatusMetadata

func (cr *VMUser) GetStatusMetadata() *StatusMetadata

GetStatusMetadata implements reconcile.objectWithStatus interface

func (*VMUser) PasswordRefAsKey

func (cr *VMUser) PasswordRefAsKey() string

PasswordRefAsKey - builds key for passwordRef cache

func (*VMUser) SecretName

func (cr *VMUser) SecretName() string

SecretName builds secret name for VMUser.

func (*VMUser) SelectorLabels

func (cr *VMUser) SelectorLabels() map[string]string

func (*VMUser) TokenRefAsKey

func (cr *VMUser) TokenRefAsKey() string

TokenRefAsKey - builds key for passwordRef cache

func (*VMUser) Validate added in v0.55.0

func (cr *VMUser) Validate() error

type VMUserConfigOptions

type VMUserConfigOptions struct {
	// DefaultURLs backend url for non-matching paths filter
	// usually used for default backend with error message
	DefaultURLs []string `json:"default_url,omitempty" yaml:"default_url,omitempty"`

	// TLSConfig defines tls configuration for the backend connection
	// +optional
	TLSConfig *TLSConfig `json:"tlsConfig,omitempty" yaml:"tlsConfig,omitempty"`

	// IPFilters defines per target src ip filters
	// supported only with enterprise version of [vmauth](https://docs.victoriametrics.com/vmauth/#ip-filters)
	// +optional
	IPFilters VMUserIPFilters `json:"ip_filters,omitempty" yaml:"ip_filters,omitempty"`

	// DiscoverBackendIPs instructs discovering URLPrefix backend IPs via DNS.
	DiscoverBackendIPs *bool `json:"discover_backend_ips,omitempty" yaml:"discover_backend_ips,omitempty"`

	// Headers represent additional http headers, that vmauth uses
	// in form of ["header_key: header_value"]
	// multiple values for header key:
	// ["header_key: value1,value2"]
	// it's available since 1.68.0 version of vmauth
	// +optional
	Headers []string `json:"headers,omitempty"`
	// ResponseHeaders represent additional http headers, that vmauth adds for request response
	// in form of ["header_key: header_value"]
	// multiple values for header key:
	// ["header_key: value1,value2"]
	// it's available since 1.93.0 version of vmauth
	// +optional
	ResponseHeaders []string `json:"response_headers,omitempty" yaml:"response_headers,omitempty"`

	// RetryStatusCodes defines http status codes in numeric format for request retries
	// e.g. [429,503]
	// +optional
	RetryStatusCodes []int `json:"retry_status_codes,omitempty" yaml:"retry_status_codes,omitempty"`

	// MaxConcurrentRequests defines max concurrent requests per user
	// 300 is default value for vmauth
	// +optional
	MaxConcurrentRequests *int `json:"max_concurrent_requests,omitempty" yaml:"max_concurrent_requests,omitempty"`

	// LoadBalancingPolicy defines load balancing policy to use for backend urls.
	// Supported policies: least_loaded, first_available.
	// See [here](https://docs.victoriametrics.com/vmauth#load-balancing) for more details (default "least_loaded")
	// +optional
	// +kubebuilder:validation:Enum=least_loaded;first_available
	LoadBalancingPolicy *string `json:"load_balancing_policy,omitempty" yaml:"load_balancing_policy,omitempty"`

	// DropSrcPathPrefixParts is the number of `/`-delimited request path prefix parts to drop before proxying the request to backend.
	// See [here](https://docs.victoriametrics.com/vmauth#dropping-request-path-prefix) for more details.
	// +optional
	DropSrcPathPrefixParts *int `json:"drop_src_path_prefix_parts,omitempty" yaml:"drop_src_path_prefix_parts,omitempty"`

	// DumpRequestOnErrors instructs vmauth to return detailed request params to the client
	// if routing rules don't allow to forward request to the backends.
	// Useful for debugging `src_hosts` and `src_headers` based routing rules
	//
	// available since v1.107.0 vmauth version
	// +optional
	DumpRequestOnErrors *bool `json:"dump_request_on_errors,omitempty"`
}

VMUserConfigOptions defines configuration options for VMUser object

func (*VMUserConfigOptions) DeepCopy

func (in *VMUserConfigOptions) DeepCopy() *VMUserConfigOptions

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

func (*VMUserConfigOptions) DeepCopyInto

func (in *VMUserConfigOptions) DeepCopyInto(out *VMUserConfigOptions)

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

type VMUserIPFilters

type VMUserIPFilters struct {
	DenyList  []string `json:"deny_list,omitempty"`
	AllowList []string `json:"allow_list,omitempty"`
}

VMUserIPFilters defines filters for IP addresses supported only with enterprise version of [vmauth](https://docs.victoriametrics.com/vmauth#ip-filters)

func (*VMUserIPFilters) DeepCopy

func (in *VMUserIPFilters) DeepCopy() *VMUserIPFilters

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

func (*VMUserIPFilters) DeepCopyInto

func (in *VMUserIPFilters) DeepCopyInto(out *VMUserIPFilters)

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

type VMUserList

type VMUserList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []VMUser `json:"items"`
}

VMUserList contains a list of VMUser

func (*VMUserList) DeepCopy

func (in *VMUserList) DeepCopy() *VMUserList

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

func (*VMUserList) DeepCopyInto

func (in *VMUserList) DeepCopyInto(out *VMUserList)

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

func (*VMUserList) DeepCopyObject

func (in *VMUserList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type VMUserSpec

type VMUserSpec struct {
	// Name of the VMUser object.
	// +optional
	Name *string `json:"name,omitempty"`
	// UserName basic auth user name for accessing protected endpoint,
	// will be replaced with metadata.name of VMUser if omitted.
	// +optional
	UserName *string `json:"username,omitempty"`
	// Password basic auth password for accessing protected endpoint.
	// +optional
	Password *string `json:"password,omitempty"`
	// PasswordRef allows fetching password from user-create secret by its name and key.
	// +optional
	PasswordRef *v1.SecretKeySelector `json:"passwordRef,omitempty"`
	// TokenRef allows fetching token from user-created secrets by its name and key.
	// +optional
	TokenRef *v1.SecretKeySelector `json:"tokenRef,omitempty"`
	// GeneratePassword instructs operator to generate password for user
	// if spec.password if empty.
	// +optional
	GeneratePassword bool `json:"generatePassword,omitempty"`
	// BearerToken Authorization header value for accessing protected endpoint.
	// +optional
	BearerToken *string `json:"bearerToken,omitempty"`
	// TargetRefs - reference to endpoints, which user may access.
	TargetRefs []TargetRef `json:"targetRefs"`

	VMUserConfigOptions `json:",inline"`

	// MetricLabels - additional labels for metrics exported by vmauth for given user.
	// +optional
	MetricLabels map[string]string `json:"metric_labels,omitempty"`

	// DisableSecretCreation skips related secret creation for vmuser
	DisableSecretCreation bool `json:"disable_secret_creation,omitempty"`
}

VMUserSpec defines the desired state of VMUser

func (*VMUserSpec) DeepCopy

func (in *VMUserSpec) DeepCopy() *VMUserSpec

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

func (*VMUserSpec) DeepCopyInto

func (in *VMUserSpec) DeepCopyInto(out *VMUserSpec)

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

type VMUserStatus

type VMUserStatus struct {
	StatusMetadata `json:",inline"`
}

VMUserStatus defines the observed state of VMUser

func (*VMUserStatus) DeepCopy

func (in *VMUserStatus) DeepCopy() *VMUserStatus

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

func (*VMUserStatus) DeepCopyInto

func (in *VMUserStatus) DeepCopyInto(out *VMUserStatus)

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

type VictorOpsConfig

type VictorOpsConfig struct {
	// SendResolved controls notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"send_resolved,omitempty" yaml:"send_resolved,omitempty"`
	// The secret's key that contains the API key to use when talking to the VictorOps API.
	// It must be at them same namespace as CRD
	// fallback to global setting if empty
	// +optional
	APIKey *v1.SecretKeySelector `json:"api_key,omitempty" yaml:"api_key,omitempty"`
	// The VictorOps API URL.
	// +optional
	APIURL string `json:"api_url,omitempty" yaml:"api_url,omitempty"`
	// A key used to map the alert to a team.
	RoutingKey string `json:"routing_key" yaml:"routing_key"`
	// Describes the behavior of the alert (CRITICAL, WARNING, INFO).
	// +optional
	MessageType string `json:"message_type,omitempty" yaml:"message_type,omitempty"`
	// Contains summary of the alerted problem.
	// +optional
	EntityDisplayName string `json:"entity_display_name,omitempty" yaml:"entity_display_name,omitempty"`
	// Contains long explanation of the alerted problem.
	// +optional
	StateMessage string `json:"state_message,omitempty" yaml:"state_message,omitempty"`
	// The monitoring tool the state message is from.
	// +optional
	MonitoringTool string `json:"monitoring_tool,omitempty" yaml:"monitoring_tool,omitempty"`
	// The HTTP client's configuration.
	// +optional
	HTTPConfig *HTTPConfig `json:"http_config,omitempty" yaml:"http_config,omitempty"`
	// Adds optional custom fields
	// https://github.com/prometheus/alertmanager/blob/v0.24.0/config/notifiers.go#L537
	// +optional
	CustomFields map[string]string `json:"custom_fields,omitempty" yaml:"custom_fields,omitempty"`
}

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

func (*VictorOpsConfig) DeepCopy

func (in *VictorOpsConfig) DeepCopy() *VictorOpsConfig

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

func (*VictorOpsConfig) DeepCopyInto

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

type WeChatConfig struct {
	// SendResolved controls notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"send_resolved,omitempty" yaml:"send_resolved,omitempty"`
	// The secret's key that contains the WeChat API key.
	// The secret needs to be in the same namespace as the AlertmanagerConfig
	// fallback to global alertmanager setting if empty
	// +optional
	APISecret *v1.SecretKeySelector `json:"api_secret,omitempty" yaml:"api_secret,omitempty"`
	// The WeChat API URL.
	// fallback to global alertmanager setting if empty
	// +optional
	APIURL string `json:"api_url,omitempty" yaml:"api_url,omitempty"`
	// The corp id for authentication.
	// fallback to global alertmanager setting if empty
	// +optional
	CorpID string `json:"corp_id,omitempty" yaml:"corp_id,omitempty"`
	// +optional
	AgentID string `json:"agent_id,omitempty" yaml:"agent_id,omitempty"`
	// +optional
	ToUser string `json:"to_user,omitempty" yaml:"to_user,omitempty"`
	// +optional
	ToParty string `json:"to_party,omitempty" yaml:"to_party,omitempty"`
	// +optional
	ToTag string `json:"to_tag,omitempty" yaml:"to_tag,omitempty"`
	// API request data as defined by the WeChat API.
	Message string `json:"message,omitempty"`
	// +optional
	MessageType string `json:"message_type,omitempty" yaml:"message_type,omitempty"`
	// HTTP client configuration.
	// +optional
	HTTPConfig *HTTPConfig `json:"http_config,omitempty" yaml:"http_config,omitempty"`
}

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

func (*WeChatConfig) DeepCopy

func (in *WeChatConfig) DeepCopy() *WeChatConfig

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

func (*WeChatConfig) DeepCopyInto

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

type WebexConfig struct {
	// SendResolved controls notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"send_resolved,omitempty" yaml:"send_resolved,omitempty"`
	// The Webex Teams API URL, i.e. https://webexapis.com/v1/messages
	// +optional
	URL *string `json:"api_url,omitempty" yaml:"api_url,omitempty"`
	// The ID of the Webex Teams room where to send the messages
	// +required
	RoomId string `json:"room_id,omitempty" yaml:"room_id,omitempty"`
	// The message body template
	// +optional
	Message string `json:"message,omitempty"`
	// HTTP client configuration. You must use this configuration to supply the bot token as part of the HTTP `Authorization` header.
	// +optional
	HTTPConfig *HTTPConfig `json:"http_config,omitempty" yaml:"http_config,omitempty"`
}

func (*WebexConfig) DeepCopy

func (in *WebexConfig) DeepCopy() *WebexConfig

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

func (*WebexConfig) DeepCopyInto

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 {
	// SendResolved controls notify about resolved alerts.
	// +optional
	SendResolved *bool `json:"send_resolved,omitempty" yaml:"send_resolved,omitempty"`
	// URL to send requests to,
	// one of `urlSecret` and `url` must be defined.
	// +optional
	URL *string `json:"url,omitempty"`
	// URLSecret defines secret name and key at the CRD namespace.
	// It must contain the webhook URL.
	// one of `urlSecret` and `url` must be defined.
	// +optional
	URLSecret *v1.SecretKeySelector `json:"url_secret,omitempty" yaml:"url_secret,omitempty"`
	// HTTP client configuration.
	// +optional
	HTTPConfig *HTTPConfig `json:"http_config,omitempty" yaml:"http_config,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:"max_alerts,omitempty" yaml:"max_alerts,omitempty"`
	// Timeout is the maximum time allowed to invoke the webhook
	// available since v0.28.0 alertmanager version
	// +kubebuilder:validation:Pattern:="^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$"
	// +optional
	Timeout string `json:"timeout,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.

Jump to

Keyboard shortcuts

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