diff --git a/api/operator/v1beta1/vmextra_types.go b/api/operator/v1beta1/vmextra_types.go
index efb2d4cc4..891f60da5 100644
--- a/api/operator/v1beta1/vmextra_types.go
+++ b/api/operator/v1beta1/vmextra_types.go
@@ -1207,6 +1207,9 @@ type CommonConfigReloaderParams struct {
// available since v0.57.0 version
// +optional
ConfigReloadAuthKeySecret *corev1.SecretKeySelector `json:"configReloadAuthKeySecret,omitempty"`
+ // ConfigReloaderEmptyDir sets emptyDir for reloader ephemeral volume, that is shared with main container
+ // +optional
+ ConfigReloaderEmptyDir *corev1.EmptyDirVolumeSource `json:"configReloaderEmptyDir,omitempty"`
}
// CommonApplicationDeploymentParams defines common params
diff --git a/api/operator/v1beta1/zz_generated.deepcopy.go b/api/operator/v1beta1/zz_generated.deepcopy.go
index da990529b..363e7bc50 100644
--- a/api/operator/v1beta1/zz_generated.deepcopy.go
+++ b/api/operator/v1beta1/zz_generated.deepcopy.go
@@ -536,6 +536,11 @@ func (in *CommonConfigReloaderParams) DeepCopyInto(out *CommonConfigReloaderPara
*out = new(v1.SecretKeySelector)
(*in).DeepCopyInto(*out)
}
+ if in.ConfigReloaderEmptyDir != nil {
+ in, out := &in.ConfigReloaderEmptyDir, &out.ConfigReloaderEmptyDir
+ *out = new(v1.EmptyDirVolumeSource)
+ (*in).DeepCopyInto(*out)
+ }
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommonConfigReloaderParams.
diff --git a/config/crd/overlay/crd.yaml b/config/crd/overlay/crd.yaml
index 0fc012eb8..9f7a6cef4 100644
--- a/config/crd/overlay/crd.yaml
+++ b/config/crd/overlay/crd.yaml
@@ -7928,6 +7928,31 @@ spec:
- key
type: object
x-kubernetes-map-type: atomic
+ configReloaderEmptyDir:
+ description: ConfigReloaderEmptyDir sets emptyDir for reloader ephemeral
+ volume, that is shared with main container
+ properties:
+ medium:
+ description: |-
+ medium represents what type of storage medium should back this directory.
+ The default is "" which means to use the node's default medium.
+ Must be an empty string (default) or Memory.
+ More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
+ type: string
+ sizeLimit:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ sizeLimit is the total amount of local storage required for this EmptyDir volume.
+ The size limit is also applicable for memory medium.
+ The maximum usage on memory medium EmptyDir would be the minimum value between
+ the SizeLimit specified here and the sum of memory limits of all containers in a pod.
+ The default is nil which means that the limit is undefined.
+ More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ type: object
configReloaderExtraArgs:
additionalProperties:
type: string
@@ -17686,6 +17711,31 @@ spec:
- key
type: object
x-kubernetes-map-type: atomic
+ configReloaderEmptyDir:
+ description: ConfigReloaderEmptyDir sets emptyDir for reloader ephemeral
+ volume, that is shared with main container
+ properties:
+ medium:
+ description: |-
+ medium represents what type of storage medium should back this directory.
+ The default is "" which means to use the node's default medium.
+ Must be an empty string (default) or Memory.
+ More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
+ type: string
+ sizeLimit:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ sizeLimit is the total amount of local storage required for this EmptyDir volume.
+ The size limit is also applicable for memory medium.
+ The maximum usage on memory medium EmptyDir would be the minimum value between
+ the SizeLimit specified here and the sum of memory limits of all containers in a pod.
+ The default is nil which means that the limit is undefined.
+ More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ type: object
configReloaderExtraArgs:
additionalProperties:
type: string
@@ -19756,6 +19806,31 @@ spec:
- key
type: object
x-kubernetes-map-type: atomic
+ configReloaderEmptyDir:
+ description: ConfigReloaderEmptyDir sets emptyDir for reloader ephemeral
+ volume, that is shared with main container
+ properties:
+ medium:
+ description: |-
+ medium represents what type of storage medium should back this directory.
+ The default is "" which means to use the node's default medium.
+ Must be an empty string (default) or Memory.
+ More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
+ type: string
+ sizeLimit:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ sizeLimit is the total amount of local storage required for this EmptyDir volume.
+ The size limit is also applicable for memory medium.
+ The maximum usage on memory medium EmptyDir would be the minimum value between
+ the SizeLimit specified here and the sum of memory limits of all containers in a pod.
+ The default is nil which means that the limit is undefined.
+ More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ type: object
configReloaderExtraArgs:
additionalProperties:
type: string
@@ -24509,6 +24584,31 @@ spec:
- key
type: object
x-kubernetes-map-type: atomic
+ configReloaderEmptyDir:
+ description: ConfigReloaderEmptyDir sets emptyDir for reloader ephemeral
+ volume, that is shared with main container
+ properties:
+ medium:
+ description: |-
+ medium represents what type of storage medium should back this directory.
+ The default is "" which means to use the node's default medium.
+ Must be an empty string (default) or Memory.
+ More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
+ type: string
+ sizeLimit:
+ anyOf:
+ - type: integer
+ - type: string
+ description: |-
+ sizeLimit is the total amount of local storage required for this EmptyDir volume.
+ The size limit is also applicable for memory medium.
+ The maximum usage on memory medium EmptyDir would be the minimum value between
+ the SizeLimit specified here and the sum of memory limits of all containers in a pod.
+ The default is nil which means that the limit is undefined.
+ More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
+ pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
+ x-kubernetes-int-or-string: true
+ type: object
configReloaderExtraArgs:
additionalProperties:
type: string
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 013172f72..a4e1aa003 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -27,6 +27,7 @@ aliases:
* FEATURE: [vlagent](https://docs.victoriametrics.com/operator/resources/vlagent): support logs collection. See [#1501](https://github.com/VictoriaMetrics/operator/issues/1501).
* FEATURE: [vmoperator](https://docs.victoriametrics.com/operator/): use `operator_bad_objects_total` metric with `object_namespace` and `crd` labels to track invalid objects managed by VMAgent, VMAuth, VMAlert and VMAlertmanager. Old `operator_alertmanager_bad_objects_count` and `operator_vmalert_bad_objects_count` are deprecated and will be removed in next releases.
* FEATURE: [vmoperator](https://docs.victoriametrics.com/operator/): added HPA support for all cluster CR storage. See [#1678](https://github.com/VictoriaMetrics/operator/issues/1678).
+* FEATURE: [vmoperator](https://docs.victoriametrics.com/operator/): added VM_CONFIG_RELOADER_EMPTY_DIR global variable and `spec.configReloaderEmptyDir` parameter that allows to set emptyDir volume section for configurations volume. See [#1711](https://github.com/VictoriaMetrics/operator/issues/1711).
* BUGFIX: [vmoperator](https://docs.victoriametrics.com/operator/): fixed HPA cleanup logic for all cluster resources, before it was constantly recreated. Bug introduced in [this commit](https://github.com/VictoriaMetrics/operator/commit/983d1678c37497a7d03d2f57821219fd4975deec).
* BUGFIX: [VMCluster](https://docs.victoriametrics.com/operator/resources/vmcluster/), [VLCluster](https://docs.victoriametrics.com/operator/resources/vlcluster/) and [VTCluster](https://docs.victoriametrics.com/operator/resources/vtcluster/): prevent cluster load balancer secret from infinite reconcile.
diff --git a/docs/api.md b/docs/api.md
index c8ab466da..e9a72ed6e 100644
--- a/docs/api.md
+++ b/docs/api.md
@@ -671,7 +671,6 @@ Appears in: [VMAnomalyMonitoringSpec](#vmanomalymonitoringspec)
VMAnomalyMonitoringPushSpec defines metrics push configuration
-
VMAnomaly uses prometheus text exposition format
Appears in: [VMAnomalyMonitoringSpec](#vmanomalymonitoringspec)
@@ -1474,6 +1473,7 @@ Appears in: [VMAgentSpec](#vmagentspec), [VMAlertSpec](#vmalertspec), [VMAlertma
| Field | Description |
| --- | --- |
| configReloadAuthKeySecret#
_[SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#secretkeyselector-v1-core)_ | _(Optional)_
ConfigReloadAuthKeySecret defines optional secret reference authKey for /-/reload API requests.
Given secret reference will be added to the application and vm-config-reloader as volume
available since v0.57.0 version |
+| configReloaderEmptyDir#
_[EmptyDirVolumeSource](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#emptydirvolumesource-v1-core)_ | _(Optional)_
ConfigReloaderEmptyDir sets emptyDir for reloader ephemeral volume, that is shared with main container |
| configReloaderExtraArgs
_object (keys:string, values:string)_ | _(Optional)_
ConfigReloaderExtraArgs that will be passed to VMAuths config-reloader container
for example resyncInterval: "30s" |
| configReloaderImage#
_string_ | _(Optional)_
ConfigReloaderImage defines image:tag for config-reloader container |
| configReloaderImageTag#
_string_ | _(Optional)_
ConfigReloaderImageTag defines image:tag for config-reloader container
Deprecated: use configReloaderImage instead |
@@ -1609,6 +1609,7 @@ Appears in: [VMAlertmanagerSpec](#vmalertmanagerspec)
| Field | Description |
| --- | --- |
| key#
_string_ | _(Required)_
The ConfigMap key to refer to. |
+| name#
_string_ | _(Optional)_
Name of the referent.
This field is effectively required, but due to backwards compatibility is
allowed to be empty. Instances of this type with an empty value here are
almost certainly wrong.
More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names |
#### ConsulSDConfig
@@ -1817,7 +1818,6 @@ Appears in: [VLInsert](#vlinsert), [VLSelect](#vlselect), [VLStorage](#vlstorage
EmbeddedHTTPRoute describes httproute configuration options.
-
Requires gateway-controller CRD installed and VM_GATEWAY_API_ENABLED=true env var
See https://gateway-api.sigs.k8s.io/guides/#installing-a-gateway-controller
@@ -1899,7 +1899,7 @@ Appears in: [VLAgentSpec](#vlagentspec), [VLInsert](#vlinsert), [VLSelect](#vlse
| maxUnavailable#
_[IntOrString](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#intorstring-intstr-util)_ | _(Optional)_
An eviction is allowed if at most "maxUnavailable" pods selected by
"selector" are unavailable after the eviction, i.e. even in absence of
the evicted pod. For example, one can prevent all voluntary evictions
by specifying 0. This is a mutually exclusive setting with "minAvailable". |
| minAvailable#
_[IntOrString](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#intorstring-intstr-util)_ | _(Optional)_
An eviction is allowed if at least "minAvailable" pods selected by
"selector" will still be available after the eviction, i.e. even in the
absence of the evicted pod. So for example you can prevent all voluntary
evictions by specifying "100%". |
| selectorLabels#
_object (keys:string, values:string)_ | _(Optional)_
replaces default labels selector generated by operator
it's useful when you need to create custom budget |
-| unhealthyPodEvictionPolicy#
_string_ | _(Optional)_
UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods
Valid policies are IfHealthyBudget and AlwaysAllow.
If no policy is specified, the default behavior will be used,
which corresponds to the IfHealthyBudget policy.
Available from operator v0.64.0 |
+| unhealthyPodEvictionPolicy#
_string_ | _(Optional)_
UnhealthyPodEvictionPolicy defines the criteria for when unhealthy pods
Valid policies are IfHealthyBudget and AlwaysAllow.
If no policy is specified, the default behavior will be used,
which corresponds to the IfHealthyBudget policy.
Available from operator v0.64.0 |
#### EmbeddedProbes
@@ -2051,7 +2051,6 @@ The private IP address is used by default, but may be changed to
the public IP address with relabeling.
See [here](https://docs.victoriametrics.com/victoriametrics/sd_configs/#gce_sd_configs)
-
The GCE service discovery will load the Google Cloud credentials
from the file specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable.
See https://cloud.google.com/kubernetes-engine/docs/tutorials/authenticating-to-cloud-platform
@@ -2838,7 +2837,7 @@ Appears in: [CommonScrapeParams](#commonscrapeparams), [VMAgentSpec](#vmagentspe
| basicAuth#
_[BasicAuth](#basicauth)_ | _(Optional)_
BasicAuth allow an endpoint to authenticate over basic authentication |
| bearerTokenFile#
_string_ | _(Optional)_
File to read bearer token for scraping targets. |
| bearerTokenSecret#
_[SecretKeySelector](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.30/#secretkeyselector-v1-core)_ | _(Optional)_
Secret to mount to read bearer token for scraping targets. The secret
needs to be in the same namespace as the scrape object and accessible by
the victoria-metrics operator. |
-| default#
_boolean_ | _(Optional)_
default defines that the scrape applies to all scrape objects that
don't configure an explicit scrape class name.
Only one scrape class can be set as the default. |
+| default#
_boolean_ | _(Optional)_
default defines that the scrape applies to all scrape objects that
don't configure an explicit scrape class name.
Only one scrape class can be set as the default. |
| metricRelabelConfigs#
_[RelabelConfig](#relabelconfig) array_ | _(Optional)_
MetricRelabelConfigs to apply to samples after scrapping. |
| name#
_string_ | _(Required)_
name of the scrape class. |
| oauth2#
_[OAuth2](#oauth2)_ | _(Optional)_
OAuth2 defines auth configuration |
@@ -3114,9 +3113,9 @@ Appears in: [StreamAggrConfig](#streamaggrconfig)
| Field | Description |
| --- | --- |
-| by#
_string array_ | _(Optional)_
By is an optional list of labels for grouping input series.
See also Without.
If neither By nor Without are set, then the Outputs are calculated
individually per each input time series. |
+| by#
_string array_ | _(Optional)_
By is an optional list of labels for grouping input series.
See also Without.
If neither By nor Without are set, then the Outputs are calculated
individually per each input time series. |
| dedup_interval#
_string_ | _(Optional)_
DedupInterval is an optional interval for deduplication. |
-| drop_input_labels#
_string_ | _(Optional)_
DropInputLabels is an optional list with labels, which must be dropped before further processing of input samples.
Labels are dropped before de-duplication and aggregation. |
+| drop_input_labels#
_string_ | _(Optional)_
DropInputLabels is an optional list with labels, which must be dropped before further processing of input samples.
Labels are dropped before de-duplication and aggregation. |
| enable_windows#
_boolean_ | _(Optional)_
EnableWindows enables aggregating data in separate windows |
| flush_on_shutdown#
_boolean_ | _(Optional)_
FlushOnShutdown defines whether to flush the aggregation state on process termination
or config reload. Is `false` by default.
It is not recommended changing this setting, unless unfinished aggregations states
are preferred to missing data points. |
| ignoreFirstSampleInterval#
_string_ | _(Required)_
IgnoreFirstSampleInterval sets interval for total and prometheus_total during which first samples will be ignored |
@@ -3125,12 +3124,12 @@ Appears in: [StreamAggrConfig](#streamaggrconfig)
| input_relabel_configs#
_[RelabelConfig](#relabelconfig) array_ | _(Optional)_
InputRelabelConfigs is an optional relabeling rules, which are applied on the input
before aggregation. |
| interval#
_string_ | _(Required)_
Interval is the interval between aggregations. |
| keep_metric_names#
_boolean_ | _(Optional)_
KeepMetricNames instructs to leave metric names as is for the output time series without adding any suffix. |
-| match#
_[StringOrArray](#stringorarray)_ | _(Optional)_
Match is a label selector (or list of label selectors) for filtering time series for the given selector.
If the match isn't set, then all the input time series are processed. |
+| match#
_[StringOrArray](#stringorarray)_ | _(Optional)_
Match is a label selector (or list of label selectors) for filtering time series for the given selector.
If the match isn't set, then all the input time series are processed. |
| no_align_flush_to_interval#
_boolean_ | _(Optional)_
NoAlignFlushToInterval disables aligning of flushes to multiples of Interval.
By default flushes are aligned to Interval. |
| output_relabel_configs#
_[RelabelConfig](#relabelconfig) array_ | _(Optional)_
OutputRelabelConfigs is an optional relabeling rules, which are applied
on the aggregated output before being sent to remote storage. |
-| outputs#
_string array_ | _(Required)_
Outputs is a list of output aggregate functions to produce.
The following names are allowed:
- total - aggregates input counters
- increase - counts the increase over input counters
- count_series - counts the input series
- count_samples - counts the input samples
- sum_samples - sums the input samples
- last - the last biggest sample value
- min - the minimum sample value
- max - the maximum sample value
- avg - the average value across all the samples
- stddev - standard deviation across all the samples
- stdvar - standard variance across all the samples
- histogram_bucket - creates VictoriaMetrics histogram for input samples
- quantiles(phi1, ..., phiN) - quantiles' estimation for phi in the range [0..1]
The output time series will have the following names:
input_name:aggr__