Documentation ¶
Overview ¶
Package v1beta1 contains API Schema definitions for the victoriametrics v1beta1 API group +kubebuilder:object:generate=true +groupName=operator.victoriametrics.com
Index ¶
- Constants
- Variables
- func BuildReloadPathWithPort(extraArgs map[string]string, port string) string
- func GetCRDAsOwner(name CRDName) []v1.OwnerReference
- func Init(ctx context.Context, rclient client.Client) error
- func IsContainsFinalizer(src []string, finalizer string) bool
- func MaybeEnableProxyProtocol(args []string, extaArgs map[string]string) []string
- func MergeFinalizers(src client.Object, finalizer string) []string
- func PrefixedName(name, prefix string) string
- func RemoveFinalizer(src []string, finalizer string) []string
- func Resource(resource string) schema.GroupResource
- func SetLabelAndAnnotationPrefixes(labelPrefixes, annotationPrefixes []string)
- type APIServerConfig
- type AdditionalServiceSpec
- func (in *AdditionalServiceSpec) DeepCopy() *AdditionalServiceSpec
- func (in *AdditionalServiceSpec) DeepCopyInto(out *AdditionalServiceSpec)
- func (asc *AdditionalServiceSpec) IsSomeAndThen(cb func(s *AdditionalServiceSpec) error) error
- func (ss *AdditionalServiceSpec) NameOrDefault(defaultName string) string
- type ArbitraryFSAccessThroughSMsConfig
- type AttachMetadata
- type Authorization
- type AzureSDConfig
- type BasicAuth
- type BearerAuth
- type CRDName
- type CRDRef
- type ConfigMapKeyReference
- type ConsulSDConfig
- type DNSSDConfig
- type DigitalOceanSDConfig
- type DiscordConfig
- type DiscoverySelector
- type EC2Filter
- type EC2SDConfig
- type EmailConfig
- type EmailConfigHeaders
- type EmbeddedHPA
- type EmbeddedIngress
- type EmbeddedObjectMetadata
- type EmbeddedPersistentVolumeClaim
- type EmbeddedPodDisruptionBudgetSpec
- func (in *EmbeddedPodDisruptionBudgetSpec) DeepCopy() *EmbeddedPodDisruptionBudgetSpec
- func (in *EmbeddedPodDisruptionBudgetSpec) DeepCopyInto(out *EmbeddedPodDisruptionBudgetSpec)
- func (epdbs *EmbeddedPodDisruptionBudgetSpec) SelectorLabelsWithDefaults(defaultSelector map[string]string) map[string]string
- type EmbeddedProbes
- type Endpoint
- type FileSDConfig
- type GCESDConfig
- type HTTPAuth
- type HTTPConfig
- type HTTPSDConfig
- type Image
- type ImageConfig
- type InhibitRule
- type InsertPorts
- type K8SSelectorConfig
- type KeyValue
- type KubernetesSDConfig
- type License
- func (in *License) DeepCopy() *License
- func (in *License) DeepCopyInto(out *License)
- func (l *License) IsProvided() bool
- func (l *License) MaybeAddToArgs(args []string, secretMountDir string) []string
- func (l *License) MaybeAddToVolumes(volumes []v1.Volume, mounts []v1.VolumeMount, secretMountDir string) ([]v1.Volume, []v1.VolumeMount)
- type LinkConfig
- type MSTeamsConfig
- type MuteTimeInterval
- type NamespaceDiscovery
- type NamespaceSelector
- type OAuth2
- type OpenStackSDConfig
- type OpsGenieConfig
- type OpsGenieConfigResponder
- type PagerDutyConfig
- type PagerDutyDetails
- type PodMetricsEndpoint
- type ProbeTargetIngress
- type ProxyAuth
- type PushoverConfig
- type Receiver
- type RelabelConfig
- type Route
- type Rule
- type RuleGroup
- type SecretOrConfigMap
- func (c *SecretOrConfigMap) BuildSelectorWithPrefix(prefix string) string
- func (in *SecretOrConfigMap) DeepCopy() *SecretOrConfigMap
- func (in *SecretOrConfigMap) DeepCopyInto(out *SecretOrConfigMap)
- func (c *SecretOrConfigMap) Key() string
- func (c *SecretOrConfigMap) Name() string
- func (c *SecretOrConfigMap) Validate() error
- type SecretOrConfigMapValidationError
- type Sigv4Config
- type SlackAction
- type SlackConfig
- type SlackConfirmationField
- type SlackField
- type SnsConfig
- type StaticConfig
- type StaticRef
- type StorageSpec
- type StreamAggrConfig
- type StreamAggrRule
- type StringOrArray
- type SubRoute
- type TLSConfig
- type TLSConfigValidationError
- type TargetEndpoint
- type TargetRef
- type TargetRefBasicAuth
- type TelegramConfig
- type TimeInterval
- type TimeRange
- type UpdateStatus
- type VMAgent
- func (cr VMAgent) AllLabels() map[string]string
- func (cr VMAgent) AnnotationsFiltered() map[string]string
- func (cr *VMAgent) AsCRDOwner() []metav1.OwnerReference
- func (cr *VMAgent) AsOwner() []metav1.OwnerReference
- func (cr *VMAgent) AsURL() string
- func (in *VMAgent) DeepCopy() *VMAgent
- func (in *VMAgent) DeepCopyInto(out *VMAgent)
- func (in *VMAgent) DeepCopyObject() runtime.Object
- func (cr *VMAgent) GetAdditionalService() *AdditionalServiceSpec
- func (cr VMAgent) GetClusterRoleName() string
- func (cr VMAgent) GetNSName() string
- func (cr VMAgent) GetServiceAccountName() string
- func (cr *VMAgent) HasAnyRelabellingConfigs() bool
- func (cr *VMAgent) HasAnyStreamAggrConfigs() bool
- func (cr *VMAgent) HasSpecChanges() (bool, error)
- func (cr VMAgent) HealthPath() string
- func (cr VMAgent) IsOwnsServiceAccount() bool
- func (cr *VMAgent) IsUnmanaged() bool
- func (cr *VMAgent) LastAppliedSpecAsPatch() (client.Patch, error)
- func (cr VMAgent) MetricPath() string
- func (cr VMAgent) PodAnnotations() map[string]string
- func (cr VMAgent) PodLabels() map[string]string
- func (cr VMAgent) PrefixedName() string
- func (cr *VMAgent) Probe() *EmbeddedProbes
- func (cr VMAgent) ProbeNeedLiveness() bool
- func (cr *VMAgent) ProbePath() string
- func (cr VMAgent) ProbePort() string
- func (cr *VMAgent) ProbeScheme() string
- func (cr VMAgent) RelabelingAssetName() string
- func (cr VMAgent) STSUpdateStrategy() appsv1.StatefulSetUpdateStrategyType
- func (cr VMAgent) SelectorLabels() map[string]string
- func (cr *VMAgent) SetUpdateStatusTo(ctx context.Context, r client.Client, status UpdateStatus, maybeErr error) error
- func (cr *VMAgent) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (cr VMAgent) StreamAggrConfigName() string
- func (cr VMAgent) TLSAssetName() string
- func (r *VMAgent) ValidateCreate() (aw admission.Warnings, err error)
- func (cr *VMAgent) ValidateDelete() (aw admission.Warnings, err error)
- func (r *VMAgent) ValidateUpdate(old runtime.Object) (aw admission.Warnings, err error)
- type VMAgentList
- type VMAgentRemoteWriteSettings
- type VMAgentRemoteWriteSpec
- func (rw *VMAgentRemoteWriteSpec) AsConfigMapKey(idx int, suffix string) string
- func (rw *VMAgentRemoteWriteSpec) AsMapKey() string
- func (rw *VMAgentRemoteWriteSpec) AsSecretKey(idx int, suffix string) string
- func (in *VMAgentRemoteWriteSpec) DeepCopy() *VMAgentRemoteWriteSpec
- func (in *VMAgentRemoteWriteSpec) DeepCopyInto(out *VMAgentRemoteWriteSpec)
- func (rw *VMAgentRemoteWriteSpec) HasStreamAggr() bool
- type VMAgentSpec
- type VMAgentStatus
- type VMAlert
- func (cr VMAlert) AllLabels() map[string]string
- func (cr VMAlert) AnnotationsFiltered() map[string]string
- func (cr *VMAlert) AsCRDOwner() []metav1.OwnerReference
- func (cr *VMAlert) AsOwner() []metav1.OwnerReference
- func (cr *VMAlert) AsURL() string
- func (in *VMAlert) DeepCopy() *VMAlert
- func (in *VMAlert) DeepCopyInto(out *VMAlert)
- func (in *VMAlert) DeepCopyObject() runtime.Object
- func (cr *VMAlert) GetAdditionalService() *AdditionalServiceSpec
- func (cr VMAlert) GetNSName() string
- func (cr *VMAlert) GetNotifierSelectors() []*DiscoverySelector
- func (cr VMAlert) GetServiceAccountName() string
- func (cr *VMAlert) HasSpecChanges() (bool, error)
- func (cr VMAlert) IsOwnsServiceAccount() bool
- func (cr *VMAlert) IsUnmanaged() bool
- func (cr *VMAlert) LastAppliedSpecAsPatch() (client.Patch, error)
- func (cr VMAlert) MetricPath() string
- func (cr VMAlert) NeedDedupRules() bool
- func (cr VMAlert) NotifierAsMapKey(i int) string
- func (cr VMAlert) PodAnnotations() map[string]string
- func (cr VMAlert) PodLabels() map[string]string
- func (cr VMAlert) PrefixedName() string
- func (cr *VMAlert) Probe() *EmbeddedProbes
- func (cr VMAlert) ProbeNeedLiveness() bool
- func (cr *VMAlert) ProbePath() string
- func (cr VMAlert) ProbePort() string
- func (cr *VMAlert) ProbeScheme() string
- func (cr VMAlert) RulesConfigMapSelector() client.ListOption
- func (cr VMAlert) SelectorLabels() map[string]string
- func (cr *VMAlert) SetUpdateStatusTo(ctx context.Context, r client.Client, status UpdateStatus, maybeErr error) error
- func (r *VMAlert) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (cr VMAlert) TLSAssetName() string
- func (r *VMAlert) ValidateCreate() (aw admission.Warnings, err error)
- func (r *VMAlert) ValidateDelete() (aw admission.Warnings, err error)
- func (r *VMAlert) ValidateUpdate(old runtime.Object) (aw admission.Warnings, err error)
- type VMAlertDatasourceSpec
- type VMAlertList
- type VMAlertNotifierSpec
- type VMAlertRemoteReadSpec
- type VMAlertRemoteWriteSpec
- type VMAlertSpec
- type VMAlertStatus
- type VMAlertmanager
- func (cr VMAlertmanager) AllLabels() map[string]string
- func (cr VMAlertmanager) AnnotationsFiltered() map[string]string
- func (cr *VMAlertmanager) AsCRDOwner() []metav1.OwnerReference
- func (cr *VMAlertmanager) AsNotifiers() []VMAlertNotifierSpec
- func (cr *VMAlertmanager) AsOwner() []metav1.OwnerReference
- func (cr *VMAlertmanager) AsPodFQDN(idx int) string
- func (cr *VMAlertmanager) AsURL() string
- func (cr VMAlertmanager) ConfigSecretName() string
- func (in *VMAlertmanager) DeepCopy() *VMAlertmanager
- func (in *VMAlertmanager) DeepCopyInto(out *VMAlertmanager)
- func (in *VMAlertmanager) DeepCopyObject() runtime.Object
- func (cr *VMAlertmanager) GetAdditionalService() *AdditionalServiceSpec
- func (cr VMAlertmanager) GetNSName() string
- func (cr VMAlertmanager) GetServiceAccountName() string
- func (cr *VMAlertmanager) GetVolumeName() string
- func (cr *VMAlertmanager) HasSpecChanges() (bool, error)
- func (cr VMAlertmanager) IsOwnsServiceAccount() bool
- func (cr *VMAlertmanager) IsUnmanaged() bool
- func (cr *VMAlertmanager) LastAppliedSpecAsPatch() (client.Patch, error)
- func (cr *VMAlertmanager) MetricPath() string
- func (cr VMAlertmanager) PodAnnotations() map[string]string
- func (cr VMAlertmanager) PodLabels() map[string]string
- func (cr VMAlertmanager) PrefixedName() string
- func (cr *VMAlertmanager) Probe() *EmbeddedProbes
- func (cr *VMAlertmanager) ProbeNeedLiveness() bool
- func (cr *VMAlertmanager) ProbePath() string
- func (cr *VMAlertmanager) ProbePort() string
- func (cr *VMAlertmanager) ProbeScheme() string
- func (cr VMAlertmanager) SelectorLabels() map[string]string
- func (cr *VMAlertmanager) SetUpdateStatusTo(ctx context.Context, r client.Client, status UpdateStatus, maybeErr error) error
- func (r *VMAlertmanager) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (cr VMAlertmanager) UpdateStrategy() appsv1.StatefulSetUpdateStrategyType
- func (r *VMAlertmanager) ValidateCreate() (aw admission.Warnings, err error)
- func (r *VMAlertmanager) ValidateDelete() (aw admission.Warnings, err error)
- func (r *VMAlertmanager) ValidateUpdate(old runtime.Object) (aw admission.Warnings, err error)
- type VMAlertmanagerConfig
- func (amc *VMAlertmanagerConfig) AsKey() string
- func (in *VMAlertmanagerConfig) DeepCopy() *VMAlertmanagerConfig
- func (in *VMAlertmanagerConfig) DeepCopyInto(out *VMAlertmanagerConfig)
- func (in *VMAlertmanagerConfig) DeepCopyObject() runtime.Object
- func (r *VMAlertmanagerConfig) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (cr *VMAlertmanagerConfig) UnmarshalJSON(src []byte) error
- func (amc *VMAlertmanagerConfig) Validate() error
- func (r *VMAlertmanagerConfig) ValidateCreate() (aw admission.Warnings, err error)
- func (r *VMAlertmanagerConfig) ValidateDelete() (aw admission.Warnings, err error)
- func (r *VMAlertmanagerConfig) ValidateUpdate(old runtime.Object) (aw admission.Warnings, err error)
- type VMAlertmanagerConfigList
- type VMAlertmanagerConfigSpec
- type VMAlertmanagerConfigStatus
- type VMAlertmanagerList
- type VMAlertmanagerSpec
- type VMAlertmanagerStatus
- type VMAuth
- func (cr VMAuth) AllLabels() map[string]string
- func (cr VMAuth) AnnotationsFiltered() map[string]string
- func (cr *VMAuth) AsCRDOwner() []metav1.OwnerReference
- func (cr *VMAuth) AsOwner() []metav1.OwnerReference
- func (cr VMAuth) ConfigSecretName() string
- func (in *VMAuth) DeepCopy() *VMAuth
- func (in *VMAuth) DeepCopyInto(out *VMAuth)
- func (in *VMAuth) DeepCopyObject() runtime.Object
- func (cr *VMAuth) GetAdditionalService() *AdditionalServiceSpec
- func (cr VMAuth) GetNSName() string
- func (cr VMAuth) GetServiceAccountName() string
- func (cr *VMAuth) HasSpecChanges() (bool, error)
- func (cr VMAuth) IsOwnsServiceAccount() bool
- func (cr *VMAuth) IsUnmanaged() bool
- func (cr *VMAuth) LastAppliedSpecAsPatch() (client.Patch, error)
- func (cr VMAuth) MetricPath() string
- func (cr VMAuth) PodAnnotations() map[string]string
- func (cr VMAuth) PodLabels() map[string]string
- func (cr VMAuth) PrefixedName() string
- func (cr *VMAuth) Probe() *EmbeddedProbes
- func (cr *VMAuth) ProbeNeedLiveness() bool
- func (cr *VMAuth) ProbePath() string
- func (cr *VMAuth) ProbePort() string
- func (cr *VMAuth) ProbeScheme() string
- func (cr VMAuth) SelectorLabels() map[string]string
- func (cr *VMAuth) SetUpdateStatusTo(ctx context.Context, r client.Client, status UpdateStatus, maybeErr error) error
- func (r *VMAuth) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *VMAuth) ValidateCreate() (aw admission.Warnings, err error)
- func (r *VMAuth) ValidateDelete() (aw admission.Warnings, err error)
- func (r *VMAuth) ValidateUpdate(old runtime.Object) (aw admission.Warnings, err error)
- type VMAuthList
- type VMAuthSpec
- type VMAuthStatus
- type VMAuthUnauthorizedPath
- type VMBackup
- type VMCluster
- func (cr VMCluster) AllLabels() map[string]string
- func (cr VMCluster) AnnotationsFiltered() map[string]string
- func (cr *VMCluster) AsCRDOwner() []metav1.OwnerReference
- func (c *VMCluster) AsOwner() []metav1.OwnerReference
- func (cr *VMCluster) AsURL() string
- func (cr VMCluster) AvailableStorageNodeIDs(requestsType string) []int32
- func (in *VMCluster) DeepCopy() *VMCluster
- func (in *VMCluster) DeepCopyInto(out *VMCluster)
- func (in *VMCluster) DeepCopyObject() runtime.Object
- func (cr VMCluster) FinalLabels(baseLabels map[string]string) map[string]string
- func (cr VMCluster) GetNSName() string
- func (cr VMCluster) GetServiceAccountName() string
- func (cr *VMCluster) HasSpecChanges() (bool, error)
- func (cr VMCluster) IsOwnsServiceAccount() bool
- func (cr *VMCluster) LastAppliedSpecAsPatch() (client.Patch, error)
- func (cr VMCluster) MetricPathInsert() string
- func (cr VMCluster) MetricPathSelect() string
- func (cr VMCluster) MetricPathStorage() string
- func (cr VMCluster) PrefixedName() string
- func (cr VMCluster) SelectorLabels() map[string]string
- func (cr *VMCluster) SetUpdateStatusTo(ctx context.Context, r client.Client, status UpdateStatus, maybeErr error) error
- func (r *VMCluster) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (cr VMCluster) VMInsertPodAnnotations() map[string]string
- func (cr VMCluster) VMInsertPodLabels() map[string]string
- func (cr VMCluster) VMInsertSelectorLabels() map[string]string
- func (cr *VMCluster) VMInsertURL() string
- func (cr VMCluster) VMSelectPodAnnotations() map[string]string
- func (cr VMCluster) VMSelectPodLabels() map[string]string
- func (cr VMCluster) VMSelectSelectorLabels() map[string]string
- func (cr *VMCluster) VMSelectURL() string
- func (cr VMCluster) VMStoragePodAnnotations() map[string]string
- func (cr VMCluster) VMStoragePodLabels() map[string]string
- func (cr VMCluster) VMStorageSelectorLabels() map[string]string
- func (cr *VMCluster) VMStorageURL() string
- func (r *VMCluster) ValidateCreate() (aw admission.Warnings, err error)
- func (r *VMCluster) ValidateDelete() (aw admission.Warnings, err error)
- func (r *VMCluster) ValidateUpdate(old runtime.Object) (aw admission.Warnings, err error)
- type VMClusterList
- type VMClusterSpec
- type VMClusterStatus
- type VMInsert
- func (in *VMInsert) DeepCopy() *VMInsert
- func (in *VMInsert) DeepCopyInto(out *VMInsert)
- func (cr *VMInsert) GetAdditionalService() *AdditionalServiceSpec
- func (i VMInsert) GetNameWithPrefix(clusterName string) string
- func (cr *VMInsert) Probe() *EmbeddedProbes
- func (cr *VMInsert) ProbeNeedLiveness() bool
- func (cr *VMInsert) ProbePath() string
- func (cr *VMInsert) ProbePort() string
- func (cr *VMInsert) ProbeScheme() string
- type VMNodeScrape
- type VMNodeScrapeList
- type VMNodeScrapeSpec
- type VMNodeScrapeStatus
- type VMPodScrape
- type VMPodScrapeList
- type VMPodScrapeSpec
- type VMPodScrapeStatus
- type VMProbe
- type VMProbeList
- type VMProbeSpec
- type VMProbeStatus
- type VMProbeTargetStaticConfig
- type VMProbeTargets
- type VMProberSpec
- type VMRestore
- type VMRestoreOnStartConfig
- type VMRule
- func (in *VMRule) DeepCopy() *VMRule
- func (in *VMRule) DeepCopyInto(out *VMRule)
- func (in *VMRule) DeepCopyObject() runtime.Object
- func (r *VMRule) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (r *VMRule) ValidateCreate() (aw admission.Warnings, err error)
- func (r *VMRule) ValidateDelete() (aw admission.Warnings, err error)
- func (r *VMRule) ValidateUpdate(old runtime.Object) (aw admission.Warnings, err error)
- type VMRuleList
- type VMRuleSpec
- type VMRuleStatus
- type VMScrapeConfig
- type VMScrapeConfigList
- type VMScrapeConfigSpec
- type VMScrapeConfigStatus
- type VMScrapeParams
- type VMSelect
- func (s VMSelect) BuildPodName(baseName string, podIndex int32, namespace, portName, domain string) string
- func (in *VMSelect) DeepCopy() *VMSelect
- func (in *VMSelect) DeepCopyInto(out *VMSelect)
- func (cr *VMSelect) GetAdditionalService() *AdditionalServiceSpec
- func (s VMSelect) GetCacheMountVolumeName() string
- func (s VMSelect) GetNameWithPrefix(clusterName string) string
- func (cr *VMSelect) Probe() *EmbeddedProbes
- func (cr *VMSelect) ProbeNeedLiveness() bool
- func (cr *VMSelect) ProbePath() string
- func (cr *VMSelect) ProbePort() string
- func (cr *VMSelect) ProbeScheme() string
- func (s VMSelect) UpdateStrategy() appsv1.StatefulSetUpdateStrategyType
- type VMServiceScrape
- type VMServiceScrapeList
- type VMServiceScrapeSpec
- type VMServiceScrapeStatus
- type VMSingle
- func (cr VMSingle) AllLabels() map[string]string
- func (cr VMSingle) AnnotationsFiltered() map[string]string
- func (cr *VMSingle) AsCRDOwner() []metav1.OwnerReference
- func (cr *VMSingle) AsOwner() []metav1.OwnerReference
- func (cr *VMSingle) AsURL() string
- func (in *VMSingle) DeepCopy() *VMSingle
- func (in *VMSingle) DeepCopyInto(out *VMSingle)
- func (in *VMSingle) DeepCopyObject() runtime.Object
- func (cr *VMSingle) GetAdditionalService() *AdditionalServiceSpec
- func (cr VMSingle) GetNSName() string
- func (cr VMSingle) GetServiceAccountName() string
- func (cr *VMSingle) HasSpecChanges() (bool, error)
- func (cr *VMSingle) HasStreamAggrConfig() bool
- func (cr VMSingle) IsOwnsServiceAccount() bool
- func (cr *VMSingle) LastAppliedSpecAsPatch() (client.Patch, error)
- func (cr VMSingle) MetricPath() string
- func (cr VMSingle) PodAnnotations() map[string]string
- func (cr VMSingle) PodLabels() map[string]string
- func (cr VMSingle) PrefixedName() string
- func (cr *VMSingle) Probe() *EmbeddedProbes
- func (cr *VMSingle) ProbeNeedLiveness() bool
- func (cr *VMSingle) ProbePath() string
- func (cr *VMSingle) ProbePort() string
- func (cr *VMSingle) ProbeScheme() string
- func (cr VMSingle) SelectorLabels() map[string]string
- func (cr *VMSingle) SetUpdateStatusTo(ctx context.Context, r client.Client, status UpdateStatus, maybeErr error) error
- func (r *VMSingle) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (cr VMSingle) StreamAggrConfigName() string
- func (r *VMSingle) ValidateCreate() (aw admission.Warnings, err error)
- func (r *VMSingle) ValidateDelete() (aw admission.Warnings, err error)
- func (r *VMSingle) ValidateUpdate(old runtime.Object) (aw admission.Warnings, err error)
- type VMSingleList
- type VMSingleSpec
- type VMSingleStatus
- type VMStaticScrape
- type VMStaticScrapeList
- type VMStaticScrapeSpec
- type VMStaticScrapeStatus
- type VMStorage
- func (s VMStorage) BuildPodName(baseName string, podIndex int32, namespace string, portName string, ...) string
- func (in *VMStorage) DeepCopy() *VMStorage
- func (in *VMStorage) DeepCopyInto(out *VMStorage)
- func (cr *VMStorage) GetAdditionalService() *AdditionalServiceSpec
- func (s VMStorage) GetNameWithPrefix(clusterName string) string
- func (s VMStorage) GetStorageVolumeName() string
- func (cr *VMStorage) Probe() *EmbeddedProbes
- func (cr *VMStorage) ProbeNeedLiveness() bool
- func (cr *VMStorage) ProbePath() string
- func (cr *VMStorage) ProbePort() string
- func (cr *VMStorage) ProbeScheme() string
- func (s VMStorage) UpdateStrategy() appsv1.StatefulSetUpdateStrategyType
- type VMUser
- func (cr VMUser) AllLabels() map[string]string
- func (cr VMUser) AnnotationsFiltered() map[string]string
- func (cr *VMUser) AsOwner() []metav1.OwnerReference
- func (in *VMUser) DeepCopy() *VMUser
- func (in *VMUser) DeepCopyInto(out *VMUser)
- func (in *VMUser) DeepCopyObject() runtime.Object
- func (cr *VMUser) PasswordRefAsKey() string
- func (cr *VMUser) SecretName() string
- func (cr VMUser) SelectorLabels() map[string]string
- func (r *VMUser) SetupWebhookWithManager(mgr ctrl.Manager) error
- func (cr *VMUser) TokenRefAsKey() string
- func (cr *VMUser) ValidateCreate() (aw admission.Warnings, err error)
- func (r *VMUser) ValidateDelete() (aw admission.Warnings, err error)
- func (cr *VMUser) ValidateUpdate(old runtime.Object) (aw admission.Warnings, err error)
- type VMUserIPFilters
- type VMUserList
- type VMUserSpec
- type VMUserStatus
- type VictorOpsConfig
- type WeChatConfig
- type WebexConfig
- type WebhookConfig
Constants ¶
const ( UpdateStatusExpanding UpdateStatus = "expanding" UpdateStatusOperational UpdateStatus = "operational" UpdateStatusFailed UpdateStatus = "failed" // FinalizerName name of our finalizer. FinalizerName = "apps.victoriametrics.com/finalizer" SkipValidationAnnotation = "operator.victoriametrics.com/skip-validation" SkipValidationValue = "true" AdditionalServiceLabel = "operator.victoriametrics.com/additional-service" // PVCExpandableLabel controls checks for storageClass PVCExpandableLabel = "operator.victoriametrics.com/pvc-allow-volume-expansion" SecretsDir = "/etc/vm/secrets" ConfigMapsDir = "/etc/vm/configs" TemplatesDir = "/etc/vm/templates" StreamAggrConfigDir = "/etc/vm/stream-aggr" RelabelingConfigDir = "/etc/vm/relabeling" )
const ( // MetaVMAlertDeduplicateRulesKey - controls behavior for vmalert rules deduplication // its useful for migration from prometheus. MetaVMAlertDeduplicateRulesKey = "operator.victoriametrics.com/vmalert-deduplicate-rules" )
Variables ¶
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 )
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.
var SchemeGroupVersion = schema.GroupVersion{Group: "operator.victoriametrics.com", Version: "v1beta1"}
SchemeGroupVersion is group version used to register these objects
Functions ¶
func BuildReloadPathWithPort ¶
BuildReloadPathWithPort builds reload api path for given args
func GetCRDAsOwner ¶
func GetCRDAsOwner(name CRDName) []v1.OwnerReference
func IsContainsFinalizer ¶
IsContainsFinalizer check if finalizers is set.
func MaybeEnableProxyProtocol ¶
MaybeEnableProxyProtocol conditionally adds proxy protocol for custom config-reloader image useful for vmagent and vmauth
func PrefixedName ¶
func RemoveFinalizer ¶
RemoveFinalizer - removes given finalizer from finalizers list.
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
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. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config +k8s:openapi-gen=true
func (*APIServerConfig) DeepCopy ¶
func (in *APIServerConfig) DeepCopy() *APIServerConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServerConfig.
func (*APIServerConfig) DeepCopyInto ¶
func (in *APIServerConfig) DeepCopyInto(out *APIServerConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type 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 UseAsDefault bool `json:"useAsDefault,omitempty"` // EmbeddedObjectMetadata defines objectMeta for additional service. 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 ¶
func (in *AdditionalServiceSpec) DeepCopy() *AdditionalServiceSpec
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 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 ¶
func (in *ArbitraryFSAccessThroughSMsConfig) DeepCopy() *ArbitraryFSAccessThroughSMsConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ArbitraryFSAccessThroughSMsConfig.
func (*ArbitraryFSAccessThroughSMsConfig) DeepCopyInto ¶
func (in *ArbitraryFSAccessThroughSMsConfig) DeepCopyInto(out *ArbitraryFSAccessThroughSMsConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type 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"` }
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 *v1.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 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 { // The secret in the service scrape namespace that contains the username // for authentication. // It must be at them same namespace as CRD // +optional Username v1.SecretKeySelector `json:"username,omitempty"` // The secret in the service scrape namespace that contains the password // for authentication. // It must be at them same namespace as CRD // +optional Password v1.SecretKeySelector `json:"password,omitempty"` // PasswordFile defines path to password file at disk // +optional PasswordFile string `json:"password_file,omitempty"` }
BasicAuth allow an endpoint to authenticate over basic authentication +k8s:openapi-gen=true
func (*BasicAuth) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BasicAuth.
func (*BasicAuth) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type 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 CRDRef ¶
type CRDRef struct { // Kind one of: // VMAgent VMAlert VMCluster VMSingle or VMAlertManager 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 ¶
AddRefToObj adds reference to given object and return it.
func (*CRDRef) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CRDRef.
func (*CRDRef) DeepCopyInto ¶
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 ¶
func (in *ConfigMapKeyReference) DeepCopy() *ConfigMapKeyReference
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 *v1.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://www.consul.io/api/features/consistency.html). Will reduce load on Consul. // If unset, use its default value. // +optional AllowStale *bool `json:"allowStale,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.html#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 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 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 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.html#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 https://docs.victoriametrics.com/sd_configs/#digitalocean_sd_configs +k8s:openapi-gen=true
func (*DigitalOceanSDConfig) DeepCopy ¶
func (in *DigitalOceanSDConfig) DeepCopy() *DigitalOceanSDConfig
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"` // The discord webhook URL // one of `urlSecret` and `url` must be defined. // +optional URL *string `json:"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"` // 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"` }
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 ¶
EC2Filter is the configuration for filtering EC2 instances.
func (*EC2Filter) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EC2Filter.
func (*EC2Filter) DeepCopyInto ¶
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 *v1.SecretKeySelector `json:"accessKey,omitempty"` // SecretKey is the AWS API secret. // +optional SecretKey *v1.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 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"` // The email address to send notifications to. // +optional To string `json:"to,omitempty"` // The sender address. // +optional From string `json:"from,omitempty"` // The hostname to identify to the SMTP server. // +optional Hello string `json:"hello,omitempty"` // The SMTP host through which emails are sent. // +optional Smarthost string `json:"smarthost,omitempty"` // The username to use for authentication. // +optional AuthUsername string `json:"auth_username,omitempty"` // AuthPassword defines secret name and key at CRD namespace. // +optional AuthPassword *v1.SecretKeySelector `json:"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"` // The identity to use for authentication. // +optional AuthIdentity string `json:"auth_identity,omitempty"` // Further headers email header key/value pairs. Overrides any headers // previously set by the notification implementation. Headers EmailConfigHeaders `json:"headers,omitempty"` // The HTML body of the email notification. // +optional HTML string `json:"html,omitempty"` // The text body of the email notification. // +optional Text string `json:"text,omitempty"` // The SMTP TLS requirement. // Note that Go does not support unencrypted connections to remote SMTP endpoints. // +optional RequireTLS *bool `json:"require_tls,omitempty"` // TLS configuration // +optional TLSConfig *TLSConfig `json:"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 EmailConfigHeaders ¶
EmailConfigHeaders is a map of email headers.
func (EmailConfigHeaders) DeepCopy ¶
func (in EmailConfigHeaders) DeepCopy() EmailConfigHeaders
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmailConfigHeaders.
func (EmailConfigHeaders) DeepCopyInto ¶
func (in EmailConfigHeaders) DeepCopyInto(out *EmailConfigHeaders)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EmailConfigHeaders) UnmarshalYAML ¶
func (r *EmailConfigHeaders) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML https://github.com/VictoriaMetrics/operator/issues/609
type EmbeddedHPA ¶
type EmbeddedHPA struct { MinReplicas *int32 `json:"minReplicas,omitempty"` MaxReplicas int32 `json:"maxReplicas,omitempty"` Metrics []v2beta2.MetricSpec `json:"metrics,omitempty"` Behaviour *v2beta2.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"` // 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"` // 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"` // ExtraRules - additional rules for ingress, // must be checked for correctness by user. // +optional ExtraRules []v12.IngressRule `json:"extraRules,omitempty"` // ExtraTLS - additional TLS configuration for ingress // must be checked for correctness by user. // +optional ExtraTLS []v12.IngressTLS `json:"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 ¶
func (in *EmbeddedObjectMetadata) DeepCopy() *EmbeddedObjectMetadata
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmbeddedObjectMetadata.
func (*EmbeddedObjectMetadata) DeepCopyInto ¶
func (in *EmbeddedObjectMetadata) DeepCopyInto(out *EmbeddedObjectMetadata)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EmbeddedPersistentVolumeClaim ¶
type EmbeddedPersistentVolumeClaim struct { metav1.TypeMeta `json:",inline"` // EmbeddedMetadata contains metadata relevant to an EmbeddedResource. // +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 ¶
func (in *EmbeddedPersistentVolumeClaim) DeepCopy() *EmbeddedPersistentVolumeClaim
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmbeddedPersistentVolumeClaim.
func (*EmbeddedPersistentVolumeClaim) DeepCopyInto ¶
func (in *EmbeddedPersistentVolumeClaim) DeepCopyInto(out *EmbeddedPersistentVolumeClaim)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type 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"` // "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 ¶
func (in *EmbeddedPodDisruptionBudgetSpec) DeepCopy() *EmbeddedPodDisruptionBudgetSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EmbeddedPodDisruptionBudgetSpec.
func (*EmbeddedPodDisruptionBudgetSpec) DeepCopyInto ¶
func (in *EmbeddedPodDisruptionBudgetSpec) DeepCopyInto(out *EmbeddedPodDisruptionBudgetSpec)
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 service port this endpoint refers to. Mutually exclusive with targetPort. // +optional Port string `json:"port,omitempty"` // Name or number of the pod port this endpoint refers to. Mutually exclusive with port. // +optional TargetPort *intstr.IntOrString `json:"targetPort,omitempty"` // HTTP path to scrape for metrics. // +optional Path string `json:"path,omitempty"` // HTTP scheme to use for scraping. // +optional // +kubebuilder:validation:Enum=http;https 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"` // 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"` // SampleLimit defines per-endpoint 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"` // OAuth2 defines auth configuration // +optional OAuth2 *OAuth2 `json:"oauth2,omitempty"` // Authorization with http header Authorization // +optional Authorization *Authorization `json:"authorization,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 service scrape and accessible by // the victoria-metrics operator. // +optional // +nullable BearerTokenSecret *v1.SecretKeySelector `json:"bearerTokenSecret,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"` // BasicAuth allow an endpoint to authenticate over basic authentication // More info: https://prometheus.io/docs/operating/configuration/#endpoints // +optional BasicAuth *BasicAuth `json:"basicAuth,omitempty"` // MetricRelabelConfigs to apply to samples before ingestion. // +optional MetricRelabelConfigs []*RelabelConfig `json:"metricRelabelConfigs,omitempty"` // RelabelConfigs to apply to samples before scraping. // More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config // +optional RelabelConfigs []*RelabelConfig `json:"relabelConfigs,omitempty"` // ProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint. // +optional ProxyURL *string `json:"proxyURL,omitempty"` // VMScrapeParams defines VictoriaMetrics specific scrape parametrs // +optional VMScrapeParams *VMScrapeParams `json:"vm_scrape_params,omitempty"` // AttachMetadata configures metadata attaching from service discovery // +optional AttachMetadata AttachMetadata `json:"attach_metadata,omitempty"` }
Endpoint defines a scrapeable endpoint serving Prometheus metrics. +k8s:openapi-gen=true
func (*Endpoint) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoint.
func (*Endpoint) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type 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 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. // +kubebuilder:validation:MinLength:=1 // +required Zone string `json:"zone"` // Filter can be used optionally to filter the instance list by other criteria // Syntax of this filter is described in the filter query parameter section: // https://cloud.google.com/compute/docs/reference/latest/instances/list // +optional Filter *string `json:"filter,omitempty"` // The port to scrape metrics from. If using the public IP address, this must // instead be specified in the relabeling rule. // +optional Port *int `json:"port"` // The tag separator is used to separate the tags on concatenation // +optional TagSeparator *string `json:"tagSeparator,omitempty"` }
GCESDConfig configures scrape targets from GCP GCE instances. The private IP address is used by default, but may be changed to the public IP address with relabeling. See https://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 { BasicAuth *BasicAuth `json:"basicAuth,omitempty"` OAuth2 *OAuth2 `json:"oauth2,omitempty"` TLSConfig *TLSConfig `json:"tlsConfig,omitempty"` *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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPAuth.
func (*HTTPAuth) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HTTPConfig ¶
type HTTPConfig struct { // TODO oAuth2 support // BasicAuth for the client. // +optional BasicAuth *BasicAuth `json:"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"` // BearerTokenFile defines filename for bearer token, it must be mounted to pod. // +optional BearerTokenFile string `json:"bearer_token_file,omitempty"` // TLS configuration for the client. // +optional TLSConfig *TLSConfig `json:"tls_config,omitempty"` // Optional proxy URL. // +optional ProxyURL string `json:"proxyURL,omitempty"` }
HTTPConfig defines a client HTTP configuration. See https://prometheus.io/docs/alerting/latest/configuration/#http_config
func (*HTTPConfig) DeepCopy ¶
func (in *HTTPConfig) DeepCopy() *HTTPConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HTTPConfig.
func (*HTTPConfig) DeepCopyInto ¶
func (in *HTTPConfig) DeepCopyInto(out *HTTPConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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.html#scraping-targets-via-a-proxy // +optional ProxyClientConfig *ProxyAuth `json:"proxy_client_config,omitempty"` }
HTTPSDConfig defines a HTTP service discovery configuration See 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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Image.
func (*Image) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ImageConfig ¶
type ImageConfig struct { Href string `json:"href,omitempty"` Source string `json:"source"` 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 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.html#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 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. // Documentation - https://docs.victoriametrics.com/enterprise.html // for more information, visit https://victoriametrics.com/products/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"` }
License holds license key for enterprise features. Using license key is supported starting from VictoriaMetrics v1.94.0 See: https://docs.victoriametrics.com/enterprise.html
func (*License) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new License.
func (*License) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*License) IsProvided ¶
IsProvided returns true if license is provided.
func (*License) MaybeAddToArgs ¶
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 ¶
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"` // The incoming webhook URL // one of `urlSecret` and `url` must be defined. // +optional URL *string `json:"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"` // 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"` }
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 MuteTimeInterval ¶
type MuteTimeInterval struct { // Name of interval // +required Name string `json:"name,omitempty"` // TimeIntervals interval configuration // +required TimeIntervals []TimeInterval `json:"time_intervals"` }
MuteTimeInterval for alerts
func (*MuteTimeInterval) DeepCopy ¶
func (in *MuteTimeInterval) DeepCopy() *MuteTimeInterval
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MuteTimeInterval.
func (*MuteTimeInterval) DeepCopyInto ¶
func (in *MuteTimeInterval) DeepCopyInto(out *MuteTimeInterval)
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"` // The secret containing the OAuth2 client secret // +optional ClientSecret *v1.SecretKeySelector `json:"client_secret,omitempty"` // ClientSecretFile defines path for client secret file. // +optional ClientSecretFile string `json:"client_secret_file,omitempty"` // The URL to fetch the token from // +kubebuilder:validation:MinLength=1 // +required TokenURL string `json:"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"` }
OAuth2 defines OAuth2 configuration
func (*OAuth2) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OAuth2.
func (*OAuth2) DeepCopyInto ¶
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 *v1.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 *v1.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 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"` // The secret's key that contains the OpsGenie API key. // It must be at them same namespace as CRD // +optional APIKey *v1.SecretKeySelector `json:"api_key,omitempty"` // The URL to send OpsGenie API requests to. // +optional APIURL string `json:"apiURL,omitempty"` // Alert text limited to 130 characters. // +optional Message string `json:"message,omitempty"` // Description of the incident. // +optional Description string `json:"description,omitempty"` // Backlink to the sender of the notification. // +optional Source string `json:"source,omitempty"` // Comma separated list of tags attached to the notifications. // +optional Tags string `json:"tags,omitempty"` // Additional alert note. // +optional Note string `json:"note,omitempty"` // Priority level of alert. Possible values are P1, P2, P3, P4, and P5. // +optional Priority string `json:"priority,omitempty"` // 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"` // HTTP client configuration. // +optional HTTPConfig *HTTPConfig `json:"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 ¶
func (in *OpsGenieConfigResponder) DeepCopy() *OpsGenieConfigResponder
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"` // 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"` // 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"` // 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"` // 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 PagerDutyDetails `json:"details,omitempty"` // HTTP client configuration. // +optional HTTPConfig *HTTPConfig `json:"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 PagerDutyDetails ¶
PagerDutyDetails details for config
func (PagerDutyDetails) DeepCopy ¶
func (in PagerDutyDetails) DeepCopy() PagerDutyDetails
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PagerDutyDetails.
func (PagerDutyDetails) DeepCopyInto ¶
func (in PagerDutyDetails) DeepCopyInto(out *PagerDutyDetails)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PagerDutyDetails) UnmarshalYAML ¶
func (pdd *PagerDutyDetails) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements interface
type PodMetricsEndpoint ¶
type PodMetricsEndpoint struct { // Name of the pod port this endpoint refers to. Mutually exclusive with targetPort. // +optional Port string `json:"port,omitempty"` // Deprecated: Use 'port' instead. // +optional TargetPort *intstr.IntOrString `json:"targetPort,omitempty"` // HTTP path to scrape for metrics. // +optional Path string `json:"path,omitempty"` // HTTP scheme to use for scraping. // +optional // +kubebuilder:validation:Enum=http;https 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"` // 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"` // SampleLimit defines per-podEndpoint 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"` // 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"` // MetricRelabelConfigs to apply to samples before ingestion. // +optional MetricRelabelConfigs []*RelabelConfig `json:"metricRelabelConfigs,omitempty"` // RelabelConfigs to apply to samples before ingestion. // More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config // +optional RelabelConfigs []*RelabelConfig `json:"relabelConfigs,omitempty"` // ProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint. // +optional ProxyURL *string `json:"proxyURL,omitempty"` // BasicAuth allow an endpoint to authenticate over basic authentication // More info: https://prometheus.io/docs/operating/configuration/#endpoints // +optional BasicAuth *BasicAuth `json:"basicAuth,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 service scrape and accessible by // the victoria-metrics operator. // +optional // +nullable BearerTokenSecret *v1.SecretKeySelector `json:"bearerTokenSecret,omitempty"` // TLSConfig configuration to use when scraping the endpoint // +optional TLSConfig *TLSConfig `json:"tlsConfig,omitempty"` // OAuth2 defines auth configuration // +optional OAuth2 *OAuth2 `json:"oauth2,omitempty"` // Authorization with http header Authorization // +optional Authorization *Authorization `json:"authorization,omitempty"` // VMScrapeParams defines VictoriaMetrics specific scrape parametrs // +optional VMScrapeParams *VMScrapeParams `json:"vm_scrape_params,omitempty"` // 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 Prometheus metrics. +k8s:openapi-gen=true
func (*PodMetricsEndpoint) DeepCopy ¶
func (in *PodMetricsEndpoint) DeepCopy() *PodMetricsEndpoint
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodMetricsEndpoint.
func (*PodMetricsEndpoint) DeepCopyInto ¶
func (in *PodMetricsEndpoint) DeepCopyInto(out *PodMetricsEndpoint)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type 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 before ingestion. // More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config RelabelConfigs []*RelabelConfig `json:"relabelingConfigs,omitempty"` }
ProbeTargetIngress defines the set of Ingress objects considered for probing. +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"` 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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyAuth.
func (*ProxyAuth) DeepCopyInto ¶
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"` // 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"` // 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"` // 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"` }
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"` // PagerDutyConfigs defines pager duty notification configurations. // +optional PagerDutyConfigs []PagerDutyConfig `json:"pagerduty_configs,omitempty"` // PushoverConfigs defines push over notification configurations. // +optional PushoverConfigs []PushoverConfig `json:"pushover_configs,omitempty"` // SlackConfigs defines slack notification configurations. // +optional SlackConfigs []SlackConfig `json:"slack_configs,omitempty"` // OpsGenieConfigs defines ops genie notification configurations. // +optional OpsGenieConfigs []OpsGenieConfig `json:"opsgenie_configs,omitempty"` // WebhookConfigs defines webhook notification configurations. // +optional WebhookConfigs []WebhookConfig `json:"webhook_configs,omitempty"` // VictorOpsConfigs defines victor ops notification configurations. // +optional VictorOpsConfigs []VictorOpsConfig `json:"victorops_configs,omitempty"` // WeChatConfigs defines wechat notification configurations. // +optional WeChatConfigs []WeChatConfig `json:"wechat_configs,omitempty"` // +optional TelegramConfigs []TelegramConfig `json:"telegram_configs,omitempty"` // +optional MSTeamsConfigs []MSTeamsConfig `json:"msteams_configs,omitempty"` // +optional DiscordConfigs []DiscordConfig `json:"discord_configs,omitempty"` // +optional SNSConfigs []SnsConfig `json:"sns_configs,omitempty"` // +optional WebexConfigs []WebexConfig `json:"webex_configs,omitempty"` }
Receiver defines one or more notification integrations.
func (*Receiver) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Receiver.
func (*Receiver) DeepCopyInto ¶
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, being applied to samples before ingestion. It defines `<metric_relabel_configs>`-section of configuration. More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs +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
func (*RelabelConfig) UnmarshalJSON ¶
func (rc *RelabelConfig) UnmarshalJSON(src []byte) error
UnmarshalJSON implements interface handles cases for snake and camel cases of json tags
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:"-,omitempty"` // Child routes. // https://prometheus.io/docs/alerting/latest/configuration/#route RawRoutes []apiextensionsv1.JSON `json:"routes,omitempty"` // MuteTimeIntervals for alerts // +optional MuteTimeIntervals []string `json:"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"` }
Route defines a node in the routing tree.
func (*Route) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Route.
func (*Route) DeepCopyInto ¶
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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Rule.
func (*Rule) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type RuleGroup ¶
type RuleGroup struct { // Name of 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"` // 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 withing a group. Is compatible only with VM datasource. // See more details at 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 at https://docs.victoriametrics.com/vmalert.html#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 // +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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuleGroup.
func (*RuleGroup) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type 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) BuildSelectorWithPrefix ¶
func (c *SecretOrConfigMap) BuildSelectorWithPrefix(prefix string) string
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
func (*SecretOrConfigMap) Name ¶
func (c *SecretOrConfigMap) Name() string
func (*SecretOrConfigMap) Validate ¶
func (c *SecretOrConfigMap) Validate() error
Validate semantically validates the given TLSConfig.
type SecretOrConfigMapValidationError ¶
type SecretOrConfigMapValidationError struct {
// contains filtered or unexported fields
}
SecretOrConfigMapValidationError is returned by SecretOrConfigMap.Validate() on semantically invalid configurations. +k8s:openapi-gen=false
func (*SecretOrConfigMapValidationError) DeepCopy ¶
func (in *SecretOrConfigMapValidationError) DeepCopy() *SecretOrConfigMapValidationError
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretOrConfigMapValidationError.
func (*SecretOrConfigMapValidationError) DeepCopyInto ¶
func (in *SecretOrConfigMapValidationError) DeepCopyInto(out *SecretOrConfigMapValidationError)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*SecretOrConfigMapValidationError) Error ¶
func (e *SecretOrConfigMapValidationError) Error() string
type 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"` // secret key selector to get the keys from a Kubernetes Secret // +optional AccessKeySelector *v1.SecretKeySelector `json:"access_key_selector,omitempty"` // secret key selector to get the keys from a Kubernetes Secret // +optional SecretKey *v1.SecretKeySelector `json:"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"` }
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"` // The secret's key that contains the Slack webhook URL. // It must be at them same namespace as CRD // +optional APIURL *v1.SecretKeySelector `json:"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"` // +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"` Footer string `json:"footer,omitempty"` // +optional Fallback string `json:"fallback,omitempty"` // +optional CallbackID string `json:"callback_id,omitempty"` // +optional IconEmoji string `json:"icon_emoji,omitempty"` // +optional IconURL string `json:"icon_url,omitempty"` // +optional ImageURL string `json:"image_url,omitempty"` // +optional ThumbURL string `json:"thumb_url,omitempty"` // +optional LinkNames bool `json:"link_names,omitempty"` // +optional MrkdwnIn []string `json:"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"` }
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"` // +optional DismissText string `json:"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 ¶
func (in *SlackConfirmationField) DeepCopy() *SlackConfirmationField
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"` // The api URL // +optional URL string `json:"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"` // 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"` // 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"` // 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"` }
func (*SnsConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SnsConfig.
func (*SnsConfig) DeepCopyInto ¶
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 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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StaticRef.
func (*StaticRef) DeepCopyInto ¶
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 Rules []StreamAggrRule `json:"rules"` // Allows writing both raw and aggregate data // +optional KeepInput bool `json:"keepInput,omitempty"` // Allow drop all the input samples after the aggregation DropInput bool `json:"dropInput,omitempty"` // Allows setting different de-duplication intervals per each configured remote storage // +optional DedupInterval string `json:"dedupInterval,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.
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"` // StalenessInterval defines an interval after which the series state will be reset if no samples have been sent during it. StalenessInterval string `json:"staleness_interval,omitempty" yaml:"staleness_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. FlushOnShutdown bool `json:"flush_on_shutdown,omitempty" yaml:"flush_on_shutdown,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"` // 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"` // 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"` }
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) MarshalYAML ¶
func (m StringOrArray) MarshalYAML() (interface{}, error)
func (*StringOrArray) UnmarshalJSON ¶
func (m *StringOrArray) UnmarshalJSON(data []byte) error
func (*StringOrArray) UnmarshalYAML ¶
func (m *StringOrArray) UnmarshalYAML(unmarshal func(interface{}) error) error
type SubRoute ¶
type SubRoute Route
func (*SubRoute) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubRoute.
func (*SubRoute) DeepCopyInto ¶
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"` // Stuct 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"` // 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"` // Secret containing the client key file for the targets. // +optional KeySecret *v1.SecretKeySelector `json:"keySecret,omitempty"` // Used to verify the hostname for the targets. // +optional ServerName string `json:"serverName,omitempty"` // Disable target certificate validation. // +optional InsecureSkipVerify bool `json:"insecureSkipVerify,omitempty"` }
TLSConfig specifies TLSConfig configuration parameters. +k8s:openapi-gen=true
func (*TLSConfig) BuildAssetPath ¶
func (*TLSConfig) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSConfig.
func (*TLSConfig) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type TLSConfigValidationError ¶
type TLSConfigValidationError struct {
// contains filtered or unexported fields
}
TLSConfigValidationError is returned by TLSConfig.Validate() on semantically invalid tls configurations. +k8s:openapi-gen=false
func (*TLSConfigValidationError) DeepCopy ¶
func (in *TLSConfigValidationError) DeepCopy() *TLSConfigValidationError
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TLSConfigValidationError.
func (*TLSConfigValidationError) DeepCopyInto ¶
func (in *TLSConfigValidationError) DeepCopyInto(out *TLSConfigValidationError)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*TLSConfigValidationError) Error ¶
func (e *TLSConfigValidationError) Error() string
type 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"` // Default port for target. // +optional Port string `json:"port,omitempty"` // HTTP path to scrape for metrics. // +optional Path string `json:"path,omitempty"` // HTTP scheme to use for scraping. // +optional // +kubebuilder:validation:Enum=http;https 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"` // 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 service scrape and accessible by // the victoria-metrics operator. // +optional // +nullable BearerTokenSecret *v1.SecretKeySelector `json:"bearerTokenSecret,omitempty"` // BasicAuth allow an endpoint to authenticate over basic authentication // More info: https://prometheus.io/docs/operating/configuration/#endpoints // +optional BasicAuth *BasicAuth `json:"basicAuth,omitempty"` // Authorization with http header Authorization // +optional Authorization *Authorization `json:"authorization,omitempty"` // MetricRelabelConfigs to apply to samples before ingestion. // +optional MetricRelabelConfigs []*RelabelConfig `json:"metricRelabelConfigs,omitempty"` // RelabelConfigs to apply to samples before scraping. // More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config // +optional RelabelConfigs []*RelabelConfig `json:"relabelConfigs,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"` // VMScrapeParams defines VictoriaMetrics specific scrape parametrs // +optional VMScrapeParams *VMScrapeParams `json:"vm_scrape_params,omitempty"` }
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"` // QueryParams []string `json:"queryParams,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"` // 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"` // 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"` // LoadBalancingPolicy defines load balancing policy to use for backend urls. // Supported policies: least_loaded, first_available. // See https://docs.victoriametrics.com/vmauth.html#load-balancing for more details (default "least_loaded") // +optional // +kubebuilder:validation:Enum=least_loaded;first_available LoadBalancingPolicy *string `json:"load_balancing_policy,omitempty"` // DropSrcPathPrefixParts is the number of `/`-delimited request path prefix parts to drop before proxying the request to backend. // See https://docs.victoriametrics.com/vmauth.html#dropping-request-path-prefix for more details. // +optional DropSrcPathPrefixParts *int `json:"drop_src_path_prefix_parts,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 ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TargetRef.
func (*TargetRef) DeepCopyInto ¶
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"` // APIUrl the Telegram API URL i.e. https://api.telegram.org. // +optional APIUrl string `json:"api_url,omitempty"` // BotToken token for the bot // https://core.telegram.org/bots/api BotToken *v1.SecretKeySelector `json:"bot_token"` // ChatID is ID of the chat where to send the messages. ChatID int `json:"chat_id"` // Message is templated message // +optional Message string `json:"message,omitempty"` // DisableNotifications // +optional DisableNotifications *bool `json:"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"` // HTTP client configuration. // +optional HTTPConfig *HTTPConfig `json:"http_config,omitempty"` }
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"` // Months defines list of calendar months identified by a case-insentive 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 TimeRange ¶
type TimeRange struct { // StartTime for example HH:MM // +required StartTime string `json:"start_time"` // EndTime for example HH:MM // +required EndTime string `json:"end_time"` }
TimeRange ranges inclusive of the starting time and exclusive of the end time
func (*TimeRange) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TimeRange.
func (*TimeRange) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type UpdateStatus ¶
type UpdateStatus string
type VMAgent ¶
type VMAgent struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec VMAgentSpec `json:"spec,omitempty"` 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: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"
func (VMAgent) AnnotationsFiltered ¶
func (*VMAgent) AsCRDOwner ¶
func (cr *VMAgent) AsCRDOwner() []metav1.OwnerReference
AsCRDOwner implements interface
func (*VMAgent) AsOwner ¶
func (cr *VMAgent) AsOwner() []metav1.OwnerReference
func (*VMAgent) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMAgent.
func (*VMAgent) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VMAgent) DeepCopyObject ¶
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 (VMAgent) GetServiceAccountName ¶
func (*VMAgent) HasAnyRelabellingConfigs ¶
HasAnyRelabellingConfigs checks if vmagent has any defined relabeling rules
func (*VMAgent) HasAnyStreamAggrConfigs ¶
HasAnyStreamAggrConfigs checks if agent has any streaming aggregation config defined
func (*VMAgent) HasSpecChanges ¶
HasSpecChanges compares spec with last applied cluster spec stored in annotation
func (VMAgent) HealthPath ¶
func (VMAgent) IsOwnsServiceAccount ¶
IsOwnsServiceAccount checks if service account owned by CR
func (*VMAgent) IsUnmanaged ¶
IsUnmanaged checks if object should managed any config objects
func (*VMAgent) LastAppliedSpecAsPatch ¶
LastAppliedSpecAsPatch return last applied cluster spec as patch annotation
func (VMAgent) MetricPath ¶
func (VMAgent) PodAnnotations ¶
func (VMAgent) PrefixedName ¶
func (*VMAgent) Probe ¶
func (cr *VMAgent) Probe() *EmbeddedProbes
func (VMAgent) ProbeNeedLiveness ¶
func (*VMAgent) ProbeScheme ¶
func (VMAgent) RelabelingAssetName ¶
func (VMAgent) STSUpdateStrategy ¶
func (cr VMAgent) STSUpdateStrategy() appsv1.StatefulSetUpdateStrategyType
func (VMAgent) SelectorLabels ¶
func (*VMAgent) SetUpdateStatusTo ¶
func (cr *VMAgent) SetUpdateStatusTo(ctx context.Context, r client.Client, status UpdateStatus, maybeErr error) error
SetStatusTo changes update status with optional reason of fail
func (*VMAgent) SetupWebhookWithManager ¶
func (VMAgent) StreamAggrConfigName ¶
func (VMAgent) TLSAssetName ¶
func (*VMAgent) ValidateCreate ¶
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*VMAgent) ValidateDelete ¶
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
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 MaxDiskUsagePerURL *int64 `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 in multi-tenant mode with direct cluster support // docs https://docs.victoriametrics.com/vmagent.html#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 ¶
func (in *VMAgentRemoteWriteSettings) DeepCopy() *VMAgentRemoteWriteSettings
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMAgentRemoteWriteSettings.
func (*VMAgentRemoteWriteSettings) DeepCopyInto ¶
func (in *VMAgentRemoteWriteSettings) DeepCopyInto(out *VMAgentRemoteWriteSettings)
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"` }
VMAgentRemoteWriteSpec defines the remote storage configuration for VmAgent +k8s:openapi-gen=true
func (*VMAgentRemoteWriteSpec) AsConfigMapKey ¶
func (rw *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 (rw *VMAgentRemoteWriteSpec) AsSecretKey(idx int, suffix string) string
AsSecretKey key for kubernetes secret data
func (*VMAgentRemoteWriteSpec) DeepCopy ¶
func (in *VMAgentRemoteWriteSpec) DeepCopy() *VMAgentRemoteWriteSpec
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.
func (*VMAgentRemoteWriteSpec) HasStreamAggr ¶
func (rw *VMAgentRemoteWriteSpec) HasStreamAggr() bool
HasStreamAggr returns true if stream aggregation is enabled for this remoteWrite
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"` // Image - docker image settings for VMAgent // if no specified operator uses default config version // +optional Image Image `json:"image,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"` // Secrets is a list of Secrets in the same namespace as the vmagent // object, which shall be mounted into the vmagent Pods. // will be mounted at path /etc/vm/secrets // +optional Secrets []string `json:"secrets,omitempty"` // ConfigMaps is a list of ConfigMaps in the same namespace as the vmagent // object, which shall be mounted into the vmagent Pods. // will be mounted at path /etc/vm/configs // +optional ConfigMaps []string `json:"configMaps,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"` // MinReadySeconds defines a minim number os seconds to wait before starting update next pod // if previous in healthy state // +optional MinReadySeconds int32 `json:"minReadySeconds,omitempty"` // ReplicaCount is the expected size of the VMAgent cluster. The controller will // eventually make the size of the running cluster equal to the expected // size. // NOTE enable VMSingle deduplication for replica usage // +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 StatefulSet's revision history. // Defaults to 10. // +optional RevisionHistoryLimitCount *int32 `json:"revisionHistoryLimitCount,omitempty"` // Volumes allows configuration of additional volumes on the output deploy definition. // Volumes specified will be appended to other volumes that are generated as a result of // StorageSpec objects. // +optional Volumes []v1.Volume `json:"volumes,omitempty"` // VolumeMounts allows configuration of additional VolumeMounts on the output deploy definition. // VolumeMounts specified will be appended to other VolumeMounts in the vmagent container, // that are generated as a result of StorageSpec objects. // +optional VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"` // Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ // if not specified - default setting 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"` // 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"` // SecurityContext holds pod-level security attributes and common container settings. // This defaults to the default PodSecurityContext. // +optional SecurityContext *v1.PodSecurityContext `json:"securityContext,omitempty"` // ServiceAccountName is the name of the ServiceAccount to use to run the // VMAgent Pods. // +optional // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="ServiceAccount name",xDescriptors="urn:alm:descriptor:io.kubernetes:ServiceAccount" ServiceAccountName string `json:"serviceAccountName,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/ RuntimeClassName *string `json:"runtimeClassName,omitempty"` // HostAliases provides mapping between ip and hostnames, // that would be propagated to pod, // cannot be used with HostNetwork. // +optional HostAliases []v1.HostAlias `json:"host_aliases,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. Those can be used to e.g. // fetch secrets for injection into the vmagent configuration from external sources. Any // errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ // Using initContainers for any use case other then secret fetching is entirely outside the scope // of what the maintainers will support and by doing so, you accept that this behaviour may break // at any time without notice. // +optional InitContainers []v1.Container `json:"initContainers,omitempty"` // PriorityClassName 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 set DNS policy for the pod // +optional DNSPolicy v1.DNSPolicy `json:"dnsPolicy,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"` // 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/. // +optional APIServerConfig *APIServerConfig `json:"aPIServerConfig,omitempty"` // OverrideHonorLabels if set to true overrides all user configured honor_labels. // If HonorLabels is set in ServiceScrape or PodScrape 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 // the podscrape and vmservicescrape configs, 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"` // 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 // +optional 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"` // 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 PodScrapes 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"` // ArbitraryFSAccessThroughSMs configures whether configuration // based on a service scrape can access arbitrary files on the file system // of the VMAgent container e.g. bearer token files. // +optional ArbitraryFSAccessThroughSMs ArbitraryFSAccessThroughSMsConfig `json:"arbitraryFSAccessThroughSMs,omitempty"` // InsertPorts - additional listen ports for data ingestion. InsertPorts *InsertPorts `json:"insertPorts,omitempty"` // Port listen address // +optional Port string `json:"port,omitempty"` // ConfigReloaderExtraArgs that will be passed to VMAuths config-reloader container // for example resyncInterval: "30s" // +optional ConfigReloaderExtraArgs map[string]string `json:"configReloaderExtraArgs,omitempty"` // ExtraArgs that will be passed to VMAgent pod // for example remoteWrite.tmpDataPath: /tmp // it would be converted to flag --remoteWrite.tmpDataPath=/tmp // +optional ExtraArgs map[string]string `json:"extraArgs,omitempty"` // ExtraEnvs that will be added to VMAgent pod // +optional ExtraEnvs []v1.EnvVar `json:"extraEnvs,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 https://docs.victoriametrics.com/vmagent.html#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"` // NodeSelector Define which Nodes the Pods are scheduled on. // +optional NodeSelector map[string]string `json:"nodeSelector,omitempty"` // 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"` // TerminationGracePeriodSeconds period for container graceful termination // +optional TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,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"` // 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"` // ReadinessGates defines pod readiness gates ReadinessGates []v1.PodReadinessGate `json:"readinessGates,omitempty"` // ClaimTemplates allows adding additional VolumeClaimTemplates for VMAgent in StatefulMode ClaimTemplates []v1.PersistentVolumeClaim `json:"claimTemplates,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"` // 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: https://docs.victoriametrics.com/enterprise.html // +optional License *License `json:"license,omitempty"` }
VMAgentSpec defines the desired state of VMAgent +k8s:openapi-gen=true +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version",description="The version of VMAgent" +kubebuilder:printcolumn:name="ReplicaCount",type="integer",JSONPath=".spec.replicas",description="The desired replicas number of VMAgent" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
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"` // UpdatedReplicas Total number of non-terminated pods targeted by this VMAgent // cluster that have the desired version spec. UpdatedReplicas int32 `json:"updatedReplicas,omitempty"` // AvailableReplicas Total number of available pods (ready for at least minReadySeconds) // targeted by this VMAlert cluster. AvailableReplicas int32 `json:"availableReplicas,omitempty"` UnavailableReplicas int32 `json:"unavailableReplicas,omitempty"` // UpdateStatus defines a status for update rollout, effective only for statefuleMode UpdateStatus UpdateStatus `json:"updateStatus,omitempty"` // Reason defines fail reason for update process, effective only for statefuleMode Reason string `json:"reason,omitempty"` }
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.
type VMAlert ¶
type VMAlert struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec VMAlertSpec `json:"spec,omitempty"` 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:subresource:status +kubebuilder:resource:path=vmalerts,scope=Namespaced +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.updateStatus",description="Current status of update rollout"
func (VMAlert) AnnotationsFiltered ¶
func (*VMAlert) AsCRDOwner ¶
func (cr *VMAlert) AsCRDOwner() []metav1.OwnerReference
AsCRDOwner implements interface
func (*VMAlert) AsOwner ¶
func (cr *VMAlert) AsOwner() []metav1.OwnerReference
func (*VMAlert) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMAlert.
func (*VMAlert) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VMAlert) DeepCopyObject ¶
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) GetNotifierSelectors ¶
func (cr *VMAlert) GetNotifierSelectors() []*DiscoverySelector
func (VMAlert) GetServiceAccountName ¶
func (*VMAlert) HasSpecChanges ¶
HasSpecChanges compares spec with last applied cluster spec stored in annotation
func (VMAlert) IsOwnsServiceAccount ¶
func (*VMAlert) IsUnmanaged ¶
IsUnmanaged checks if object should managed any config objects
func (*VMAlert) LastAppliedSpecAsPatch ¶
LastAppliedSpecAsPatch return last applied cluster spec as patch annotation
func (VMAlert) MetricPath ¶
func (VMAlert) NeedDedupRules ¶
func (VMAlert) NotifierAsMapKey ¶
NotifierAsMapKey - returns cr name with suffix for notifier token/auth maps.
func (VMAlert) PodAnnotations ¶
func (VMAlert) PrefixedName ¶
func (*VMAlert) Probe ¶
func (cr *VMAlert) Probe() *EmbeddedProbes
func (VMAlert) ProbeNeedLiveness ¶
func (*VMAlert) ProbeScheme ¶
func (VMAlert) RulesConfigMapSelector ¶
func (cr VMAlert) RulesConfigMapSelector() client.ListOption
func (VMAlert) SelectorLabels ¶
func (*VMAlert) SetUpdateStatusTo ¶
func (cr *VMAlert) SetUpdateStatusTo(ctx context.Context, r client.Client, status UpdateStatus, maybeErr error) error
SetStatusTo changes update status with optional reason of fail
func (*VMAlert) SetupWebhookWithManager ¶
func (VMAlert) TLSAssetName ¶
func (*VMAlert) ValidateCreate ¶
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*VMAlert) ValidateDelete ¶
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
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 ¶
func (in *VMAlertDatasourceSpec) DeepCopy() *VMAlertDatasourceSpec
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 ¶
func (in *VMAlertRemoteReadSpec) DeepCopy() *VMAlertRemoteReadSpec
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 ¶
func (in *VMAlertRemoteWriteSpec) DeepCopy() *VMAlertRemoteWriteSpec
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"` // Image - docker image settings for VMAlert // if no specified operator uses default config version // +optional Image Image `json:"image,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"` // Secrets is a list of Secrets in the same namespace as the VMAlert // object, which shall be mounted into the VMAlert Pods. // The Secrets are mounted into /etc/vm/secrets/<secret-name>. // +optional Secrets []string `json:"secrets,omitempty"` // ConfigMaps is a list of ConfigMaps in the same namespace as the VMAlert // object, which shall be mounted into the VMAlert Pods. // The ConfigMaps are mounted into /etc/vm/configs/<configmap-name>. // +optional ConfigMaps []string `json:"configMaps,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"` // MinReadySeconds defines a minim number os seconds to wait before starting update next pod // if previous in healthy state // +optional MinReadySeconds int32 `json:"minReadySeconds,omitempty"` // ReplicaCount is the expected size of the VMAlert cluster. The controller will // eventually make the size of the running cluster equal to the expected // size. // +optional // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Number of pods",xDescriptors="urn:alm:descriptor:com.tectonic.ui:podCount,urn:alm:descriptor:io.kubernetes:custom" 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 StatefulSet's revision history. // Defaults to 10. // +optional RevisionHistoryLimitCount *int32 `json:"revisionHistoryLimitCount,omitempty"` // Volumes allows configuration of additional volumes on the output Deployment definition. // Volumes specified will be appended to other volumes that are generated as a result of // StorageSpec objects. // +optional Volumes []v1.Volume `json:"volumes,omitempty"` // VolumeMounts allows configuration of additional VolumeMounts on the output Deployment definition. // VolumeMounts specified will be appended to other VolumeMounts in the VMAlert container, // that are generated as a result of StorageSpec objects. // +optional VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"` // Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Resources",xDescriptors="urn:alm:descriptor:com.tectonic.ui:resourceRequirements" // +optional Resources v1.ResourceRequirements `json:"resources,omitempty"` // 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"` // SecurityContext holds pod-level security attributes and common container settings. // This defaults to the default PodSecurityContext. // +optional SecurityContext *v1.PodSecurityContext `json:"securityContext,omitempty"` // ServiceAccountName is the name of the ServiceAccount to use to run the // VMAlert Pods. // +optional ServiceAccountName string `json:"serviceAccountName,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"` // 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. Those can be used to e.g. // fetch secrets for injection into the VMAlert configuration from external sources. Any // errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ // Using initContainers for any use case other then secret fetching is entirely outside the scope // of what the maintainers will support and by doing so, you accept that this behaviour may break // at any time without notice. // +optional InitContainers []v1.Container `json:"initContainers,omitempty"` // Priority 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"` // 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"` // 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"` // Port for listen // +optional Port string `json:"port,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"` // ConfigReloaderExtraArgs that will be passed to VMAuths config-reloader container // for example resyncInterval: "30s" // +optional ConfigReloaderExtraArgs map[string]string `json:"configReloaderExtraArgs,omitempty"` // ExtraArgs that will be passed to VMAlert pod // for example -remoteWrite.tmpDataPath=/tmp // +optional ExtraArgs map[string]string `json:"extraArgs,omitempty"` // ExtraEnvs that will be added to VMAlert pod // +optional ExtraEnvs []v1.EnvVar `json:"extraEnvs,omitempty"` // 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"` // NodeSelector Define which Nodes the Pods are scheduled on. // +optional NodeSelector map[string]string `json:"nodeSelector,omitempty"` // TerminationGracePeriodSeconds period for container graceful termination // +optional TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,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"` // ReadinessGates defines pod readiness gates ReadinessGates []v1.PodReadinessGate `json:"readinessGates,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"` // License allows to configure license key to be used for enterprise features. // Using license key is supported starting from VictoriaMetrics v1.94.0. // See: https://docs.victoriametrics.com/enterprise.html // +optional License *License `json:"license,omitempty"` }
VMAlertSpec defines the desired state of VMAlert +k8s:openapi-gen=true +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version",description="The version of VMAlert" +kubebuilder:printcolumn:name="ReplicaCount",type="integer",JSONPath=".spec.replicas",description="The desired replicas number of VmAlerts" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
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 { // ReplicaCount Total number of non-terminated pods targeted by this VMAlert // cluster (their labels match the selector). Replicas int32 `json:"replicas,omitempty"` // UpdatedReplicas Total number of non-terminated pods targeted by this VMAlert // cluster that have the desired version spec. UpdatedReplicas int32 `json:"updatedReplicas,omitempty"` // AvailableReplicas Total number of available pods (ready for at least minReadySeconds) // targeted by this VMAlert cluster. AvailableReplicas int32 `json:"availableReplicas,omitempty"` UnavailableReplicas int32 `json:"unavailableReplicas,omitempty"` // UpdateStatus defines a status for update rollout, effective only for statefuleMode UpdateStatus UpdateStatus `json:"updateStatus,omitempty"` // Reason defines fail reason for update process, effective only for statefuleMode Reason string `json:"reason,omitempty"` }
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.
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"` // 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:subresource:status +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.image.tag",description="The version of VMAlertmanager" +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 (cr *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
func (*VMAlertmanager) AsPodFQDN ¶
func (cr *VMAlertmanager) AsPodFQDN(idx int) string
func (*VMAlertmanager) AsURL ¶
func (cr *VMAlertmanager) AsURL() string
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) GetNSName ¶
func (cr VMAlertmanager) GetNSName() string
func (VMAlertmanager) GetServiceAccountName ¶
func (cr VMAlertmanager) GetServiceAccountName() string
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) MetricPath ¶
func (cr *VMAlertmanager) MetricPath() string
func (VMAlertmanager) PodAnnotations ¶
func (cr VMAlertmanager) PodAnnotations() map[string]string
func (VMAlertmanager) PodLabels ¶
func (cr VMAlertmanager) PodLabels() map[string]string
func (VMAlertmanager) PrefixedName ¶
func (cr VMAlertmanager) PrefixedName() string
func (*VMAlertmanager) Probe ¶
func (cr *VMAlertmanager) Probe() *EmbeddedProbes
func (*VMAlertmanager) ProbeNeedLiveness ¶
func (cr *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
func (VMAlertmanager) SelectorLabels ¶
func (cr VMAlertmanager) SelectorLabels() map[string]string
func (*VMAlertmanager) SetUpdateStatusTo ¶
func (cr *VMAlertmanager) SetUpdateStatusTo(ctx context.Context, r client.Client, status UpdateStatus, maybeErr error) error
SetStatusTo changes update status with optional reason of fail
func (*VMAlertmanager) SetupWebhookWithManager ¶
func (r *VMAlertmanager) SetupWebhookWithManager(mgr ctrl.Manager) error
func (VMAlertmanager) UpdateStrategy ¶
func (cr VMAlertmanager) UpdateStrategy() appsv1.StatefulSetUpdateStrategyType
func (*VMAlertmanager) ValidateCreate ¶
func (r *VMAlertmanager) ValidateCreate() (aw admission.Warnings, err error)
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*VMAlertmanager) ValidateDelete ¶
func (r *VMAlertmanager) ValidateDelete() (aw admission.Warnings, err error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*VMAlertmanager) ValidateUpdate ¶
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
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 +genclient +k8s:openapi-gen=true
func (*VMAlertmanagerConfig) AsKey ¶
func (amc *VMAlertmanagerConfig) AsKey() string
func (*VMAlertmanagerConfig) DeepCopy ¶
func (in *VMAlertmanagerConfig) DeepCopy() *VMAlertmanagerConfig
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) SetupWebhookWithManager ¶
func (r *VMAlertmanagerConfig) SetupWebhookWithManager(mgr ctrl.Manager) error
func (*VMAlertmanagerConfig) UnmarshalJSON ¶
func (cr *VMAlertmanagerConfig) UnmarshalJSON(src []byte) error
UnmarshalJSON implements json.Unmarshaler interface
func (*VMAlertmanagerConfig) Validate ¶
func (amc *VMAlertmanagerConfig) Validate() error
func (*VMAlertmanagerConfig) ValidateCreate ¶
func (r *VMAlertmanagerConfig) ValidateCreate() (aw admission.Warnings, err error)
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*VMAlertmanagerConfig) ValidateDelete ¶
func (r *VMAlertmanagerConfig) ValidateDelete() (aw admission.Warnings, err error)
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
func (*VMAlertmanagerConfig) ValidateUpdate ¶
func (r *VMAlertmanagerConfig) ValidateUpdate(old runtime.Object) (aw admission.Warnings, err error)
ValidateUpdate implements webhook.Validator so a webhook will be registered for the type
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 ¶
func (in *VMAlertmanagerConfigList) DeepCopy() *VMAlertmanagerConfigList
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. // +optional Route *Route `json:"route"` // Receivers defines alert receivers. // without defined Route, receivers will be skipped. // +optional Receivers []Receiver `json:"receivers"` // InhibitRules will only apply for alerts matching // the resource's namespace. // +optional InhibitRules []InhibitRule `json:"inhibit_rules,omitempty"` // MuteTimeInterval - global mute time // See https://prometheus.io/docs/alerting/latest/configuration/#mute_time_interval // +optional MutTimeIntervals []MuteTimeInterval `json:"mute_time_intervals,omitempty"` // ParsingError contents error with context if operator was failed to parse json object from kubernetes api server // TimeIntervals modern config option, use it instead of mute_time_intervals // +optional TimeIntervals []MuteTimeInterval `json:"time_intervals,omitempty"` ParsingError string `json:"-,omitempty" yaml:"-,omitempty"` }
VMAlertmanagerConfigSpec defines configuration for VMAlertmanagerConfig
func (*VMAlertmanagerConfigSpec) DeepCopy ¶
func (in *VMAlertmanagerConfigSpec) DeepCopy() *VMAlertmanagerConfigSpec
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 { // ErrorReason describes validation or any other errors. ErrorReason string `json:"reason,omitempty"` }
VMAlertmanagerConfigStatus defines the observed state of VMAlertmanagerConfig
func (*VMAlertmanagerConfigStatus) DeepCopy ¶
func (in *VMAlertmanagerConfigStatus) DeepCopy() *VMAlertmanagerConfigStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMAlertmanagerConfigStatus.
func (*VMAlertmanagerConfigStatus) DeepCopyInto ¶
func (in *VMAlertmanagerConfigStatus) DeepCopyInto(out *VMAlertmanagerConfigStatus)
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"` // Image - docker image settings for VMAlertmanager // if no specified operator uses default config version // +optional Image Image `json:"image,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"` // Secrets is a list of Secrets in the same namespace as the VMAlertmanager // object, which shall be mounted into the VMAlertmanager Pods. // The Secrets are mounted into /etc/vm/secrets/<secret-name> // +optional Secrets []string `json:"secrets,omitempty"` // ConfigMaps is a list of ConfigMaps in the same namespace as the VMAlertmanager // object, which shall be mounted into the VMAlertmanager Pods. // The ConfigMaps are mounted into /etc/vm/configs/<configmap-name>. // +optional ConfigMaps []string `json:"configMaps,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 LogLevel string `json:"logLevel,omitempty"` // LogFormat for VMAlertmanager to be configured with. // +optional LogFormat string `json:"logFormat,omitempty"` // MinReadySeconds defines a minim number os seconds to wait before starting update next pod // if previous in healthy state // +optional MinReadySeconds int32 `json:"minReadySeconds,omitempty"` // ReplicaCount Size is the expected size of the alertmanager cluster. The controller will // eventually make the size of the running cluster equal to the expected // +kubebuilder:validation:Minimum:=0 // +optional // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Number of pods",xDescriptors="urn:alm:descriptor:com.tectonic.ui:podCount,urn:alm:descriptor:io.kubernetes:custom" 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 StatefulSet's revision history. // Defaults to 10. // +optional RevisionHistoryLimitCount *int32 `json:"revisionHistoryLimitCount,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"` // Volumes allows configuration of additional volumes on the output StatefulSet definition. // Volumes specified will be appended to other volumes that are generated as a result of // StorageSpec objects. // +optional Volumes []v1.Volume `json:"volumes,omitempty"` // VolumeMounts allows configuration of additional VolumeMounts on the output StatefulSet definition. // VolumeMounts specified will be appended to other VolumeMounts in the alertmanager container, // that are generated as a result of StorageSpec objects. // +optional VolumeMounts []v1.VolumeMount `json:"volumeMounts,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"` // Paused If set to true all actions on the underlaying managed objects are not // goint to be performed, except for delete actions. // +optional Paused bool `json:"paused,omitempty"` // NodeSelector Define which Nodes the Pods are scheduled on. // +optional NodeSelector map[string]string `json:"nodeSelector,omitempty"` // Resources container resource request and limits, // https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Resources",xDescriptors="urn:alm:descriptor:com.tectonic.ui:resourceRequirements" // +optional Resources v1.ResourceRequirements `json:"resources,omitempty"` // 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"` // SecurityContext holds pod-level security attributes and common container settings. // This defaults to the default PodSecurityContext. // +optional SecurityContext *v1.PodSecurityContext `json:"securityContext,omitempty"` // ServiceAccountName is the name of the ServiceAccount to use // +optional // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="ServiceAccount name",xDescriptors="urn:alm:descriptor:io.kubernetes:ServiceAccount" ServiceAccountName string `json:"serviceAccountName,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"` // 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"` // Containers allows injecting additional containers or patching existing containers. // This is meant to allow adding an authentication proxy to an VMAlertmanager pod. // +optional Containers []v1.Container `json:"containers,omitempty"` // InitContainers allows adding initContainers to the pod definition. Those can be used to e.g. // fetch secrets for injection into the VMAlertmanager configuration from external sources. Any // errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ // Using initContainers for any use case other then secret fetching is entirely outside the scope // of what the maintainers will support and by doing so, you accept that this behaviour may break // at any time without notice. // +optional InitContainers []v1.Container `json:"initContainers,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"` // 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"` // 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"` // ConfigReloaderExtraArgs that will be passed to VMAuths config-reloader container // for example resyncInterval: "30s" // +optional ConfigReloaderExtraArgs map[string]string `json:"configReloaderExtraArgs,omitempty"` // ExtraArgs that will be passed to VMAlertmanager pod // for example log.level: debug // +optional ExtraArgs map[string]string `json:"extraArgs,omitempty"` // ExtraEnvs that will be added to VMAlertmanager pod // +optional ExtraEnvs []v1.EnvVar `json:"extraEnvs,omitempty"` // DisableNamespaceMatcher disables 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"` // 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"` // TerminationGracePeriodSeconds period for container graceful termination // +optional TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` // ReadinessGates defines pod readiness gates ReadinessGates []v1.PodReadinessGate `json:"readinessGates,omitempty"` // ClaimTemplates allows adding additional VolumeClaimTemplates for StatefulSet ClaimTemplates []v1.PersistentVolumeClaim `json:"claimTemplates,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"` }
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 { // Status defines a status of object update UpdateStatus UpdateStatus `json:"updateStatus,omitempty"` // Reason has non empty reason for update failure Reason string `json:"reason,omitempty,omitempty"` }
VMAlertmanagerStatus is the most recent observed status of the VMAlertmanager cluster Operator API itself. More info:
func (*VMAlertmanagerStatus) DeepCopy ¶
func (in *VMAlertmanagerStatus) DeepCopy() *VMAlertmanagerStatus
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.
type VMAuth ¶
type VMAuth struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec VMAuthSpec `json:"spec,omitempty"` 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:printcolumn:name="Status",type="string",JSONPath=".status.updateStatus",description="Current status of update rollout"
func (VMAuth) AnnotationsFiltered ¶
func (*VMAuth) AsCRDOwner ¶
func (cr *VMAuth) AsCRDOwner() []metav1.OwnerReference
AsCRDOwner implements interface
func (*VMAuth) AsOwner ¶
func (cr *VMAuth) AsOwner() []metav1.OwnerReference
func (VMAuth) ConfigSecretName ¶
func (*VMAuth) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMAuth.
func (*VMAuth) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VMAuth) DeepCopyObject ¶
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) GetServiceAccountName ¶
func (*VMAuth) HasSpecChanges ¶
HasSpecChanges compares spec with last applied cluster spec stored in annotation
func (VMAuth) IsOwnsServiceAccount ¶
func (*VMAuth) IsUnmanaged ¶
IsUnmanaged checks if object should managed any config objects
func (*VMAuth) LastAppliedSpecAsPatch ¶
LastAppliedSpecAsPatch return last applied cluster spec as patch annotation
func (VMAuth) MetricPath ¶
func (VMAuth) PodAnnotations ¶
func (VMAuth) PrefixedName ¶
func (*VMAuth) Probe ¶
func (cr *VMAuth) Probe() *EmbeddedProbes
func (*VMAuth) ProbeNeedLiveness ¶
func (*VMAuth) ProbeScheme ¶
func (VMAuth) SelectorLabels ¶
func (*VMAuth) SetUpdateStatusTo ¶
func (cr *VMAuth) SetUpdateStatusTo(ctx context.Context, r client.Client, status UpdateStatus, maybeErr error) error
SetStatusTo changes update status with optional reason of fail
func (*VMAuth) SetupWebhookWithManager ¶
func (*VMAuth) ValidateCreate ¶
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*VMAuth) ValidateDelete ¶
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
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 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"` // Image - docker image settings for VMAuth // if no specified operator uses default config version // +optional Image Image `json:"image,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"` // Secrets is a list of Secrets in the same namespace as the VMAuth // object, which shall be mounted into the VMAuth Pods. // +optional Secrets []string `json:"secrets,omitempty"` // ConfigMaps is a list of ConfigMaps in the same namespace as the VMAuth // object, which shall be mounted into the VMAuth Pods. // +optional ConfigMaps []string `json:"configMaps,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 VMAuth to be configured with. // +optional // +kubebuilder:validation:Enum=default;json LogFormat string `json:"logFormat,omitempty"` // MinReadySeconds defines a minim number os seconds to wait before starting update next pod // if previous in healthy state // +optional MinReadySeconds int32 `json:"minReadySeconds,omitempty"` // ReplicaCount is the expected size of the VMAuth // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Number of pods",xDescriptors="urn:alm:descriptor:com.tectonic.ui:podCount,urn:alm:descriptor:io.kubernetes:custom" 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 StatefulSet's revision history. // Defaults to 10. // +optional RevisionHistoryLimitCount *int32 `json:"revisionHistoryLimitCount,omitempty"` // Volumes allows configuration of additional volumes on the output deploy definition. // Volumes specified will be appended to other volumes that are generated as a result of // StorageSpec objects. // +optional Volumes []v1.Volume `json:"volumes,omitempty"` // VolumeMounts allows configuration of additional VolumeMounts on the output Deployment definition. // VolumeMounts specified will be appended to other VolumeMounts in the VMAuth container, // that are generated as a result of StorageSpec objects. // +optional VolumeMounts []v1.VolumeMount `json:"volumeMounts,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"` // 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"` // SecurityContext holds pod-level security attributes and common container settings. // This defaults to the default PodSecurityContext. // +optional SecurityContext *v1.PodSecurityContext `json:"securityContext,omitempty"` // ServiceAccountName is the name of the ServiceAccount to use to run the // VMAuth Pods. // +optional ServiceAccountName string `json:"serviceAccountName,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"` // 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. Those can be used to e.g. // fetch secrets for injection into the vmSingle configuration from external sources. Any // errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ // Using initContainers for any use case other then secret fetching is entirely outside the scope // of what the maintainers will support and by doing so, you accept that this behaviour may break // at any time without notice. // +optional InitContainers []v1.Container `json:"initContainers,omitempty"` // PriorityClassName 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"` // 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"` // Port listen port // +optional Port string `json:"port,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"` // 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"` // 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"` // ConfigReloaderExtraArgs that will be passed to VMAuths config-reloader container // for example resyncInterval: "30s" // +optional ConfigReloaderExtraArgs map[string]string `json:"configReloaderExtraArgs,omitempty"` // ExtraArgs that will be passed to VMAuth pod // for example remoteWrite.tmpDataPath: /tmp // +optional ExtraArgs map[string]string `json:"extraArgs,omitempty"` // ExtraEnvs that will be added to VMAuth pod // +optional ExtraEnvs []v1.EnvVar `json:"extraEnvs,omitempty"` // ServiceSpec that will be added to vmsingle service spec // +optional ServiceSpec *AdditionalServiceSpec `json:"serviceSpec,omitempty"` // ServiceScrapeSpec that will be added to vmauth VMServiceScrape spec // +optional ServiceScrapeSpec *VMServiceScrapeSpec `json:"serviceScrapeSpec,omitempty"` // PodDisruptionBudget created by operator // +optional PodDisruptionBudget *EmbeddedPodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"` // Ingress enables ingress configuration for VMAuth. Ingress *EmbeddedIngress `json:"ingress,omitempty"` // LivenessProbe that will be added to VMAuth pod *EmbeddedProbes `json:",inline"` // NodeSelector Define which Nodes the Pods are scheduled on. // +optional NodeSelector map[string]string `json:"nodeSelector,omitempty"` // TerminationGracePeriodSeconds period for container graceful termination // +optional TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` // ReadinessGates defines pod readiness gates ReadinessGates []v1.PodReadinessGate `json:"readinessGates,omitempty"` // +optional UnauthorizedAccessConfig []VMAuthUnauthorizedPath `json:"unauthorizedAccessConfig,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"` // License allows to configure license key to be used for enterprise features. // Using license key is supported starting from VictoriaMetrics v1.94.0. // See: https://docs.victoriametrics.com/enterprise.html // +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 // +optional ConfigSecret string `json:"configSecret,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 { // UpdateStatus defines a status for update rollout, effective only for statefuleMode UpdateStatus UpdateStatus `json:"updateStatus,omitempty"` // Reason defines fail reason for update process, effective only for statefuleMode Reason string `json:"reason,omitempty"` }
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.
type VMAuthUnauthorizedPath ¶
type VMAuthUnauthorizedPath struct { // +optional Paths []string `json:"src_paths,omitempty"` // +optional URLs []string `json:"url_prefix,omitempty"` // enterprise only IPFilters VMUserIPFilters `json:"ip_filters,omitempty"` Hosts []string `json:"src_hosts,omitempty"` // 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"` // 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"` // e.g. [429,503] // +optional RetryStatusCodes []int `json:"retry_status_codes,omitempty"` // Supported policies: least_loaded, first_available. // See https://docs.victoriametrics.com/vmauth.html#load-balancing for more details (default "least_loaded") // +optional // +kubebuilder:validation:Enum=least_loaded;first_available LoadBalancingPolicy *string `json:"load_balancing_policy,omitempty"` // See https://docs.victoriametrics.com/vmauth.html#dropping-request-path-prefix for more details. // +optional DropSrcPathPrefixParts *int `json:"drop_src_path_prefix_parts,omitempty"` }
VMAuthUnauthorizedPath defines url_map for unauthorized access
func (*VMAuthUnauthorizedPath) DeepCopy ¶
func (in *VMAuthUnauthorizedPath) DeepCopy() *VMAuthUnauthorizedPath
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMAuthUnauthorizedPath.
func (*VMAuthUnauthorizedPath) DeepCopyInto ¶
func (in *VMAuthUnauthorizedPath) DeepCopyInto(out *VMAuthUnauthorizedPath)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
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"` // 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.html#restore-commands // +optional Restore *VMRestore `json:"restore,omitempty"` }
func (*VMBackup) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMBackup.
func (*VMBackup) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (VMBackup) SnapshotCreatePathWithFlags ¶
type VMCluster ¶
type VMCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec VMClusterSpec `json:"spec"` 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: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.clusterStatus",description="Current status of cluster" +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (VMCluster) AnnotationsFiltered ¶
func (*VMCluster) AsCRDOwner ¶
func (cr *VMCluster) AsCRDOwner() []metav1.OwnerReference
AsCRDOwner implements interface
func (*VMCluster) AsOwner ¶
func (c *VMCluster) AsOwner() []metav1.OwnerReference
func (VMCluster) AvailableStorageNodeIDs ¶
func (*VMCluster) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMCluster.
func (*VMCluster) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VMCluster) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (VMCluster) FinalLabels ¶
func (VMCluster) GetServiceAccountName ¶
func (*VMCluster) HasSpecChanges ¶
HasSpecChanges compares cluster spec with last applied cluster spec stored in annotation
func (VMCluster) IsOwnsServiceAccount ¶
func (*VMCluster) LastAppliedSpecAsPatch ¶
LastAppliedSpecAsPatch return last applied cluster spec as patch annotation
func (VMCluster) MetricPathInsert ¶
func (VMCluster) MetricPathSelect ¶
func (VMCluster) MetricPathStorage ¶
func (VMCluster) PrefixedName ¶
func (VMCluster) SelectorLabels ¶
func (*VMCluster) SetUpdateStatusTo ¶
func (cr *VMCluster) SetUpdateStatusTo(ctx context.Context, r client.Client, status UpdateStatus, maybeErr error) error
SetStatusTo changes update status with optional reason of fail
func (*VMCluster) SetupWebhookWithManager ¶
func (VMCluster) VMInsertPodAnnotations ¶
func (VMCluster) VMInsertPodLabels ¶
func (VMCluster) VMInsertSelectorLabels ¶
func (*VMCluster) VMInsertURL ¶
func (VMCluster) VMSelectPodAnnotations ¶
func (VMCluster) VMSelectPodLabels ¶
func (VMCluster) VMSelectSelectorLabels ¶
func (*VMCluster) VMSelectURL ¶
func (VMCluster) VMStoragePodAnnotations ¶
func (VMCluster) VMStoragePodLabels ¶
func (VMCluster) VMStorageSelectorLabels ¶
func (*VMCluster) VMStorageURL ¶
func (*VMCluster) ValidateCreate ¶
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*VMCluster) ValidateDelete ¶
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
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 for the stored metrics // Note VictoriaMetrics has data/ and indexdb/ folders // metrics from data/ removed eventually as soon as partition leaves retention period // reverse index data at indexdb rotates once at the half of configured retention period // https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#retention RetentionPeriod string `json:"retentionPeriod"` // 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. ClusterVersion string `json:"clusterVersion,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: https://docs.victoriametrics.com/enterprise.html // +optional License *License `json:"license,omitempty"` // +optional VMSelect *VMSelect `json:"vmselect,omitempty"` // +optional VMInsert *VMInsert `json:"vminsert,omitempty"` // +optional VMStorage *VMStorage `json:"vmstorage,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"` }
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 { // Deprecated. UpdateFailCount int `json:"updateFailCount"` // Deprecated. LastSync string `json:"lastSync,omitempty"` UpdateStatus UpdateStatus `json:"clusterStatus,omitempty"` Reason string `json:"reason,omitempty,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.
type VMInsert ¶
type VMInsert struct { // PodMetadata configures Labels and Annotations which are propagated to the VMInsert pods. PodMetadata *EmbeddedObjectMetadata `json:"podMetadata,omitempty"` // Image - docker image settings for VMInsert // +optional Image Image `json:"image,omitempty"` // Secrets is a list of Secrets in the same namespace as the VMInsert // object, which shall be mounted into the VMInsert Pods. // The Secrets are mounted into /etc/vm/secrets/<secret-name>. // +optional Secrets []string `json:"secrets,omitempty"` // ConfigMaps is a list of ConfigMaps in the same namespace as the VMInsert // object, which shall be mounted into the VMInsert Pods. // The ConfigMaps are mounted into /etc/vm/configs/<configmap-name>. // +optional ConfigMaps []string `json:"configMaps,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"` // MinReadySeconds defines a minim number os seconds to wait before starting update next pod // if previous in healthy state // +optional MinReadySeconds int32 `json:"minReadySeconds,omitempty"` // ReplicaCount is the expected size of the VMInsert cluster. The controller will // eventually make the size of the running cluster equal to the expected // size. // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Number of pods",xDescriptors="urn:alm:descriptor:com.tectonic.ui:podCount,urn:alm:descriptor:io.kubernetes:custom" ReplicaCount *int32 `json:"replicaCount"` // The number of old ReplicaSets to retain to allow rollback in deployment or // maximum number of revisions that will be maintained in the StatefulSet's revision history. // Defaults to 10. // +optional RevisionHistoryLimitCount *int32 `json:"revisionHistoryLimitCount,omitempty"` // Volumes allows configuration of additional volumes on the output Deployment definition. // Volumes specified will be appended to other volumes that are generated as a result of // StorageSpec objects. // +optional Volumes []v1.Volume `json:"volumes,omitempty"` // VolumeMounts allows configuration of additional VolumeMounts on the output Deployment definition. // VolumeMounts specified will be appended to other VolumeMounts in the VMInsert container, // that are generated as a result of StorageSpec objects. // +optional VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"` // Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Resources",xDescriptors="urn:alm:descriptor:com.tectonic.ui:resourceRequirements" // +optional Resources v1.ResourceRequirements `json:"resources,omitempty"` // 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"` // SecurityContext holds pod-level security attributes and common container settings. // This defaults to the default PodSecurityContext. // +optional SecurityContext *v1.PodSecurityContext `json:"securityContext,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. Those can be used to e.g. // fetch secrets for injection into the VMInsert configuration from external sources. Any // errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ // Using initContainers for any use case other then secret fetching is entirely outside the scope // of what the maintainers will support and by doing so, you accept that this behaviour may break // at any time without notice. // +optional InitContainers []v1.Container `json:"initContainers,omitempty"` // Priority 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"` // 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"` // +optional ExtraArgs map[string]string `json:"extraArgs,omitempty"` // InsertPorts - additional listen ports for data ingestion. InsertPorts *InsertPorts `json:"insertPorts,omitempty"` // Port listen port // +optional Port string `json:"port,omitempty"` // ClusterNativePort for multi-level cluster setup. // More details: https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#multi-level-cluster-setup // +optional ClusterNativePort string `json:"clusterNativeListenPort,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"` // ExtraEnvs that will be added to VMInsert pod // +optional ExtraEnvs []v1.EnvVar `json:"extraEnvs,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"` // NodeSelector Define which Nodes the Pods are scheduled on. // +optional NodeSelector map[string]string `json:"nodeSelector,omitempty"` // TerminationGracePeriodSeconds period for container graceful termination // +optional TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` // ReadinessGates defines pod readiness gates ReadinessGates []v1.PodReadinessGate `json:"readinessGates,omitempty"` }
func (*VMInsert) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMInsert.
func (*VMInsert) DeepCopyInto ¶
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) GetNameWithPrefix ¶
func (*VMInsert) Probe ¶
func (cr *VMInsert) Probe() *EmbeddedProbes
func (*VMInsert) ProbeNeedLiveness ¶
func (*VMInsert) ProbeScheme ¶
type VMNodeScrape ¶
type VMNodeScrape struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec VMNodeScrapeSpec `json:"spec,omitempty"` Status VMNodeScrapeStatus `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:subresource:status +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.
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"` // HTTP path to scrape for metrics. // +optional Path string `json:"path,omitempty"` // HTTP scheme to use for scraping. // +optional // +kubebuilder:validation:Enum=http;https 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"` // 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"` // OAuth2 defines auth configuration // +optional OAuth2 *OAuth2 `json:"oauth2,omitempty"` // Authorization with http header Authorization // +optional Authorization *Authorization `json:"authorization,omitempty"` // TLSConfig configuration to use when scraping the node // +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 accessible by // the victoria-metrics operator. // +optional // +nullable BearerTokenSecret *v1.SecretKeySelector `json:"bearerTokenSecret,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"` // BasicAuth allow an endpoint to authenticate over basic authentication // More info: https://prometheus.io/docs/operating/configuration/#endpoints // +optional BasicAuth *BasicAuth `json:"basicAuth,omitempty"` // MetricRelabelConfigs to apply to samples before ingestion. // +optional MetricRelabelConfigs []*RelabelConfig `json:"metricRelabelConfigs,omitempty"` // RelabelConfigs to apply to samples before scraping. // More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config // +optional RelabelConfigs []*RelabelConfig `json:"relabelConfigs,omitempty"` // ProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint. // +optional ProxyURL *string `json:"proxyURL,omitempty"` // 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"` // 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"` // VMScrapeParams defines VictoriaMetrics specific scrape parametrs // +optional VMScrapeParams *VMScrapeParams `json:"vm_scrape_params,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 VMNodeScrapeStatus ¶
type VMNodeScrapeStatus struct{}
VMNodeScrapeStatus defines the observed state of VMNodeScrape
func (*VMNodeScrapeStatus) DeepCopy ¶
func (in *VMNodeScrapeStatus) DeepCopy() *VMNodeScrapeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMNodeScrapeStatus.
func (*VMNodeScrapeStatus) DeepCopyInto ¶
func (in *VMNodeScrapeStatus) DeepCopyInto(out *VMNodeScrapeStatus)
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"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec VMPodScrapeSpec `json:"spec,omitempty"` // +optional Status VMPodScrapeStatus `json:"status"` }
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:subresource:status +kubebuilder:resource:path=vmpodscrapes,scope=Namespaced +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +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.
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 VMPodScrapeStatus ¶
type VMPodScrapeStatus struct{}
VMPodScrapeStatus defines the observed state of VMPodScrape
func (*VMPodScrapeStatus) DeepCopy ¶
func (in *VMPodScrapeStatus) DeepCopy() *VMPodScrapeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMPodScrapeStatus.
func (*VMPodScrapeStatus) DeepCopyInto ¶
func (in *VMPodScrapeStatus) DeepCopyInto(out *VMPodScrapeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VMProbe ¶
type VMProbe struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec VMProbeSpec `json:"spec"` Status VMProbeStatus `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 +genclient +k8s:openapi-gen=true
func (VMProbe) AsProxyKey ¶
AsProxyKey builds key for proxy cache maps
func (*VMProbe) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMProbe.
func (*VMProbe) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VMProbe) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
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"` // Interval at which targets are probed using the configured prober. // If not specified Prometheus' global scrape interval is used. 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 for scraping metrics from the Prometheus exporter. ScrapeTimeout string `json:"scrapeTimeout,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"` // 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 service scrape and accessible by // the victoria-metrics operator. // +optional // +nullable BearerTokenSecret *v1.SecretKeySelector `json:"bearerTokenSecret,omitempty"` // BasicAuth allow an endpoint to authenticate over basic authentication // More info: https://prometheus.io/docs/operating/configuration/#endpoints // +optional BasicAuth *BasicAuth `json:"basicAuth,omitempty"` // OAuth2 defines auth configuration // +optional OAuth2 *OAuth2 `json:"oauth2,omitempty"` // Authorization with http header Authorization // +optional Authorization *Authorization `json:"authorization,omitempty"` // TLSConfig configuration to use when scraping the endpoint // +optional TLSConfig *TLSConfig `json:"tlsConfig,omitempty"` // ProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint. // +optional ProxyURL *string `json:"proxyURL,omitempty"` // VMScrapeParams defines VictoriaMetrics specific scrape parametrs // +optional VMScrapeParams *VMScrapeParams `json:"vm_scrape_params,omitempty"` }
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 VMProbeStatus ¶
type VMProbeStatus struct{}
VMProbeStatus defines the observed state of VMProbe
func (*VMProbeStatus) DeepCopy ¶
func (in *VMProbeStatus) DeepCopy() *VMProbeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMProbeStatus.
func (*VMProbeStatus) DeepCopyInto ¶
func (in *VMProbeStatus) DeepCopyInto(out *VMProbeStatus)
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"` // More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config RelabelConfigs []*RelabelConfig `json:"relabelingConfigs,omitempty"` }
VMProbeTargetStaticConfig defines the set of static targets considered for probing. +k8s:openapi-gen=true
func (*VMProbeTargetStaticConfig) DeepCopy ¶
func (in *VMProbeTargetStaticConfig) DeepCopy() *VMProbeTargetStaticConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMProbeTargetStaticConfig.
func (*VMProbeTargetStaticConfig) DeepCopyInto ¶
func (in *VMProbeTargetStaticConfig) DeepCopyInto(out *VMProbeTargetStaticConfig)
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. // More info: https://prometheus.io/docs/prometheus/latest/configuration/configuration/#static_config. 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"` }
func (*VMRestore) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMRestore.
func (*VMRestore) DeepCopyInto ¶
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"` }
func (*VMRestoreOnStartConfig) DeepCopy ¶
func (in *VMRestoreOnStartConfig) DeepCopy() *VMRestoreOnStartConfig
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:subresource:status +kubebuilder:resource:path=vmrules,scope=Namespaced +genclient +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*VMRule) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMRule.
func (*VMRule) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VMRule) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*VMRule) SetupWebhookWithManager ¶
func (*VMRule) ValidateCreate ¶
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*VMRule) ValidateDelete ¶
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
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{}
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"` // +optional Status VMScrapeConfigStatus `json:"status"` }
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:subresource:status +kubebuilder:resource:path=vmscrapeconfigs,scope=Namespaced +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.
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"` // MetricsPath HTTP path to scrape for metrics. If empty, use the default value (e.g. /metrics). // +optional MetricsPath *string `json:"metricsPath,omitempty"` // ScrapeInterval is the interval between consecutive scrapes. // +optional ScrapeInterval string `json:"scrapeInterval,omitempty"` // ScrapeTimeout is the number of seconds to wait until a scrape request times out. // +optional ScrapeTimeout string `json:"scrapeTimeout,omitempty"` // HonorTimestamps controls whether to respect the timestamps present in scraped data. // +optional HonorTimestamps *bool `json:"honorTimestamps,omitempty"` // HonorLabels chooses the metric's labels on collisions with target labels. // +optional HonorLabels bool `json:"honorLabels,omitempty"` // Optional HTTP URL parameters // +optional // +mapType:=atomic Params map[string][]string `json:"params,omitempty"` // Configures the protocol scheme used for requests. // If empty, use HTTP by default. // +kubebuilder:validation:Enum=HTTP;HTTPS // +optional Scheme *string `json:"scheme,omitempty"` // VMScrapeParams defines VictoriaMetrics specific scrape parametrs // +optional VMScrapeParams *VMScrapeParams `json:"vm_scrape_params,omitempty"` // FollowRedirects controls redirects for scraping. // +optional FollowRedirects *bool `json:"follow_redirects,omitempty"` // ProxyURL eg http://proxyserver:2195 Directs scrapes to proxy through this endpoint. // +optional ProxyURL *string `json:"proxyURL,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"` // TLS configuration to use on every scrape request // +optional TLSConfig *TLSConfig `json:"tlsConfig,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"` // MetricRelabelConfigs to apply to samples before ingestion. // +optional MetricRelabelConfigs []*RelabelConfig `json:"metricRelabelConfigs,omitempty"` // RelabelConfigs to apply to samples before scraping. // See https://docs.victoriametrics.com/vmagent.html#relabeling // +optional RelabelConfigs []*RelabelConfig `json:"relabelConfigs,omitempty"` }
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 VMScrapeConfigStatus ¶
type VMScrapeConfigStatus struct{}
VMScrapeConfigStatus defines the observed state of VMScrapeConfig
func (*VMScrapeConfigStatus) DeepCopy ¶
func (in *VMScrapeConfigStatus) DeepCopy() *VMScrapeConfigStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMScrapeConfigStatus.
func (*VMScrapeConfigStatus) DeepCopyInto ¶
func (in *VMScrapeConfigStatus) DeepCopyInto(out *VMScrapeConfigStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VMScrapeParams ¶
type VMScrapeParams struct { // deprecated since [v1.85](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.85.0), will be removed in next release // +optional RelabelDebug *bool `json:"relabel_debug,omitempty"` // deprecated since [v1.85](https://github.com/VictoriaMetrics/VictoriaMetrics/releases/tag/v1.85.0), will be removed in next release // +optional MetricRelabelDebug *bool `json:"metric_relabel_debug,omitempty"` // +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 re-used. // See https://docs.victoriametrics.com/vmagent.html#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.html#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"` // Image - docker image settings for VMSelect // +optional Image Image `json:"image,omitempty"` // Secrets is a list of Secrets in the same namespace as the VMSelect // object, which shall be mounted into the VMSelect Pods. // The Secrets are mounted into /etc/vm/secrets/<secret-name>. // +optional Secrets []string `json:"secrets,omitempty"` // ConfigMaps is a list of ConfigMaps in the same namespace as the VMSelect // object, which shall be mounted into the VMSelect Pods. // The ConfigMaps are mounted into /etc/vm/configs/<configmap-name>. // +optional ConfigMaps []string `json:"configMaps,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"` // MinReadySeconds defines a minim number os seconds to wait before starting update next pod // if previous in healthy state // +optional MinReadySeconds int32 `json:"minReadySeconds,omitempty"` // ReplicaCount is the expected size of the VMSelect cluster. The controller will // eventually make the size of the running cluster equal to the expected // size. // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Number of pods",xDescriptors="urn:alm:descriptor:com.tectonic.ui:podCount,urn:alm:descriptor:io.kubernetes:custom" ReplicaCount *int32 `json:"replicaCount"` // The number of old ReplicaSets to retain to allow rollback in deployment or // maximum number of revisions that will be maintained in the StatefulSet's revision history. // Defaults to 10. // +optional RevisionHistoryLimitCount *int32 `json:"revisionHistoryLimitCount,omitempty"` // Volumes allows configuration of additional volumes on the output Deployment definition. // Volumes specified will be appended to other volumes that are generated as a result of // StorageSpec objects. // +optional Volumes []v1.Volume `json:"volumes,omitempty"` // VolumeMounts allows configuration of additional VolumeMounts on the output Deployment definition. // VolumeMounts specified will be appended to other VolumeMounts in the VMSelect container, // that are generated as a result of StorageSpec objects. // +optional VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"` // Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Resources",xDescriptors="urn:alm:descriptor:com.tectonic.ui:resourceRequirements" // +optional Resources v1.ResourceRequirements `json:"resources,omitempty"` // 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"` // SecurityContext holds pod-level security attributes and common container settings. // This defaults to the default PodSecurityContext. // +optional SecurityContext *v1.PodSecurityContext `json:"securityContext,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. Those can be used to e.g. // fetch secrets for injection into the VMSelect configuration from external sources. Any // errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ // Using initContainers for any use case other then secret fetching is entirely outside the scope // of what the maintainers will support and by doing so, you accept that this behaviour may break // at any time without notice. // +optional InitContainers []v1.Container `json:"initContainers,omitempty"` // Priority 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"` // 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"` // 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 cacheMounthPath // 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"` // ExtraEnvs that will be added to VMSelect pod // +optional ExtraEnvs []v1.EnvVar `json:"extraEnvs,omitempty"` // +optional ExtraArgs map[string]string `json:"extraArgs,omitempty"` // Port listen port // +optional Port string `json:"port,omitempty"` // ClusterNativePort for multi-level cluster setup. // More details: https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#multi-level-cluster-setup // +optional ClusterNativePort string `json:"clusterNativeListenPort,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"` // 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"` // NodeSelector Define which Nodes the Pods are scheduled on. // +optional NodeSelector map[string]string `json:"nodeSelector,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"` // TerminationGracePeriodSeconds period for container graceful termination // +optional TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` // ReadinessGates defines pod readiness gates ReadinessGates []v1.PodReadinessGate `json:"readinessGates,omitempty"` // ClaimTemplates allows adding additional VolumeClaimTemplates for StatefulSet ClaimTemplates []v1.PersistentVolumeClaim `json:"claimTemplates,omitempty"` }
func (VMSelect) BuildPodName ¶
func (*VMSelect) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMSelect.
func (*VMSelect) DeepCopyInto ¶
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 (VMSelect) GetNameWithPrefix ¶
func (*VMSelect) Probe ¶
func (cr *VMSelect) Probe() *EmbeddedProbes
func (*VMSelect) ProbeNeedLiveness ¶
func (*VMSelect) ProbeScheme ¶
func (VMSelect) UpdateStrategy ¶
func (s VMSelect) UpdateStrategy() appsv1.StatefulSetUpdateStrategyType
type VMServiceScrape ¶
type VMServiceScrape struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec VMServiceScrapeSpec `json:"spec"` Status VMServiceScrapeStatus `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:subresource:status +kubebuilder:resource:path=vmservicescrapes,scope=Namespaced +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.
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 VMServiceScrapeStatus ¶
type VMServiceScrapeStatus struct{}
VMServiceScrapeStatus defines the observed state of VMServiceScrape
func (*VMServiceScrapeStatus) DeepCopy ¶
func (in *VMServiceScrapeStatus) DeepCopy() *VMServiceScrapeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMServiceScrapeStatus.
func (*VMServiceScrapeStatus) DeepCopyInto ¶
func (in *VMServiceScrapeStatus) DeepCopyInto(out *VMServiceScrapeStatus)
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"` 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:subresource:status +kubebuilder:resource:path=vmsingles,scope=Namespaced +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.singleStatus",description="Current status of single node update process"
func (VMSingle) AnnotationsFiltered ¶
func (*VMSingle) AsCRDOwner ¶
func (cr *VMSingle) AsCRDOwner() []metav1.OwnerReference
AsCRDOwner implements interface
func (*VMSingle) AsOwner ¶
func (cr *VMSingle) AsOwner() []metav1.OwnerReference
func (*VMSingle) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMSingle.
func (*VMSingle) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VMSingle) DeepCopyObject ¶
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) GetServiceAccountName ¶
func (*VMSingle) HasSpecChanges ¶
HasSpecChanges compares single spec with last applied single spec stored in annotation
func (*VMSingle) HasStreamAggrConfig ¶
HasStreamAggrConfig checks if streamAggrConfig present
func (VMSingle) IsOwnsServiceAccount ¶
func (*VMSingle) LastAppliedSpecAsPatch ¶
LastAppliedSpecAsPatch return last applied single spec as patch annotation
func (VMSingle) MetricPath ¶
func (VMSingle) PodAnnotations ¶
func (VMSingle) PrefixedName ¶
func (*VMSingle) Probe ¶
func (cr *VMSingle) Probe() *EmbeddedProbes
func (*VMSingle) ProbeNeedLiveness ¶
func (*VMSingle) ProbeScheme ¶
func (VMSingle) SelectorLabels ¶
func (*VMSingle) SetUpdateStatusTo ¶
func (cr *VMSingle) SetUpdateStatusTo(ctx context.Context, r client.Client, status UpdateStatus, maybeErr error) error
SetStatusTo changes update status with optional reason of fail
func (*VMSingle) SetupWebhookWithManager ¶
func (VMSingle) StreamAggrConfigName ¶
func (*VMSingle) ValidateCreate ¶
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*VMSingle) ValidateDelete ¶
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
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"` // Image - docker image settings for VMSingle // if no specified operator uses default config version // +optional Image Image `json:"image,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"` // Secrets is a list of Secrets in the same namespace as the VMSingle // object, which shall be mounted into the VMSingle Pods. // +optional Secrets []string `json:"secrets,omitempty"` // ConfigMaps is a list of ConfigMaps in the same namespace as the VMSingle // object, which shall be mounted into the VMSingle Pods. // +optional ConfigMaps []string `json:"configMaps,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"` // ReplicaCount is the expected size of the VMSingle // it can be 0 or 1 // if you need more - use vm cluster // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Number of pods",xDescriptors="urn:alm:descriptor:com.tectonic.ui:podCount,urn:alm:descriptor:io.kubernetes:custom" 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 StatefulSet's revision history. // Defaults to 10. // +optional RevisionHistoryLimitCount *int32 `json:"revisionHistoryLimitCount,omitempty"` // StorageDataPath disables spec.storage option and overrides arg for victoria-metrics 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 VMSingle // by default it`s empty dir // +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"` // Volumes allows configuration of additional volumes on the output deploy definition. // Volumes specified will be appended to other volumes that are generated as a result of // StorageSpec objects. // +optional Volumes []v1.Volume `json:"volumes,omitempty"` // VolumeMounts allows configuration of additional VolumeMounts on the output Deployment definition. // VolumeMounts specified will be appended to other VolumeMounts in the VMSingle container, // that are generated as a result of StorageSpec objects. // +optional VolumeMounts []v1.VolumeMount `json:"volumeMounts,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"` // 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"` // SecurityContext holds pod-level security attributes and common container settings. // This defaults to the default PodSecurityContext. // +optional SecurityContext *v1.PodSecurityContext `json:"securityContext,omitempty"` // ServiceAccountName is the name of the ServiceAccount to use to run the // VMSingle Pods. // +optional ServiceAccountName string `json:"serviceAccountName,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"` // 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. Those can be used to e.g. // fetch secrets for injection into the vmSingle configuration from external sources. Any // errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ // Using initContainers for any use case other then secret fetching is entirely outside the scope // of what the maintainers will support and by doing so, you accept that this behaviour may break // at any time without notice. // +optional InitContainers []v1.Container `json:"initContainers,omitempty"` // PriorityClassName 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"` // 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"` // InsertPorts - additional listen ports for data ingestion. InsertPorts *InsertPorts `json:"insertPorts,omitempty"` // Port listen port // +optional Port string `json:"port,omitempty"` // RemovePvcAfterDelete - if true, controller adds ownership to pvc // and after VMSingle objest deletion - pvc will be garbage collected // by controller manager // +optional RemovePvcAfterDelete bool `json:"removePvcAfterDelete,omitempty"` // RetentionPeriod for the stored metrics // Note VictoriaMetrics has data/ and indexdb/ folders // metrics from data/ removed eventually as soon as partition leaves retention period // reverse index data at indexdb rotates once at the half of configured retention period // https://docs.victoriametrics.com/Single-server-VictoriaMetrics.html#retention RetentionPeriod string `json:"retentionPeriod"` // 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: https://docs.victoriametrics.com/enterprise.html // +optional License *License `json:"license,omitempty"` // ExtraArgs that will be passed to VMSingle pod // for example remoteWrite.tmpDataPath: /tmp // +optional ExtraArgs map[string]string `json:"extraArgs,omitempty"` // ExtraEnvs that will be added to VMSingle pod // +optional ExtraEnvs []v1.EnvVar `json:"extraEnvs,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"` // NodeSelector Define which Nodes the Pods are scheduled on. // +optional NodeSelector map[string]string `json:"nodeSelector,omitempty"` // TerminationGracePeriodSeconds period for container graceful termination // +optional TerminationGracePeriodSeconds *int64 `json:"terminationGracePeriodSeconds,omitempty"` // ReadinessGates defines pod readiness gates ReadinessGates []v1.PodReadinessGate `json:"readinessGates,omitempty"` // StreamAggrConfig defines stream aggregation configuration for VMSingle StreamAggrConfig *StreamAggrConfig `json:"streamAggrConfig,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"` }
VMSingleSpec defines the desired state of VMSingle +k8s:openapi-gen=true +kubebuilder:printcolumn:name="Version",type="string",JSONPath=".spec.version",description="The version of VMSingle" +kubebuilder:printcolumn:name="RetentionPeriod",type="string",JSONPath=".spec.RetentionPeriod",description="The desired RetentionPeriod for vm single" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
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 { // ReplicaCount Total number of non-terminated pods targeted by this VMSingle. Replicas int32 `json:"replicas"` // UpdatedReplicas Total number of non-terminated pods targeted by this VMSingle. UpdatedReplicas int32 `json:"updatedReplicas"` // AvailableReplicas Total number of available pods (ready for at least minReadySeconds) targeted by this VMSingle. AvailableReplicas int32 `json:"availableReplicas"` UnavailableReplicas int32 `json:"unavailableReplicas"` // UpdateStatus defines a status of single node rollout UpdateStatus UpdateStatus `json:"singleStatus,omitempty"` // Reason defines a reason in case of update failure Reason string `json:"reason,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.
type VMStaticScrape ¶
type VMStaticScrape struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec VMStaticScrapeSpec `json:"spec,omitempty"` Status VMStaticScrapeStatus `json:"status,omitempty"` }
VMStaticScrape defines static targets configuration for scraping. +kubebuilder:object:root=true +kubebuilder:subresource:status +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.
type VMStaticScrapeList ¶
type VMStaticScrapeList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []VMStaticScrape `json:"items"` }
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 VMStaticScrapeStatus ¶
type VMStaticScrapeStatus struct{}
VMStaticScrapeStatus defines the observed state of VMStaticScrape
func (*VMStaticScrapeStatus) DeepCopy ¶
func (in *VMStaticScrapeStatus) DeepCopy() *VMStaticScrapeStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMStaticScrapeStatus.
func (*VMStaticScrapeStatus) DeepCopyInto ¶
func (in *VMStaticScrapeStatus) DeepCopyInto(out *VMStaticScrapeStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type VMStorage ¶
type VMStorage struct { // MinReadySeconds defines a minim number os seconds to wait before starting update next pod // if previous in healthy state // +optional MinReadySeconds int32 `json:"minReadySeconds,omitempty"` // PodMetadata configures Labels and Annotations which are propagated to the VMStorage pods. PodMetadata *EmbeddedObjectMetadata `json:"podMetadata,omitempty"` // Image - docker image settings for VMStorage // +optional Image Image `json:"image,omitempty"` // Secrets is a list of Secrets in the same namespace as the VMStorage // object, which shall be mounted into the VMStorage Pods. // The Secrets are mounted into /etc/vm/secrets/<secret-name>. // +optional Secrets []string `json:"secrets,omitempty"` // ConfigMaps is a list of ConfigMaps in the same namespace as the VMStorage // object, which shall be mounted into the VMStorage Pods. // The ConfigMaps are mounted into /etc/vm/configs/<configmap-name>. // +optional ConfigMaps []string `json:"configMaps,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"` // ReplicaCount is the expected size of the VMStorage cluster. The controller will // eventually make the size of the running cluster equal to the expected // size. // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Number of pods",xDescriptors="urn:alm:descriptor:com.tectonic.ui:podCount,urn:alm:descriptor:io.kubernetes:custom" ReplicaCount *int32 `json:"replicaCount"` // The number of old ReplicaSets to retain to allow rollback in deployment or // maximum number of revisions that will be maintained in the StatefulSet's revision history. // Defaults to 10. // +optional RevisionHistoryLimitCount *int32 `json:"revisionHistoryLimitCount,omitempty"` // Volumes allows configuration of additional volumes on the output Deployment definition. // Volumes specified will be appended to other volumes that are generated as a result of // StorageSpec objects. // +optional Volumes []v1.Volume `json:"volumes,omitempty"` // VolumeMounts allows configuration of additional VolumeMounts on the output Deployment definition. // VolumeMounts specified will be appended to other VolumeMounts in the VMStorage container, // that are generated as a result of StorageSpec objects. // +optional VolumeMounts []v1.VolumeMount `json:"volumeMounts,omitempty"` // Resources container resource request and limits, https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ // +operator-sdk:csv:customresourcedefinitions:type=spec,displayName="Resources",xDescriptors="urn:alm:descriptor:com.tectonic.ui:resourceRequirements" // +optional Resources v1.ResourceRequirements `json:"resources,omitempty"` // 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"` // SecurityContext holds pod-level security attributes and common container settings. // This defaults to the default PodSecurityContext. // +optional SecurityContext *v1.PodSecurityContext `json:"securityContext,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. Those can be used to e.g. // fetch secrets for injection into the VMStorage configuration from external sources. Any // errors during the execution of an initContainer will lead to a restart of the Pod. More info: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ // Using initContainers for any use case other then secret fetching is entirely outside the scope // of what the maintainers will support and by doing so, you accept that this behaviour may break // at any time without notice. // +optional InitContainers []v1.Container `json:"initContainers,omitempty"` // Priority 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"` // 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"` // 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"` // TerminationGracePeriodSeconds period for container graceful termination // +optional TerminationGracePeriodSeconds int64 `json:"terminationGracePeriodSeconds,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"` // Port for health check connetions Port string `json:"port,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"` // +optional ExtraArgs map[string]string `json:"extraArgs,omitempty"` // ExtraEnvs that will be added to VMStorage pod // +optional ExtraEnvs []v1.EnvVar `json:"extraEnvs,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"` // NodeSelector Define which Nodes the Pods are scheduled on. // +optional NodeSelector map[string]string `json:"nodeSelector,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"` // ReadinessGates defines pod readiness gates ReadinessGates []v1.PodReadinessGate `json:"readinessGates,omitempty"` // ClaimTemplates allows adding additional VolumeClaimTemplates for StatefulSet ClaimTemplates []v1.PersistentVolumeClaim `json:"claimTemplates,omitempty"` }
func (VMStorage) BuildPodName ¶
func (*VMStorage) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMStorage.
func (*VMStorage) DeepCopyInto ¶
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) GetNameWithPrefix ¶
func (VMStorage) GetStorageVolumeName ¶
func (*VMStorage) Probe ¶
func (cr *VMStorage) Probe() *EmbeddedProbes
func (*VMStorage) ProbeNeedLiveness ¶
func (*VMStorage) ProbeScheme ¶
func (VMStorage) UpdateStrategy ¶
func (s VMStorage) UpdateStrategy() appsv1.StatefulSetUpdateStrategyType
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 +genclient
func (VMUser) AnnotationsFiltered ¶
func (*VMUser) AsOwner ¶
func (cr *VMUser) AsOwner() []metav1.OwnerReference
func (*VMUser) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VMUser.
func (*VMUser) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*VMUser) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*VMUser) PasswordRefAsKey ¶
PasswordRefAsKey - builds key for passwordRef cache
func (*VMUser) SecretName ¶
SecretName builds secret name for VMUser.
func (VMUser) SelectorLabels ¶
func (*VMUser) SetupWebhookWithManager ¶
func (*VMUser) TokenRefAsKey ¶
TokenRefAsKey - builds key for passwordRef cache
func (*VMUser) ValidateCreate ¶
ValidateCreate implements webhook.Validator so a webhook will be registered for the type
func (*VMUser) ValidateDelete ¶
ValidateDelete implements webhook.Validator so a webhook will be registered for the type
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.html#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"` // DefaultURLs backend url for non-matching paths filter // usually used for default backend with error message // +optional DefaultURLs []string `json:"default_url,omitempty"` // IPFilters defines per target src ip filters // supported only with enterprise version of vmauth // https://docs.victoriametrics.com/vmauth.html#ip-filters // +optional IPFilters VMUserIPFilters `json:"ip_filters,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"` // RetryStatusCodes defines http status codes in numeric format for request retries // e.g. [429,503] // +optional RetryStatusCodes []int `json:"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"` // LoadBalancingPolicy defines load balancing policy to use for backend urls. // Supported policies: least_loaded, first_available. // See https://docs.victoriametrics.com/vmauth.html#load-balancing for more details (default "least_loaded") // +optional // +kubebuilder:validation:Enum=least_loaded;first_available LoadBalancingPolicy *string `json:"load_balancing_policy,omitempty"` // DropSrcPathPrefixParts is the number of `/`-delimited request path prefix parts to drop before proxying the request to backend. // See https://docs.victoriametrics.com/vmauth.html#dropping-request-path-prefix for more details. // +optional DropSrcPathPrefixParts *int `json:"drop_src_path_prefix_parts,omitempty"` // TLSInsecureSkipVerify - whether to skip TLS verification when connecting to backend over HTTPS. // See https://docs.victoriametrics.com/vmauth.html#backend-tls-setup // +optional TLSInsecureSkipVerify bool `json:"tls_insecure_skip_verify,omitempty"` // 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{}
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"` // 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 // +optional APIKey *v1.SecretKeySelector `json:"api_key,omitempty"` // The VictorOps API URL. // +optional APIURL string `json:"api_url,omitempty"` // A key used to map the alert to a team. // +optional RoutingKey string `json:"routing_key"` // Describes the behavior of the alert (CRITICAL, WARNING, INFO). // +optional MessageType string `json:"message_type,omitempty"` // Contains summary of the alerted problem. // +optional EntityDisplayName string `json:"entity_display_name,omitempty"` // Contains long explanation of the alerted problem. // +optional StateMessage string `json:"state_message,omitempty"` // The monitoring tool the state message is from. // +optional MonitoringTool string `json:"monitoring_tool,omitempty"` // The HTTP client's configuration. // +optional HTTPConfig *HTTPConfig `json:"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"` }
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"` // The secret's key that contains the WeChat API key. // The secret needs to be in the same namespace as the AlertmanagerConfig // object and accessible by the Prometheus Operator. // +optional APISecret *v1.SecretKeySelector `json:"api_secret,omitempty"` // The WeChat API URL. // +optional APIURL string `json:"api_url,omitempty"` // The corp id for authentication. // +optional CorpID string `json:"corp_id,omitempty"` // +optional AgentID string `json:"agent_id,omitempty"` // +optional ToUser string `json:"to_user,omitempty"` // +optional ToParty string `json:"to_party,omitempty"` // +optional ToTag string `json:"to_tag,omitempty"` // API request data as defined by the WeChat API. Message string `json:"message,omitempty"` // +optional MessageType string `json:"message_type,omitempty"` // HTTP client configuration. // +optional HTTPConfig *HTTPConfig `json:"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"` // The Webex Teams API URL, i.e. https://webexapis.com/v1/messages // +optional URL *string `json:"api_url,omitempty"` // The ID of the Webex Teams room where to send the messages // +required RoomId string `json:"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"` }
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"` // 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"` // HTTP client configuration. // +optional HTTPConfig *HTTPConfig `json:"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"` }
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.
Source Files ¶
- additional.go
- groupversion_info.go
- owner.go
- vmagent_types.go
- vmagent_webhook.go
- vmalert_types.go
- vmalert_webhook.go
- vmalertmanager_types.go
- vmalertmanager_webhook.go
- vmalertmanagerconfig_types.go
- vmalertmanagerconfig_webhook.go
- vmauth_types.go
- vmauth_webhook.go
- vmcluster_types.go
- vmcluster_webhook.go
- vmnodescrape_types.go
- vmpodscrape_types.go
- vmprobe_types.go
- vmrule_types.go
- vmrule_webhook.go
- vmscrapeconfig_types.go
- vmservicescrape_types.go
- vmsingle_types.go
- vmsingle_webhook.go
- vmstaticscrape_types.go
- vmuser_types.go
- vmuser_webhook.go
- zz_generated.deepcopy.go