v1beta1

package
v0.0.6-rc4 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: Apache-2.0 Imports: 9 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 (
	ClusterStatusExpanding   = "expanding"
	ClusterStatusOperational = "operational"
	ClusterStatusFailed      = "failed"

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

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 PrefixedName

func PrefixedName(name, prefix string) string

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 monitor 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 monitor 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 monitor namespace that contains the username
	// for authentication.
	// +optional
	Username v1.SecretKeySelector `json:"username,omitempty"`
	// The secret in the service monitor 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 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 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 monitor 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 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"`
}

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 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 {
	//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"`
	//Separator placed between concatenated source label values. default is ';'.
	// +optional
	Separator string `json:"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"`
	//Regular expression against which the extracted value is matched. Default is '(.*)'
	// +optional
	Regex string `json:"regex,omitempty"`
	// Modulus to take of the hash of the source label values.
	// +optional
	Modulus uint64 `json:"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"`
	// Action to perform based on regex matching. Default is 'replace'
	// +optional
	Action string `json:"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.

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

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

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

	Spec   VMAgentSpec   `json:"spec,omitempty"`
	Status VMAgentStatus `json:"status,omitempty"`
}

VMAgent represents a Victoria-Metrics agent application +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) AsOwner

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

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

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

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

func (VMAgent) TLSAssetName

func (cr VMAgent) TLSAssetName() string

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 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"`
	// 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"`
	// 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"`
	// ConfigMap with relabeling config which is applied to metrics before sending them to the corresponding -remoteWrite.url
	// +optional
	UrlRelabelConfig *v1.ConfigMapKeySelector `json:"urlRelabelConfig,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"`
	// Whether to show -remoteWrite.url in the exported metrics. It is hidden by default, since it can contain sensistive 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"`
	// TLSConfig describes tls configuration for remote write target
	TLSConfig *TLSConfig `json:"tlsConfig,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 - victoria metrics agent base image
	// if not specified - use default from operator config
	// +optional
	Image *string `json:"image,omitempty"`
	// Version for VMAgent.
	// +optional
	Version string `json:"version,omitempty"`
	// ImagePullSecrets optional list of references to secrets in the same namespace
	// to use for pulling prometheus and vmagent 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/vmagent/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/vmagent/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:gen-csv:customresourcedefinitions.specDescriptors=true
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.displayName="Pod Count"
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.x-descriptors="urn:alm:descriptor:com.tectonic.ui:podCount"
	// +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:gen-csv:customresourcedefinitions.specDescriptors=true
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.displayName="Resources"
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.x-descriptors="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.
	// required
	ServiceAccountName string `json:"serviceAccountName"`
	// Containers property allows to inject additions sidecars. 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"`
	// 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 ServiceMonitor or PodMonitor 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"`
	// ReplicaExternalLabelName Name of vmagent external label used to denote replica name.
	// Defaults to the value of `prometheus_replica`. External label will
	// _not_ be added when value is set to empty string (`""`).
	// +optional
	ReplicaExternalLabelName *string `json:"replicaExternalLabelName,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"`
	// RelabelConfig ConfigMap with global relabel config -remoteWrite.relabelConfig
	// This relabeling is applied to all the collected metrics before sending them to remote storage.
	// +optional
	RelabelConfig *v1.ConfigMapKeySelector `json:"relabelConfig,omitempty"`
	// ServiceMonitorSelector defines ServiceMonitors to be selected for target discovery. if
	// neither this nor podMonitorSelector are specified, configuration is
	// unmanaged.
	// +optional
	ServiceMonitorSelector *metav1.LabelSelector `json:"serviceMonitorSelector,omitempty"`
	// ServiceMonitorNamespaceSelector Namespaces to be selected for ServiceMonitor discovery. If nil, only
	// check own namespace.
	// +optional
	ServiceMonitorNamespaceSelector *metav1.LabelSelector `json:"serviceMonitorNamespaceSelector,omitempty"`
	// PodMonitorSelector defines PodMonitors to be selected for target discovery.
	// if neither this nor serviceMonitorSelector are specified,
	// configuration is unmanaged.
	// +optional
	PodMonitorSelector *metav1.LabelSelector `json:"podMonitorSelector,omitempty"`
	// PodMonitorNamespaceSelector defines Namespaces to be selected for PodMonitor discovery. If nil, only
	// check own namespace.
	// +optional
	PodMonitorNamespaceSelector *metav1.LabelSelector `json:"podMonitorNamespaceSelector,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 monitor can access arbitrary files on the file system
	// of the VMAgent container e.g. bearer token files.
	// +optional
	ArbitraryFSAccessThroughSMs ArbitraryFSAccessThroughSMsConfig `json:"arbitraryFSAccessThroughSMs,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"`
}

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 represents a Victoria-Metrics alert application +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) AsOwner

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

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

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

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

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

func (VMAlert) TLSAssetName added in v0.1.0

func (cr VMAlert) TLSAssetName() string

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

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 victoria metrics alert base image
	// +optional
	Image *string `json:"image,omitempty"`
	// Version the VMAlert should be on.
	Version string `json:"version,omitempty"`
	// ImagePullSecrets An optional list of references to secrets in the same namespace
	// to use for pulling prometheus and VMAlert images from registries
	// see http://kubernetes.io/docs/user-guide/images#specifying-imagepullsecrets-on-a-pod
	ImagePullSecrets []v1.LocalObjectReference `json:"imagePullSecrets,omitempty"`
	// Secrets is a list of Secrets in the same namespace as the VMAlert
	// object, which shall be mounted into the VMAlert Pods.
	// The Secrets are mounted into /etc/vmalert/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/vmalert/configmaps/<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.
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.displayName="Pod Count"
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.x-descriptors="urn:alm:descriptor:com.tectonic.ui:podCount"
	// +optional
	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:gen-csv:customresourcedefinitions.specDescriptors=true
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.displayName="Resources"
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.x-descriptors="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"`
	// Containers property allows to inject additions sidecars. 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"`

	// 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 URL. Required parameter. e.g. http://127.0.0.1:9093
	Notifier VMAlertNotifierSpec `json:"notifier"`

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

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

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

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

func (cr VMAlertmanager) FinalLabels() 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

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 if specified has precedence over baseImage, tag and sha
	// combinations.
	// +optional
	Image *string `json:"image,omitempty"`
	// Version the cluster should be on.
	// +optional
	Version string `json:"version,omitempty"`
	// Tag of VMAlertmanager container image to be deployed. Defaults to the value of `version`.
	// Version is ignored if Tag is set.
	// +optional
	Tag string `json:"tag,omitempty"`
	// SHA of VMAlertmanager container image to be deployed. Defaults to the value of `version`.
	// Similar to a tag, but the SHA explicitly deploys an immutable container image.
	// Version and Tag are ignored if SHA is set.
	// +optional
	SHA string `json:"sha,omitempty"`
	// BaseImage that is used to deploy pods, without tag.
	// +optional
	BaseImage string `json:"baseImage,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"`
	// ConfigSecret is the name of a Kubernetes Secret in the same namespace as the
	// VMAlertmanager object, which contains configuration for this VMAlertmanager
	// instance. Defaults to 'vmalertmanager-<alertmanager-name>'
	// The secret is mounted into /etc/alertmanager/config.
	// +optional
	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
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors=true
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.displayName="Pod Count"
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.x-descriptors="urn:alm:descriptor:com.tectonic.ui:podCount"
	// +kubebuilder:validation:Minimum:=1
	// +optional
	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:gen-csv:customresourcedefinitions.specDescriptors=true
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.displayName="Resources"
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.x-descriptors="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
	ServiceAccountName string `json:"serviceAccountName,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. 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"`
	// 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"`
}

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 VMCluster

type VMCluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	Spec              VMClusterSpec   `json:"spec"`
	Status            VMClusterStatus `json:"status,omitempty"`
}

VMCluster represents a Victoria-Metrics database cluster +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) AsOwner

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

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

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

	// 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 {
	UpdateFailCount int    `json:"updateFailCount"`
	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/vmalert/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/vmalert/configmaps/<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:gen-csv:customresourcedefinitions.specDescriptors=true
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.displayName="Pod Count"
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.x-descriptors="urn:alm:descriptor:com.tectonic.ui:podCount"
	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:gen-csv:customresourcedefinitions.specDescriptors=true
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.displayName="Resources"
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.x-descriptors="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
	// VMSelect Pods.
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty"`
	// Containers property allows to inject additions sidecars. 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"`
	// +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"`
	// ExtraEnvs that will be added to VMSelect pod
	// +optional
	ExtraEnvs []v1.EnvVar `json:"extraEnvs,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 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 the Schema for the podscrapes API 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 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/configmaps/<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:gen-csv:customresourcedefinitions.specDescriptors=true
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.displayName="Pod Count"
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.x-descriptors="urn:alm:descriptor:com.tectonic.ui:podCount"
	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:gen-csv:customresourcedefinitions.specDescriptors=true
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.displayName="Resources"
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.x-descriptors="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
	// VMSelect Pods.
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty"`
	// Containers property allows to inject additions sidecars. 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"`

	// 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
	// +optional
	Storage *StorageSpec `json:"persistentVolume,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"`
}

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 the Schema for the servicescrapes API 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 {
	// 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 ServiceMonitor.
	Endpoints []Endpoint `json:"endpoints"`
	// Selector to select Endpoints objects.
	// +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"`
}

+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object VMSingle represents a Victoria-Metrics single database +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) AsOwner

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

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

func (cr VMSingle) FinalLabels() map[string]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

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 victoria metrics single base image
	// +optional
	Image *string `json:"image,omitempty"`
	// Version of victoria metrics single
	// +optional
	Version string `json:"version,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:gen-csv:customresourcedefinitions.specDescriptors=true
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.displayName="Pod Count"
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.x-descriptors="urn:alm:descriptor:com.tectonic.ui:podCount"
	ReplicaCount *int32 `json:"replicaCount,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:gen-csv:customresourcedefinitions.specDescriptors=true
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.displayName="Resources"
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.x-descriptors="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"`
	// Containers property allows to inject additions sidecars. 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"`

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

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 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/vmalert/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/vmalert/configmaps/<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:gen-csv:customresourcedefinitions.specDescriptors=true
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.displayName="Pod Count"
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.x-descriptors="urn:alm:descriptor:com.tectonic.ui:podCount"
	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:gen-csv:customresourcedefinitions.specDescriptors=true
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.displayName="Resources"
	// +operator-sdk:gen-csv:customresourcedefinitions.specDescriptors.x-descriptors="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
	// VMSelect Pods.
	// +optional
	ServiceAccountName string `json:"serviceAccountName,omitempty"`
	// Containers property allows to inject additions sidecars. 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"`

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

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

	// +optional
	ExtraArgs map[string]string `json:"extraArgs,omitempty"`
	// ExtraEnvs that will be added to VMSelect pod
	// +optional
	ExtraEnvs []v1.EnvVar `json:"extraEnvs,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

Jump to

Keyboard shortcuts

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