v1beta1

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2021 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (

	// FinalizerName name of our finalizer.
	FinalizerName            = "apps.victoriametrics.com/finalizer"
	SkipValidationAnnotation = "operator.victoriametrics.com/skip-validation"
	SkipValidationValue      = "true"
)
View Source
const (
	ClusterStatusExpanding   = "expanding"
	ClusterStatusOperational = "operational"
	ClusterStatusFailed      = "failed"

	InternalOperatorError = "failed to perform vmcluster preparing jobs"

	StorageRollingUpdateFailed = "failed to perform rolling update on vmStorage"
	StorageCreationFailed      = "failed to create vmStorage statefulset"

	SelectRollingUpdateFailed = "failed to perform rolling update on vmSelect"
	SelectCreationFailed      = "failed to create vmSelect statefulset"
	InsertCreationFailed      = "failed to create vmInsert deployment"
)
View Source
const (
	// MetaVMAlertDeduplicateRulesKey - controls behavior for vmalert rules deduplication
	// its useful for migration from prometheus.
	MetaVMAlertDeduplicateRulesKey = "operator.victoriametrics.com/vmalert-deduplicate-rules"
)

Variables

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

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

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var (
	// GroupVersion is group version used to register these objects
	SchemeGroupVersion = schema.GroupVersion{Group: "operator.victoriametrics.com", Version: "v1beta1"}
)

Functions

func IsContainsFinalizer added in v0.9.0

func IsContainsFinalizer(src []string, finalizer string) bool

IsContainsFinalizer check if finalizers is set.

func MergeFinalizers added in v0.10.0

func MergeFinalizers(src client.Object, finalizer string) []string

func PrefixedName

func PrefixedName(name, prefix string) string

func RemoveFinalizer added in v0.9.0

func RemoveFinalizer(src []string, finalizer string) []string

RemoveFinalizer - removes given finalizer from finalizers list.

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"`
}

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 ArbitraryFSAccessThroughSMsConfig

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

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

func (*ArbitraryFSAccessThroughSMsConfig) DeepCopy

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

func (*ArbitraryFSAccessThroughSMsConfig) DeepCopyInto

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

type BasicAuth

type BasicAuth struct {
	// The secret in the service scrape namespace that contains the username
	// for authentication.
	// +optional
	Username v1.SecretKeySelector `json:"username,omitempty"`
	// The secret in the service scrape namespace that contains the password
	// for authentication.
	// +optional
	Password v1.SecretKeySelector `json:"password,omitempty"`
}

BasicAuth allow an endpoint to authenticate over basic authentication More info: https://prometheus.io/docs/operating/configuration/#endpoints +k8s:openapi-gen=true

func (*BasicAuth) DeepCopy

func (in *BasicAuth) DeepCopy() *BasicAuth

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

func (*BasicAuth) DeepCopyInto

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

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

type CRDRef added in v0.15.0

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 added in v0.15.0

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

AddRefToObj adds reference to given object and return it.

func (*CRDRef) AsKey added in v0.15.0

func (cr *CRDRef) AsKey() string

func (*CRDRef) DeepCopy added in v0.15.0

func (in *CRDRef) DeepCopy() *CRDRef

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

func (*CRDRef) DeepCopyInto added in v0.15.0

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

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

type EmbeddedHPA added in v0.15.0

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-v2beta2/

func (*EmbeddedHPA) DeepCopy added in v0.15.0

func (in *EmbeddedHPA) DeepCopy() *EmbeddedHPA

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

func (*EmbeddedHPA) DeepCopyInto added in v0.15.0

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 added in v0.15.0

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 []v1beta1.IngressRule `json:"extraRules,omitempty"`
	// ExtraTLS - additional TLS configuration for ingress
	// must be checked for correctness by user.
	// +optional
	ExtraTLS []v1beta1.IngressTLS `json:"extraTls,omitempty"`
}

EmbeddedIngress describes ingress configuration options.

func (*EmbeddedIngress) DeepCopy added in v0.15.0

func (in *EmbeddedIngress) DeepCopy() *EmbeddedIngress

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

func (*EmbeddedIngress) DeepCopyInto added in v0.15.0

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: http://kubernetes.io/docs/user-guide/identifiers#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: http://kubernetes.io/docs/user-guide/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: http://kubernetes.io/docs/user-guide/annotations
	// +optional
	Annotations map[string]string `json:"annotations,omitempty" protobuf:"bytes,12,rep,name=annotations"`
}

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

func (*EmbeddedObjectMetadata) DeepCopy

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

func (*EmbeddedObjectMetadata) DeepCopyInto

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

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

type EmbeddedPersistentVolumeClaim

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

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

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

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

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

func (*EmbeddedPersistentVolumeClaim) DeepCopy

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

func (*EmbeddedPersistentVolumeClaim) DeepCopyInto

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

type EmbeddedPodDisruptionBudgetSpec added in v0.12.0

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

	// An eviction is allowed if at most "maxUnavailable" pods selected by
	// "selector" are unavailable after the eviction, i.e. even in absence of
	// the evicted pod. For example, one can prevent all voluntary evictions
	// by specifying 0. This is a mutually exclusive setting with "minAvailable".
	// +optional
	MaxUnavailable *intstr.IntOrString `json:"maxUnavailable,omitempty"`
}

func (*EmbeddedPodDisruptionBudgetSpec) DeepCopy added in v0.12.0

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

func (*EmbeddedPodDisruptionBudgetSpec) DeepCopyInto added in v0.12.0

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

type EmbeddedProbes added in v0.13.0

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 added in v0.13.0

func (in *EmbeddedProbes) DeepCopy() *EmbeddedProbes

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

func (*EmbeddedProbes) DeepCopyInto added in v0.13.0

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
	Scheme string `json:"scheme,omitempty"`
	// Optional HTTP URL parameters
	// +optional
	Params map[string][]string `json:"params,omitempty"`
	// Interval at which metrics should be scraped
	// +optional
	Interval string `json:"interval,omitempty"`
	// Timeout after which the scrape is ended
	// +optional
	ScrapeTimeout string `json:"scrapeTimeout,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
	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"`
}

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

func (*Endpoint) DeepCopy

func (in *Endpoint) DeepCopy() *Endpoint

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

func (*Endpoint) DeepCopyInto

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

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

type Image

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

Image defines docker image settings

func (*Image) DeepCopy

func (in *Image) DeepCopy() *Image

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

func (*Image) DeepCopyInto

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

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

type InsertPorts added in v0.8.0

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 added in v0.8.0

func (in *InsertPorts) DeepCopy() *InsertPorts

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

func (*InsertPorts) DeepCopyInto added in v0.8.0

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

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.

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
	Scheme string `json:"scheme,omitempty"`
	// Optional HTTP URL parameters
	// +optional
	Params map[string][]string `json:"params,omitempty"`
	// Interval at which metrics should be scraped
	// +optional
	Interval string `json:"interval,omitempty"`
	// Timeout after which the scrape is ended
	// +optional
	ScrapeTimeout string `json:"scrapeTimeout,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
	BearerTokenSecret v1.SecretKeySelector `json:"bearerTokenSecret,omitempty"`
	// TLSConfig configuration to use when scraping the endpoint
	// +optional
	TLSConfig *TLSConfig `json:"tlsConfig,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 added in v0.2.0

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 added in v0.2.0

func (in *ProbeTargetIngress) DeepCopy() *ProbeTargetIngress

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

func (*ProbeTargetIngress) DeepCopyInto added in v0.2.0

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

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

type QueueConfig

type QueueConfig struct {
	// Capacity is the number of samples to buffer per shard before we start dropping them.
	// +optional
	Capacity int `json:"capacity,omitempty"`
	// MinShards is the minimum number of shards, i.e. amount of concurrency.
	// +optional
	MinShards int `json:"minShards,omitempty"`
	// MaxShards is the maximum number of shards, i.e. amount of concurrency.
	// +optional
	MaxShards int `json:"maxShards,omitempty"`
	// MaxSamplesPerSend is the maximum number of samples per send.
	// +optional
	MaxSamplesPerSend int `json:"maxSamplesPerSend,omitempty"`
	// BatchSendDeadline is the maximum time a sample will wait in buffer.
	// +optional
	BatchSendDeadline string `json:"batchSendDeadline,omitempty"`
	// MaxRetries is the maximum number of times to retry a batch on recoverable errors.
	// +optional
	MaxRetries int `json:"maxRetries,omitempty"`
	// MinBackoff is the initial retry delay. Gets doubled for every retry.
	// +optional
	MinBackoff string `json:"minBackoff,omitempty"`
	// MaxBackoff is the maximum retry delay.
	// +optional
	MaxBackoff string `json:"maxBackoff,omitempty"`
}

QueueConfig allows the tuning of remote_write queue_config parameters. This object is referenced in the RemoteWriteSpec object. +k8s:openapi-gen=true

func (*QueueConfig) DeepCopy

func (in *QueueConfig) DeepCopy() *QueueConfig

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

func (*QueueConfig) DeepCopyInto

func (in *QueueConfig) DeepCopyInto(out *QueueConfig)

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

type RelabelConfig

type RelabelConfig struct {
	// 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 '(.*)'
	// +optional
	Regex string `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"`
}

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 added in v0.14.0

func (rc *RelabelConfig) IsEmpty() bool

type RemoteWriteSpec

type RemoteWriteSpec struct {
	// The URL of the endpoint to send samples to.
	URL string `json:"url"`
	// The name of the remote write queue, must be unique if specified. The
	// name is used in metrics and logging in order to differentiate queues.
	// +optional
	Name string `json:"name,omitempty"`
	// Timeout for requests to the remote write endpoint.
	// +optional
	RemoteTimeout string `json:"remoteTimeout,omitempty"`
	// The list of remote write relabel configurations.
	// +optional
	WriteRelabelConfigs []RelabelConfig `json:"writeRelabelConfigs,omitempty"`
	//BasicAuth for the URL.
	// +optional
	BasicAuth *BasicAuth `json:"basicAuth,omitempty"`
	// File to read bearer token for remote write.
	// +optional
	BearerToken string `json:"bearerToken,omitempty"`
	// File to read bearer token for remote write.
	// +optional
	BearerTokenFile string `json:"bearerTokenFile,omitempty"`
	// TLSConfig Config to use for remote write.
	// +optional
	TLSConfig *TLSConfig `json:"tlsConfig,omitempty"`
	// Optional ProxyURL
	// +optional
	ProxyURL string `json:"proxyURL,omitempty"`
	// QueueConfig allows tuning of the remote write queue parameters.
	// +optional
	QueueConfig *QueueConfig `json:"queueConfig,omitempty"`
}

RemoteWriteSpec defines the remote_write configuration. +k8s:openapi-gen=true

func (*RemoteWriteSpec) DeepCopy

func (in *RemoteWriteSpec) DeepCopy() *RemoteWriteSpec

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

func (*RemoteWriteSpec) DeepCopyInto

func (in *RemoteWriteSpec) DeepCopyInto(out *RemoteWriteSpec)

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

type Rule

type Rule struct {
	// Record represents a query, that will be recorded to dataSource
	// +optional
	Record string `json:"record,omitempty"`
	// Alert is a name for alert
	// +optional
	Alert string `json:"alert,omitempty"`
	// Expr is query, that will be evaluated at dataSource
	// +optional
	Expr intstr.IntOrString `json:"expr"`
	// For evaluation interval in time.Duration format
	// 30s, 1m, 1h  or nanoseconds
	// +optional
	For string `json:"for,omitempty"`
	// Labels will be added to rule configuration
	// +optional
	Labels map[string]string `json:"labels,omitempty"`
	// Annotations will be added to rule configuration
	// +optional
	Annotations map[string]string `json:"annotations,omitempty"`
}

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

func (*Rule) DeepCopy

func (in *Rule) DeepCopy() *Rule

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

func (*Rule) DeepCopyInto

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

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

type RuleGroup

type RuleGroup struct {
	// Name of group
	Name string `json:"name"`
	// evaluation interval for group
	// +optional
	Interval string `json:"interval,omitempty"`
	// Rules list of alert rules
	Rules []Rule `json:"rules"`
	// Concurrency defines how many rules execute at once.
	// +optional
	Concurrency int `json:"concurrency,omitempty"`
}

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

func (*RuleGroup) DeepCopy

func (in *RuleGroup) DeepCopy() *RuleGroup

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

func (*RuleGroup) DeepCopyInto

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

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

type 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 added in v0.1.0

func (c *SecretOrConfigMap) Key() string

func (*SecretOrConfigMap) Name added in v0.1.0

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

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

func (*SecretOrConfigMapValidationError) DeepCopyInto

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

func (*SecretOrConfigMapValidationError) Error

type ServiceSpec added in v0.11.0

type ServiceSpec struct {
	// 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. +k8s:openapi-gen=true

func (*ServiceSpec) DeepCopy added in v0.11.0

func (in *ServiceSpec) DeepCopy() *ServiceSpec

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

func (*ServiceSpec) DeepCopyInto added in v0.11.0

func (in *ServiceSpec) DeepCopyInto(out *ServiceSpec)

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

func (*ServiceSpec) NameOrDefault added in v0.11.0

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

NameOrDefault returns name or default value with suffix

type StaticRef added in v0.15.0

type StaticRef struct {
	// URL http url for given staticRef.
	URL string `json:"url"`
}

StaticRef - user-defined routing host address.

func (*StaticRef) DeepCopy added in v0.15.0

func (in *StaticRef) DeepCopy() *StaticRef

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

func (*StaticRef) DeepCopyInto added in v0.15.0

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

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.

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) AsArgs added in v0.14.0

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

func (*TLSConfig) BuildAssetPath

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

func (*TLSConfig) DeepCopy

func (in *TLSConfig) DeepCopy() *TLSConfig

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

func (*TLSConfig) DeepCopyInto

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

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

func (*TLSConfig) Validate

func (c *TLSConfig) Validate() error

Validate semantically validates the given TLSConfig.

type TLSConfigValidationError

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

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

func (*TLSConfigValidationError) DeepCopy

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

func (*TLSConfigValidationError) DeepCopyInto

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

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

func (*TLSConfigValidationError) Error

func (e *TLSConfigValidationError) Error() string

type TargetEndpoint added in v0.10.0

type TargetEndpoint struct {
	// Targets static targets addresses in form of ["192.122.55.55:9100","some-name:9100"].
	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
	Scheme string `json:"scheme,omitempty"`
	// Optional HTTP URL parameters
	// +optional
	Params map[string][]string `json:"params,omitempty"`
	// Interval at which metrics should be scraped
	// +optional
	Interval string `json:"interval,omitempty"`
	// Timeout after which the scrape is ended
	// +optional
	ScrapeTimeout string `json:"scrapeTimeout,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
	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"`
	// 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"`
}

TargetEndpoint defines single static target endpoint.

func (*TargetEndpoint) DeepCopy added in v0.10.0

func (in *TargetEndpoint) DeepCopy() *TargetEndpoint

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

func (*TargetEndpoint) DeepCopyInto added in v0.10.0

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 added in v0.15.0

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"`
}

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 added in v0.15.0

func (in *TargetRef) DeepCopy() *TargetRef

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

func (*TargetRef) DeepCopyInto added in v0.15.0

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

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

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

func (VMAgent) Annotations

func (cr VMAgent) Annotations() map[string]string

func (*VMAgent) AsCRDOwner added in v0.16.0

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

AsCRDOwner implements interface

func (*VMAgent) AsOwner

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

func (*VMAgent) AsURL added in v0.15.0

func (cr *VMAgent) AsURL() string

func (*VMAgent) DeepCopy

func (in *VMAgent) DeepCopy() *VMAgent

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

func (*VMAgent) DeepCopyInto

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

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

func (*VMAgent) DeepCopyObject

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

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

func (VMAgent) GetClusterRoleName added in v0.5.0

func (cr VMAgent) GetClusterRoleName() string

func (VMAgent) GetNSName added in v0.9.0

func (cr VMAgent) GetNSName() string

func (VMAgent) GetPSPName added in v0.5.0

func (cr VMAgent) GetPSPName() string

func (VMAgent) GetServiceAccountName added in v0.5.0

func (cr VMAgent) GetServiceAccountName() string

func (VMAgent) HealthPath added in v0.2.1

func (cr VMAgent) HealthPath() string

func (VMAgent) Labels added in v0.5.0

func (cr VMAgent) Labels() map[string]string

func (VMAgent) MetricPath added in v0.2.1

func (cr VMAgent) MetricPath() string

func (VMAgent) PodAnnotations

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

func (VMAgent) PodLabels

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

func (VMAgent) PrefixedName

func (cr VMAgent) PrefixedName() string

func (VMAgent) RelabelingAssetName added in v0.14.0

func (cr VMAgent) RelabelingAssetName() string

func (VMAgent) ReloadPathWithPort added in v0.2.1

func (cr VMAgent) ReloadPathWithPort(port string) string

func (VMAgent) SelectorLabels

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

func (*VMAgent) SetupWebhookWithManager added in v0.15.0

func (cr *VMAgent) SetupWebhookWithManager(mgr ctrl.Manager) error

func (VMAgent) TLSAssetName

func (cr VMAgent) TLSAssetName() string

func (*VMAgent) ValidateCreate added in v0.15.0

func (cr *VMAgent) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*VMAgent) ValidateDelete added in v0.15.0

func (cr *VMAgent) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*VMAgent) ValidateUpdate added in v0.15.0

func (cr *VMAgent) ValidateUpdate(old runtime.Object) error

ValidateUpdate 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"`
}

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

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 added in v0.6.0

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 *int32 `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"`
	// Optional labels in the form 'name=value' to add to all the metrics before sending them
	// +optional
	Labels map[string]string `json:"label,omitempty"`
}

VMAgentRemoteWriteSettings - defines global settings for all remoteWrite urls.

func (*VMAgentRemoteWriteSettings) DeepCopy added in v0.6.0

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

func (*VMAgentRemoteWriteSettings) DeepCopyInto added in v0.6.0

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"`
	// 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"`
}

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

func (*VMAgentRemoteWriteSpec) DeepCopy

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

func (*VMAgentRemoteWriteSpec) DeepCopyInto

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

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

type VMAgentSpec

type VMAgentSpec struct {
	// 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 http://kubernetes.io/docs/user-guide/images#specifying-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"`
	// 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"`
	// 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"`
	// PodSecurityPolicyName - defines name for podSecurityPolicy
	// in case of empty value, prefixedName will be used.
	// +optional
	PodSecurityPolicyName string `json:"podSecurityPolicyName,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"`

	// 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 or alerts when communicating with
	// external systems (federation, remote storage, etc).
	// +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"`
	// ServiceScrapeSelector defines ServiceScrapes to be selected for target discovery.
	// +optional
	ServiceScrapeSelector *metav1.LabelSelector `json:"serviceScrapeSelector,omitempty"`
	// ServiceScrapeNamespaceSelector Namespaces to be selected for VMServiceScrape discovery. If nil, only
	// check own namespace.
	// +optional
	ServiceScrapeNamespaceSelector *metav1.LabelSelector `json:"serviceScrapeNamespaceSelector,omitempty"`
	// PodScrapeSelector defines PodScrapes to be selected for target discovery.
	// +optional
	PodScrapeSelector *metav1.LabelSelector `json:"podScrapeSelector,omitempty"`
	// PodScrapeNamespaceSelector defines Namespaces to be selected for VMPodScrape discovery. If nil, only
	// check own namespace.
	// +optional
	PodScrapeNamespaceSelector *metav1.LabelSelector `json:"podScrapeNamespaceSelector,omitempty"`
	// ProbeSelector defines VMProbe to be selected for target probing.
	// +optional
	ProbeSelector *metav1.LabelSelector `json:"probeSelector,omitempty"`
	// ProbeNamespaceSelector defines Namespaces to be selected for VMProbe discovery. If nil, only
	// check own namespace.
	// +optional
	ProbeNamespaceSelector *metav1.LabelSelector `json:"probeNamespaceSelector,omitempty"`
	// NodeScrapeSelector defines VMNodeScrape to be selected for scraping.
	// +optional
	NodeScrapeSelector *metav1.LabelSelector `json:"nodeScrapeSelector,omitempty"`
	// NodeScrapeNamespaceSelector defines Namespaces to be selected for VMNodeScrape discovery. If nil, only
	// check own namespace.
	// +optional
	NodeScrapeNamespaceSelector *metav1.LabelSelector `json:"nodeScrapeNamespaceSelector,omitempty"`
	// StaticScrapeSelector defines PodScrapes to be selected for target discovery.
	// +optional
	StaticScrapeSelector *metav1.LabelSelector `json:"staticScrapeSelector,omitempty"`
	// StaticScrapeNamespaceSelector defines Namespaces to be selected for VMStaticScrape discovery. If nil, only
	// check own namespace.
	// +optional
	StaticScrapeNamespaceSelector *metav1.LabelSelector `json:"staticScrapeNamespaceSelector,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"`
	// 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 *ServiceSpec `json:"serviceSpec,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
	// https://victoriametrics.github.io/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"`
}

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.

type VMAgentStatus

type VMAgentStatus struct {
	// ReplicaCount Total number of non-terminated pods targeted by this VMAlert
	// cluster (their labels match the selector).
	Replicas int32 `json:"replicas"`
	// UpdatedReplicas Total number of non-terminated pods targeted by this VMAlert
	// cluster that have the desired version spec.
	UpdatedReplicas int32 `json:"updatedReplicas"`
	// AvailableReplicas Total number of available pods (ready for at least minReadySeconds)
	// targeted by this VMAlert cluster.
	AvailableReplicas int32 `json:"availableReplicas"`
	// UnavailableReplicas Total number of unavailable pods targeted by this VMAlert cluster.
	UnavailableReplicas int32 `json:"unavailableReplicas"`
}

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

func (VMAlert) Annotations

func (cr VMAlert) Annotations() map[string]string

func (*VMAlert) AsCRDOwner added in v0.16.0

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

AsCRDOwner implements interface

func (*VMAlert) AsOwner

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

func (*VMAlert) AsURL added in v0.15.0

func (cr *VMAlert) AsURL() string

func (*VMAlert) DeepCopy

func (in *VMAlert) DeepCopy() *VMAlert

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

func (*VMAlert) DeepCopyInto

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

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

func (*VMAlert) DeepCopyObject

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

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

func (VMAlert) GetNSName added in v0.9.0

func (cr VMAlert) GetNSName() string

func (VMAlert) GetPSPName added in v0.5.0

func (cr VMAlert) GetPSPName() string

func (VMAlert) GetServiceAccountName added in v0.5.0

func (cr VMAlert) GetServiceAccountName() string

func (VMAlert) HealthPath added in v0.2.1

func (cr VMAlert) HealthPath() string

func (VMAlert) Labels added in v0.5.0

func (cr VMAlert) Labels() map[string]string

func (VMAlert) MetricPath added in v0.2.1

func (cr VMAlert) MetricPath() string

func (VMAlert) NeedDedupRules added in v0.4.0

func (cr VMAlert) NeedDedupRules() bool

func (VMAlert) NotifierAsMapKey added in v0.6.0

func (cr VMAlert) NotifierAsMapKey(i int) string

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

func (VMAlert) PodAnnotations

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

func (VMAlert) PodLabels

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

func (VMAlert) PrefixedName

func (cr VMAlert) PrefixedName() string

func (VMAlert) ReloadPathWithPort added in v0.2.1

func (cr VMAlert) ReloadPathWithPort(port string) string

func (VMAlert) RulesConfigMapSelector added in v0.10.0

func (cr VMAlert) RulesConfigMapSelector() client.ListOption

func (VMAlert) SelectorLabels

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

func (*VMAlert) SetupWebhookWithManager added in v0.15.0

func (r *VMAlert) SetupWebhookWithManager(mgr ctrl.Manager) error

func (VMAlert) TLSAssetName added in v0.1.0

func (cr VMAlert) TLSAssetName() string

func (*VMAlert) ValidateCreate added in v0.15.0

func (r *VMAlert) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*VMAlert) ValidateDelete added in v0.15.0

func (r *VMAlert) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*VMAlert) ValidateUpdate added in v0.15.0

func (r *VMAlert) ValidateUpdate(old runtime.Object) error

ValidateUpdate 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"`
	// BasicAuth allow datasource to authenticate over basic authentication
	// +optional
	BasicAuth *BasicAuth `json:"basicAuth,omitempty"`
	// TLSConfig describes tls configuration for datasource target
	TLSConfig *TLSConfig `json:"tlsConfig,omitempty"`
}

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

func (*VMAlertDatasourceSpec) DeepCopy

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

func (*VMAlertDatasourceSpec) DeepCopyInto

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

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

type VMAlertList

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

VMAlertList contains a list of VMAlert

func (*VMAlertList) DeepCopy

func (in *VMAlertList) DeepCopy() *VMAlertList

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

func (*VMAlertList) DeepCopyInto

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

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

func (*VMAlertList) DeepCopyObject

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

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

type VMAlertNotifierSpec added in v0.1.0

type VMAlertNotifierSpec struct {
	// AlertManager url. Required parameter. E.g. http://127.0.0.1:9093
	URL string `json:"url"`
	// BasicAuth allow notifier to authenticate over basic authentication
	// +optional
	BasicAuth *BasicAuth `json:"basicAuth,omitempty"`
	// TLSConfig describes tls configuration for notifier
	TLSConfig *TLSConfig `json:"tlsConfig,omitempty"`
}

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

func (*VMAlertNotifierSpec) DeepCopy added in v0.1.0

func (in *VMAlertNotifierSpec) DeepCopy() *VMAlertNotifierSpec

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

func (*VMAlertNotifierSpec) DeepCopyInto added in v0.1.0

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"`
	// BasicAuth allow an endpoint to authenticate over basic authentication
	// +optional
	BasicAuth *BasicAuth `json:"basicAuth,omitempty"`
	// 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"`
	// TLSConfig describes tls configuration for remote read target
	TLSConfig *TLSConfig `json:"tlsConfig,omitempty"`
}

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

func (*VMAlertRemoteReadSpec) DeepCopy

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

func (*VMAlertRemoteReadSpec) DeepCopyInto

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

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

type VMAlertRemoteWriteSpec

type VMAlertRemoteWriteSpec struct {
	// URL of the endpoint to send samples to.
	URL string `json:"url"`
	// BasicAuth allow an endpoint to authenticate over basic authentication
	// +optional
	BasicAuth *BasicAuth `json:"basicAuth,omitempty"`
	// 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"`
	// TLSConfig describes tls configuration for remote write target
	TLSConfig *TLSConfig `json:"tlsConfig,omitempty"`
}

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

func (*VMAlertRemoteWriteSpec) DeepCopy

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

func (*VMAlertRemoteWriteSpec) DeepCopyInto

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

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

type VMAlertSpec

type VMAlertSpec struct {
	// 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 http://kubernetes.io/docs/user-guide/images#specifying-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"`
	// 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"`
	// 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"`
	// PodSecurityPolicyName - defines name for podSecurityPolicy
	// in case of empty value, prefixedName will be used.
	// +optional
	PodSecurityPolicyName string `json:"podSecurityPolicyName,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 how often evalute 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"`
	// RuleSelector selector to select which VMRules to mount for loading alerting
	// rules from.
	// +optional
	RuleSelector *metav1.LabelSelector `json:"ruleSelector,omitempty"`
	// RuleNamespaceSelector to be selected for VMRules discovery. If unspecified, only
	// the same namespace as the vmalert object is in is used.
	// +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. e.g. http://127.0.0.1:9093
	// If specified both notifier and notifiers, notifier will be added as last element to notifiers.
	Notifier *VMAlertNotifierSpec `json:"notifier,omitempty"`

	// Notifiers prometheus alertmanager endpoints. Required at least one of  notifier or notifiers. e.g. http://127.0.0.1:9093
	// If specified both notifier and notifiers, notifier will be added as last element to notifiers.
	Notifiers []VMAlertNotifierSpec `json:"notifiers,omitempty"`

	// RemoteWrite Optional URL to remote-write compatible storage where to write timeseriesbased on active alerts. E.g. http://127.0.0.1:8428
	// +optional
	RemoteWrite *VMAlertRemoteWriteSpec `json:"remoteWrite,omitempty"`

	// RemoteRead victoria metrics address for loading state
	// This configuration makes sense only if remoteWrite was configured before and has
	// been successfully persisted its state.
	// +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"`

	// 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 *ServiceSpec `json:"serviceSpec,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"`
}

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.

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"`
	// UpdatedReplicas Total number of non-terminated pods targeted by this VMAlert
	// cluster that have the desired version spec.
	UpdatedReplicas int32 `json:"updatedReplicas"`
	// AvailableReplicas Total number of available pods (ready for at least minReadySeconds)
	// targeted by this VMAlert cluster.
	AvailableReplicas int32 `json:"availableReplicas"`
	// UnavailableReplicas Total number of unavailable pods targeted by this VMAlert cluster.
	UnavailableReplicas int32 `json:"unavailableReplicas"`
}

VmAlertStatus defines the observed state of VmAlert +k8s:openapi-gen=true +kubebuilder:subresource:status

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:printcolumn:name="Version",type="string",JSONPath=".spec.version",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

func (VMAlertmanager) Annotations

func (cr VMAlertmanager) Annotations() map[string]string

func (*VMAlertmanager) AsCRDOwner added in v0.16.0

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

AsCRDOwner implements interface

func (*VMAlertmanager) AsOwner

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

func (*VMAlertmanager) AsURL added in v0.15.0

func (cr *VMAlertmanager) AsURL() string

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) GetNSName added in v0.9.0

func (cr VMAlertmanager) GetNSName() string

func (VMAlertmanager) GetPSPName added in v0.5.0

func (cr VMAlertmanager) GetPSPName() string

func (VMAlertmanager) GetServiceAccountName added in v0.5.0

func (cr VMAlertmanager) GetServiceAccountName() string

func (VMAlertmanager) Labels added in v0.5.0

func (cr VMAlertmanager) Labels() map[string]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) SelectorLabels

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

func (*VMAlertmanager) SetupWebhookWithManager added in v0.15.0

func (r *VMAlertmanager) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*VMAlertmanager) ValidateCreate added in v0.15.0

func (r *VMAlertmanager) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*VMAlertmanager) ValidateDelete added in v0.15.0

func (r *VMAlertmanager) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*VMAlertmanager) ValidateUpdate added in v0.15.0

func (r *VMAlertmanager) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

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 {
	// 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 http://kubernetes.io/docs/user-guide/images#specifying-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/alertmanager/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/alertmanager/configmaps/<configmap-name>.
	// +optional
	ConfigMaps []string `json:"configMaps,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"`
	// 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:=1
	// +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"`
	// 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"`
	// PodSecurityPolicyName - defines name for podSecurityPolicy
	// in case of empty value, prefixedName will be used.
	// +optional
	PodSecurityPolicyName string `json:"podSecurityPolicyName,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"`
	// 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 *ServiceSpec `json:"serviceSpec,omitempty"`
	// PodDisruptionBudget created by operator
	// +optional
	PodDisruptionBudget *EmbeddedPodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"`
	*EmbeddedProbes     `json:",inline"`
}

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.

type VMAlertmanagerStatus

type VMAlertmanagerStatus struct {
	// Paused Represents whether any actions on the underlaying managed objects are
	// being performed. Only delete actions will be performed.
	Paused bool `json:"paused"`
	// ReplicaCount Total number of non-terminated pods targeted by this VMAlertmanager
	// cluster (their labels match the selector).
	Replicas int32 `json:"replicas"`
	// UpdatedReplicas Total number of non-terminated pods targeted by this VMAlertmanager
	// cluster that have the desired version spec.
	UpdatedReplicas int32 `json:"updatedReplicas"`
	// AvailableReplicas Total number of available pods (ready for at least minReadySeconds)
	// targeted by this VMAlertmanager cluster.
	AvailableReplicas int32 `json:"availableReplicas"`
	// UnavailableReplicas Total number of unavailable pods targeted by this VMAlertmanager cluster.
	UnavailableReplicas int32 `json:"unavailableReplicas"`
}

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

func (*VMAlertmanagerStatus) DeepCopy

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

func (*VMAlertmanagerStatus) DeepCopyInto

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

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

type VMAuth added in v0.15.0

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

func (VMAuth) Annotations added in v0.15.0

func (cr VMAuth) Annotations() map[string]string

func (*VMAuth) AsCRDOwner added in v0.16.0

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

AsCRDOwner implements interface

func (*VMAuth) AsOwner added in v0.15.0

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

func (VMAuth) ConfigSecretName added in v0.15.0

func (cr VMAuth) ConfigSecretName() string

func (*VMAuth) DeepCopy added in v0.15.0

func (in *VMAuth) DeepCopy() *VMAuth

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

func (*VMAuth) DeepCopyInto added in v0.15.0

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

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

func (*VMAuth) DeepCopyObject added in v0.15.0

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

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

func (VMAuth) GetNSName added in v0.15.0

func (cr VMAuth) GetNSName() string

func (VMAuth) GetPSPName added in v0.15.0

func (cr VMAuth) GetPSPName() string

func (VMAuth) GetServiceAccountName added in v0.15.0

func (cr VMAuth) GetServiceAccountName() string

func (VMAuth) HealthPath added in v0.15.0

func (cr VMAuth) HealthPath() string

func (VMAuth) Labels added in v0.15.0

func (cr VMAuth) Labels() map[string]string

func (VMAuth) MetricPath added in v0.15.0

func (cr VMAuth) MetricPath() string

func (VMAuth) PodAnnotations added in v0.15.0

func (cr VMAuth) PodAnnotations() map[string]string

func (VMAuth) PodLabels added in v0.15.0

func (cr VMAuth) PodLabels() map[string]string

func (VMAuth) PrefixedName added in v0.15.0

func (cr VMAuth) PrefixedName() string

func (VMAuth) ReloadPathWithPort added in v0.15.0

func (cr VMAuth) ReloadPathWithPort(port string) string

func (VMAuth) SelectorLabels added in v0.15.0

func (cr VMAuth) SelectorLabels() map[string]string

func (*VMAuth) SetupWebhookWithManager added in v0.15.0

func (r *VMAuth) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*VMAuth) ValidateCreate added in v0.15.0

func (cr *VMAuth) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*VMAuth) ValidateDelete added in v0.15.0

func (r *VMAuth) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*VMAuth) ValidateUpdate added in v0.15.0

func (cr *VMAuth) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type VMAuthList added in v0.15.0

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 added in v0.15.0

func (in *VMAuthList) DeepCopy() *VMAuthList

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

func (*VMAuthList) DeepCopyInto added in v0.15.0

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 added in v0.15.0

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

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

type VMAuthSpec added in v0.15.0

type VMAuthSpec struct {

	// 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 http://kubernetes.io/docs/user-guide/images#specifying-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"`
	// ReplicaCount is the expected size of the VMAuth
	// 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"`

	// 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"`
	// PodSecurityPolicyName - defines name for podSecurityPolicy
	// in case of empty value, prefixedName will be used.
	// +optional
	PodSecurityPolicyName string `json:"podSecurityPolicyName,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"`
	// 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"`

	// UserSelector defines VMUser to be selected for config file generation.
	// +optional
	UserSelector *metav1.LabelSelector `json:"userSelector,omitempty"`
	// UserNamespaceSelector Namespaces to be selected for  VMAuth discovery. If nil, only
	// check own namespace.
	// +optional
	UserNamespaceSelector *metav1.LabelSelector `json:"userNamespaceSelector,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 *ServiceSpec `json:"serviceSpec,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"`
}

VMAuthSpec defines the desired state of VMAuth

func (*VMAuthSpec) DeepCopy added in v0.15.0

func (in *VMAuthSpec) DeepCopy() *VMAuthSpec

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

func (*VMAuthSpec) DeepCopyInto added in v0.15.0

func (in *VMAuthSpec) DeepCopyInto(out *VMAuthSpec)

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

type VMAuthStatus added in v0.15.0

type VMAuthStatus struct {
}

VMAuthStatus defines the observed state of VMAuth

func (*VMAuthStatus) DeepCopy added in v0.15.0

func (in *VMAuthStatus) DeepCopy() *VMAuthStatus

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

func (*VMAuthStatus) DeepCopyInto added in v0.15.0

func (in *VMAuthStatus) DeepCopyInto(out *VMAuthStatus)

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

type VMBackup added in v0.1.0

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/assets/VM_EULA.pdf
	AcceptEULA bool `json:"acceptEULA"`
	// 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"`
	// 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 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"`
	// 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"`
}

func (*VMBackup) DeepCopy added in v0.1.0

func (in *VMBackup) DeepCopy() *VMBackup

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

func (*VMBackup) DeepCopyInto added in v0.1.0

func (in *VMBackup) DeepCopyInto(out *VMBackup)

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

func (VMBackup) SnapshotCreatePathWithFlags added in v0.2.1

func (cr VMBackup) SnapshotCreatePathWithFlags(port string, extraArgs map[string]string) string

func (VMBackup) SnapshotDeletePathWithFlags added in v0.2.1

func (cr VMBackup) SnapshotDeletePathWithFlags(port string, extraArgs map[string]string) string

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) Annotations

func (cr VMCluster) Annotations() map[string]string

func (*VMCluster) AsCRDOwner added in v0.16.0

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

AsCRDOwner implements interface

func (*VMCluster) AsOwner

func (c *VMCluster) AsOwner() []metav1.OwnerReference

func (*VMCluster) AsURL added in v0.15.0

func (cr *VMCluster) AsURL() string

AsURL implements stub for interface.

func (VMCluster) AvailableStorageNodeIDs added in v0.14.0

func (cr VMCluster) AvailableStorageNodeIDs(requestsType string) []int32

func (*VMCluster) DeepCopy

func (in *VMCluster) DeepCopy() *VMCluster

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

func (*VMCluster) DeepCopyInto

func (in *VMCluster) DeepCopyInto(out *VMCluster)

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

func (*VMCluster) DeepCopyObject

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

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

func (VMCluster) FinalLabels

func (cr VMCluster) FinalLabels(baseLabels map[string]string) map[string]string

func (VMCluster) GetNSName added in v0.9.0

func (cr VMCluster) GetNSName() string

func (VMCluster) GetPSPName added in v0.5.0

func (cr VMCluster) GetPSPName() string

func (VMCluster) GetServiceAccountName added in v0.5.0

func (cr VMCluster) GetServiceAccountName() string

func (VMCluster) HealthPathInsert added in v0.2.1

func (cr VMCluster) HealthPathInsert() string

func (VMCluster) HealthPathSelect added in v0.2.1

func (cr VMCluster) HealthPathSelect() string

func (VMCluster) HealthPathStorage added in v0.2.1

func (cr VMCluster) HealthPathStorage() string

func (VMCluster) Labels added in v0.5.0

func (cr VMCluster) Labels() map[string]string

func (VMCluster) MetricPathInsert added in v0.2.1

func (cr VMCluster) MetricPathInsert() string

func (VMCluster) MetricPathSelect added in v0.2.1

func (cr VMCluster) MetricPathSelect() string

func (VMCluster) MetricPathStorage added in v0.2.1

func (cr VMCluster) MetricPathStorage() string

func (VMCluster) PrefixedName added in v0.5.0

func (cr VMCluster) PrefixedName() string

func (VMCluster) SelectorLabels added in v0.5.0

func (cr VMCluster) SelectorLabels() map[string]string

func (*VMCluster) SetupWebhookWithManager added in v0.15.0

func (r *VMCluster) SetupWebhookWithManager(mgr ctrl.Manager) error

func (VMCluster) VMInsertPodAnnotations

func (cr VMCluster) VMInsertPodAnnotations() map[string]string

func (VMCluster) VMInsertPodLabels

func (cr VMCluster) VMInsertPodLabels() map[string]string

func (VMCluster) VMInsertSelectorLabels

func (cr VMCluster) VMInsertSelectorLabels() map[string]string

func (*VMCluster) VMInsertURL added in v0.15.0

func (cr *VMCluster) VMInsertURL() string

func (VMCluster) VMSelectPodAnnotations

func (cr VMCluster) VMSelectPodAnnotations() map[string]string

func (VMCluster) VMSelectPodLabels

func (cr VMCluster) VMSelectPodLabels() map[string]string

func (VMCluster) VMSelectSelectorLabels

func (cr VMCluster) VMSelectSelectorLabels() map[string]string

func (*VMCluster) VMSelectURL added in v0.15.0

func (cr *VMCluster) VMSelectURL() string

func (VMCluster) VMStoragePodAnnotations

func (cr VMCluster) VMStoragePodAnnotations() map[string]string

func (VMCluster) VMStoragePodLabels

func (cr VMCluster) VMStoragePodLabels() map[string]string

func (VMCluster) VMStorageSelectorLabels

func (cr VMCluster) VMStorageSelectorLabels() map[string]string

func (*VMCluster) VMStorageURL added in v0.15.0

func (cr *VMCluster) VMStorageURL() string

func (*VMCluster) ValidateCreate added in v0.15.0

func (r *VMCluster) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*VMCluster) ValidateDelete added in v0.15.0

func (r *VMCluster) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*VMCluster) ValidateUpdate added in v0.15.0

func (r *VMCluster) ValidateUpdate(old runtime.Object) error

ValidateUpdate 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"`
}

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

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 {
	// RetentionPeriod in months
	// +kubebuilder:validation:Pattern:="[1-9]+"
	RetentionPeriod string `json:"retentionPeriod"`
	// ReplicationFactor defines how many copies of data make among
	// distinct storage nodes
	// +optional
	ReplicationFactor *int32 `json:"replicationFactor,omitempty"`
	// PodSecurityPolicyName - defines name for podSecurityPolicy
	// in case of empty value, prefixedName will be used.
	// +optional
	PodSecurityPolicyName string `json:"podSecurityPolicyName,omitempty"`

	// ServiceAccountName is the name of the ServiceAccount to use to run the
	// VMSelect 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 http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod
	// +optional
	ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
	// +optional
	VMSelect *VMSelect `json:"vmselect,omitempty"`
	// +optional
	VMInsert *VMInsert `json:"vminsert,omitempty"`
	// +optional
	VMStorage *VMStorage `json:"vmstorage,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.

type VMClusterStatus

type VMClusterStatus struct {
	// Deprecated.
	UpdateFailCount int `json:"updateFailCount"`
	// Deprecated.
	LastSync      string `json:"lastSync,omitempty"`
	ClusterStatus string `json:"clusterStatus"`
	Reason        string `json:"reason,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 {
	// +optional
	Name string `json:"name,omitempty"`

	// PodMetadata configures Labels and Annotations which are propagated to the VMSelect 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 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"`
	// 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"`
	// 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"`
	// 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"`

	// 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 VMSelect pod
	// +optional
	ExtraEnvs []v1.EnvVar `json:"extraEnvs,omitempty"`

	// ServiceSpec that will be added to vminsert service spec
	// +optional
	ServiceSpec *ServiceSpec `json:"serviceSpec,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"`
}

func (*VMInsert) DeepCopy

func (in *VMInsert) DeepCopy() *VMInsert

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

func (*VMInsert) DeepCopyInto

func (in *VMInsert) DeepCopyInto(out *VMInsert)

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

func (VMInsert) GetNameWithPrefix

func (i VMInsert) GetNameWithPrefix(clusterName string) string

type VMNodeScrape added in v0.6.0

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.

func (VMNodeScrape) AsMapKey added in v0.6.0

func (cr VMNodeScrape) AsMapKey() string

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

func (*VMNodeScrape) DeepCopy added in v0.6.0

func (in *VMNodeScrape) DeepCopy() *VMNodeScrape

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

func (*VMNodeScrape) DeepCopyInto added in v0.6.0

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 added in v0.6.0

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

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

type VMNodeScrapeList added in v0.6.0

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 added in v0.6.0

func (in *VMNodeScrapeList) DeepCopy() *VMNodeScrapeList

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

func (*VMNodeScrapeList) DeepCopyInto added in v0.6.0

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 added in v0.6.0

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

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

type VMNodeScrapeSpec added in v0.6.0

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
	Scheme string `json:"scheme,omitempty"`
	// Optional HTTP URL parameters
	// +optional
	Params map[string][]string `json:"params,omitempty"`
	// Interval at which metrics should be scraped
	// +optional
	Interval string `json:"interval,omitempty"`
	// Timeout after which the scrape is ended
	// +optional
	ScrapeTimeout string `json:"scrapeTimeout,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
	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"`
}

VMNodeScrapeSpec defines specification for VMNodeScrape.

func (*VMNodeScrapeSpec) DeepCopy added in v0.6.0

func (in *VMNodeScrapeSpec) DeepCopy() *VMNodeScrapeSpec

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

func (*VMNodeScrapeSpec) DeepCopyInto added in v0.6.0

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 added in v0.6.0

type VMNodeScrapeStatus struct {
}

VMNodeScrapeStatus defines the observed state of VMNodeScrape

func (*VMNodeScrapeStatus) DeepCopy added in v0.6.0

func (in *VMNodeScrapeStatus) DeepCopy() *VMNodeScrapeStatus

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

func (*VMNodeScrapeStatus) DeepCopyInto added in v0.6.0

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) 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:"
	Selector metav1.LabelSelector `json:"selector"`
	// 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"`
}

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 added in v0.2.0

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

func (*VMProbe) DeepCopy added in v0.2.0

func (in *VMProbe) DeepCopy() *VMProbe

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

func (*VMProbe) DeepCopyInto added in v0.2.0

func (in *VMProbe) DeepCopyInto(out *VMProbe)

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

func (*VMProbe) DeepCopyObject added in v0.2.0

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

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

type VMProbeList added in v0.2.0

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

+kubebuilder:object:root=true VMProbeList contains a list of VMProbe

func (*VMProbeList) DeepCopy added in v0.2.0

func (in *VMProbeList) DeepCopy() *VMProbeList

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

func (*VMProbeList) DeepCopyInto added in v0.2.0

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 added in v0.2.0

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

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

type VMProbeSpec added in v0.2.0

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"`
	// Timeout for scraping metrics from the Prometheus exporter.
	ScrapeTimeout string `json:"scrapeTimeout,omitempty"`
}

VMProbeSpec contains specification parameters for a Probe. +k8s:openapi-gen=true

func (*VMProbeSpec) DeepCopy added in v0.2.0

func (in *VMProbeSpec) DeepCopy() *VMProbeSpec

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

func (*VMProbeSpec) DeepCopyInto added in v0.2.0

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 added in v0.2.0

type VMProbeStatus struct {
}

VMProbeStatus defines the observed state of VMProbe

func (*VMProbeStatus) DeepCopy added in v0.2.0

func (in *VMProbeStatus) DeepCopy() *VMProbeStatus

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

func (*VMProbeStatus) DeepCopyInto added in v0.2.0

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 added in v0.2.0

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 added in v0.2.0

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

func (*VMProbeTargetStaticConfig) DeepCopyInto added in v0.2.0

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

type VMProbeTargets added in v0.2.0

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 added in v0.2.0

func (in *VMProbeTargets) DeepCopy() *VMProbeTargets

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

func (*VMProbeTargets) DeepCopyInto added in v0.2.0

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 added in v0.2.0

type VMProberSpec struct {
	// Mandatory URL of the prober.
	URL string `json:"url"`
	// HTTP scheme to use for scraping.
	// Defaults to `http`.
	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 added in v0.2.0

func (in *VMProberSpec) DeepCopy() *VMProberSpec

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

func (*VMProberSpec) DeepCopyInto added in v0.2.0

func (in *VMProberSpec) DeepCopyInto(out *VMProberSpec)

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

func (in *VMRule) DeepCopy() *VMRule

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

func (*VMRule) DeepCopyInto

func (in *VMRule) DeepCopyInto(out *VMRule)

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

func (*VMRule) DeepCopyObject

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

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

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 VMSelect

type VMSelect struct {
	Name string `json:"name,omitempty"`
	// 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"`
	// 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"`
	// 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"`
	// 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
	// +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 cacheMounthPath
	// 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"`

	// 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 *ServiceSpec `json:"serviceSpec,omitempty"`
	// PodDisruptionBudget created by operator
	// +optional
	PodDisruptionBudget *EmbeddedPodDisruptionBudgetSpec `json:"podDisruptionBudget,omitempty"`
	*EmbeddedProbes     `json:",inline"`
	HPA                 *EmbeddedHPA `json:"hpa,omitempty"`
	// NodeSelector Define which Nodes the Pods are scheduled on.
	// +optional
	NodeSelector map[string]string `json:"nodeSelector,omitempty"`
}

func (VMSelect) BuildPodFQDNName

func (s VMSelect) BuildPodFQDNName(baseName string, podIndex int32, namespace, portName, domain string) string

func (*VMSelect) DeepCopy

func (in *VMSelect) DeepCopy() *VMSelect

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

func (*VMSelect) DeepCopyInto

func (in *VMSelect) DeepCopyInto(out *VMSelect)

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

func (VMSelect) GetCacheMountVolmeName

func (s VMSelect) GetCacheMountVolmeName() string

func (VMSelect) GetNameWithPrefix

func (s VMSelect) GetNameWithPrefix(clusterName string) string

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) 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:"
	Selector metav1.LabelSelector `json:"selector"`
	// 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"`
}

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

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

func (VMSingle) Annotations

func (cr VMSingle) Annotations() map[string]string

func (*VMSingle) AsCRDOwner added in v0.16.0

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

AsCRDOwner implements interface

func (*VMSingle) AsOwner

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

func (*VMSingle) AsURL added in v0.15.0

func (cr *VMSingle) AsURL() string

func (*VMSingle) DeepCopy

func (in *VMSingle) DeepCopy() *VMSingle

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

func (*VMSingle) DeepCopyInto

func (in *VMSingle) DeepCopyInto(out *VMSingle)

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

func (*VMSingle) DeepCopyObject

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

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

func (VMSingle) GetNSName added in v0.9.0

func (cr VMSingle) GetNSName() string

func (VMSingle) GetPSPName added in v0.5.0

func (cr VMSingle) GetPSPName() string

func (VMSingle) GetServiceAccountName added in v0.5.0

func (cr VMSingle) GetServiceAccountName() string

func (VMSingle) HealthPath added in v0.2.1

func (cr VMSingle) HealthPath() string

func (VMSingle) Labels added in v0.5.0

func (cr VMSingle) Labels() map[string]string

func (VMSingle) MetricPath added in v0.2.1

func (cr VMSingle) MetricPath() string

func (VMSingle) PodAnnotations

func (cr VMSingle) PodAnnotations() map[string]string

func (VMSingle) PodLabels

func (cr VMSingle) PodLabels() map[string]string

func (VMSingle) PrefixedName

func (cr VMSingle) PrefixedName() string

func (VMSingle) SelectorLabels

func (cr VMSingle) SelectorLabels() map[string]string

func (*VMSingle) SetupWebhookWithManager added in v0.15.0

func (r *VMSingle) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*VMSingle) ValidateCreate added in v0.15.0

func (r *VMSingle) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*VMSingle) ValidateDelete added in v0.15.0

func (r *VMSingle) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*VMSingle) ValidateUpdate added in v0.15.0

func (r *VMSingle) ValidateUpdate(old runtime.Object) error

ValidateUpdate 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 {
	// 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 http://kubernetes.io/docs/user-guide/images#specifying-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"`

	// 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"`

	// 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"`
	// PodSecurityPolicyName - defines name for podSecurityPolicy
	// in case of empty value, prefixedName will be used.
	// +optional
	PodSecurityPolicyName string `json:"podSecurityPolicyName,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"`
	// 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 in months
	// +kubebuilder:validation:Pattern:="[1-9]+"
	RetentionPeriod string `json:"retentionPeriod"`
	// VMBackup configuration for backup
	// +optional
	VMBackup *VMBackup `json:"vmBackup,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 *ServiceSpec `json:"serviceSpec,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"`
}

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.

type VMSingleStatus

type VMSingleStatus struct {
	// ReplicaCount Total number of non-terminated pods targeted by this VMAlert
	// cluster (their labels match the selector).
	Replicas int32 `json:"replicas"`
	// UpdatedReplicas Total number of non-terminated pods targeted by this VMAlert
	// cluster that have the desired version spec.
	UpdatedReplicas int32 `json:"updatedReplicas"`
	// AvailableReplicas Total number of available pods (ready for at least minReadySeconds)
	// targeted by this VMAlert cluster.
	AvailableReplicas int32 `json:"availableReplicas"`
	// UnavailableReplicas Total number of unavailable pods targeted by this VMAlert cluster.
	UnavailableReplicas int32 `json:"unavailableReplicas"`
}

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 added in v0.10.0

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.

func (*VMStaticScrape) AsKey added in v0.10.0

func (cr *VMStaticScrape) AsKey(pos int) string

AsKey represent CR as map key.

func (*VMStaticScrape) DeepCopy added in v0.10.0

func (in *VMStaticScrape) DeepCopy() *VMStaticScrape

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

func (*VMStaticScrape) DeepCopyInto added in v0.10.0

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 added in v0.10.0

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

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

type VMStaticScrapeList added in v0.10.0

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 added in v0.10.0

func (in *VMStaticScrapeList) DeepCopy() *VMStaticScrapeList

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

func (*VMStaticScrapeList) DeepCopyInto added in v0.10.0

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 added in v0.10.0

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

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

type VMStaticScrapeSpec added in v0.10.0

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"`
}

VMStaticScrapeSpec defines the desired state of VMStaticScrape.

func (*VMStaticScrapeSpec) DeepCopy added in v0.10.0

func (in *VMStaticScrapeSpec) DeepCopy() *VMStaticScrapeSpec

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

func (*VMStaticScrapeSpec) DeepCopyInto added in v0.10.0

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 added in v0.10.0

type VMStaticScrapeStatus struct {
}

VMStaticScrapeStatus defines the observed state of VMStaticScrape

func (*VMStaticScrapeStatus) DeepCopy added in v0.10.0

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

func (*VMStaticScrapeStatus) DeepCopyInto added in v0.10.0

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 {
	// +optional
	Name string `json:"name,omitempty"`

	// PodMetadata configures Labels and Annotations which are propagated to the VMSelect 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 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"`
	// 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"`
	// 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"`
	// 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"`

	// +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 VMSelect pod
	// +optional
	ExtraEnvs []v1.EnvVar `json:"extraEnvs,omitempty"`
	// ServiceSpec that will be create additional service for vmstorage
	// +optional
	ServiceSpec *ServiceSpec `json:"serviceSpec,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"`
}

func (VMStorage) BuildPodFQDNName

func (s VMStorage) BuildPodFQDNName(baseName string, podIndex int32, namespace, portName, domain string) string

func (*VMStorage) DeepCopy

func (in *VMStorage) DeepCopy() *VMStorage

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

func (*VMStorage) DeepCopyInto

func (in *VMStorage) DeepCopyInto(out *VMStorage)

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

func (VMStorage) GetNameWithPrefix

func (s VMStorage) GetNameWithPrefix(clusterName string) string

func (VMStorage) GetStorageVolumeName

func (s VMStorage) GetStorageVolumeName() string

type VMUser added in v0.15.0

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

func (VMUser) Annotations added in v0.15.0

func (cr VMUser) Annotations() map[string]string

func (*VMUser) AsOwner added in v0.15.0

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

func (*VMUser) DeepCopy added in v0.15.0

func (in *VMUser) DeepCopy() *VMUser

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

func (*VMUser) DeepCopyInto added in v0.15.0

func (in *VMUser) DeepCopyInto(out *VMUser)

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

func (*VMUser) DeepCopyObject added in v0.15.0

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

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

func (VMUser) Labels added in v0.15.0

func (cr VMUser) Labels() map[string]string

func (*VMUser) PasswordRefAsKey added in v0.15.0

func (cr *VMUser) PasswordRefAsKey() string

PasswordRefAsKey - builds key for passwordRef cache

func (*VMUser) SecretName added in v0.15.0

func (cr *VMUser) SecretName() string

SecretName builds secret name for VMUser.

func (VMUser) SelectorLabels added in v0.15.0

func (cr VMUser) SelectorLabels() map[string]string

func (*VMUser) SetupWebhookWithManager added in v0.15.0

func (r *VMUser) SetupWebhookWithManager(mgr ctrl.Manager) error

func (*VMUser) ValidateCreate added in v0.15.0

func (cr *VMUser) ValidateCreate() error

ValidateCreate implements webhook.Validator so a webhook will be registered for the type

func (*VMUser) ValidateDelete added in v0.15.0

func (r *VMUser) ValidateDelete() error

ValidateDelete implements webhook.Validator so a webhook will be registered for the type

func (*VMUser) ValidateUpdate added in v0.15.0

func (cr *VMUser) ValidateUpdate(old runtime.Object) error

ValidateUpdate implements webhook.Validator so a webhook will be registered for the type

type VMUserList added in v0.15.0

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 added in v0.15.0

func (in *VMUserList) DeepCopy() *VMUserList

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

func (*VMUserList) DeepCopyInto added in v0.15.0

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 added in v0.15.0

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

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

type VMUserSpec added in v0.15.0

type VMUserSpec struct {
	// 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 to fetch password from user-create secret by its name and key.
	// +optional
	PasswordRef *v1.SecretKeySelector `json:"passwordRef,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"`
}

VMUserSpec defines the desired state of VMUser

func (*VMUserSpec) DeepCopy added in v0.15.0

func (in *VMUserSpec) DeepCopy() *VMUserSpec

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

func (*VMUserSpec) DeepCopyInto added in v0.15.0

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 added in v0.15.0

type VMUserStatus struct {
}

VMUserStatus defines the observed state of VMUser

func (*VMUserStatus) DeepCopy added in v0.15.0

func (in *VMUserStatus) DeepCopy() *VMUserStatus

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

func (*VMUserStatus) DeepCopyInto added in v0.15.0

func (in *VMUserStatus) DeepCopyInto(out *VMUserStatus)

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

Jump to

Keyboard shortcuts

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