Skip to content

Commit 1f13772

Browse files
config-reloader: added properties for config reloader emptyDir sizeLimit management
1 parent 15117ec commit 1f13772

File tree

11 files changed

+191
-84
lines changed

11 files changed

+191
-84
lines changed

api/operator/v1beta1/vmextra_types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,6 +1207,9 @@ type CommonConfigReloaderParams struct {
12071207
// available since v0.57.0 version
12081208
// +optional
12091209
ConfigReloadAuthKeySecret *corev1.SecretKeySelector `json:"configReloadAuthKeySecret,omitempty"`
1210+
// ConfigReloaderEmptyDir sets emptyDir for reloader emphemeral volume, that is shared with main container
1211+
// +optional
1212+
ConfigReloaderEmptyDir *corev1.EmptyDirVolumeSource `json:"configReloaderEmptyDir,omitempty"`
12101213
}
12111214

12121215
// CommonApplicationDeploymentParams defines common params

api/operator/v1beta1/zz_generated.deepcopy.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config/crd/overlay/crd.yaml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7928,6 +7928,31 @@ spec:
79287928
- key
79297929
type: object
79307930
x-kubernetes-map-type: atomic
7931+
configReloaderEmptyDir:
7932+
description: ConfigReloaderEmptyDir sets emptyDir for reloader emphemeral
7933+
volume, that is shared with main container
7934+
properties:
7935+
medium:
7936+
description: |-
7937+
medium represents what type of storage medium should back this directory.
7938+
The default is "" which means to use the node's default medium.
7939+
Must be an empty string (default) or Memory.
7940+
More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
7941+
type: string
7942+
sizeLimit:
7943+
anyOf:
7944+
- type: integer
7945+
- type: string
7946+
description: |-
7947+
sizeLimit is the total amount of local storage required for this EmptyDir volume.
7948+
The size limit is also applicable for memory medium.
7949+
The maximum usage on memory medium EmptyDir would be the minimum value between
7950+
the SizeLimit specified here and the sum of memory limits of all containers in a pod.
7951+
The default is nil which means that the limit is undefined.
7952+
More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
7953+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
7954+
x-kubernetes-int-or-string: true
7955+
type: object
79317956
configReloaderExtraArgs:
79327957
additionalProperties:
79337958
type: string
@@ -17686,6 +17711,31 @@ spec:
1768617711
- key
1768717712
type: object
1768817713
x-kubernetes-map-type: atomic
17714+
configReloaderEmptyDir:
17715+
description: ConfigReloaderEmptyDir sets emptyDir for reloader emphemeral
17716+
volume, that is shared with main container
17717+
properties:
17718+
medium:
17719+
description: |-
17720+
medium represents what type of storage medium should back this directory.
17721+
The default is "" which means to use the node's default medium.
17722+
Must be an empty string (default) or Memory.
17723+
More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
17724+
type: string
17725+
sizeLimit:
17726+
anyOf:
17727+
- type: integer
17728+
- type: string
17729+
description: |-
17730+
sizeLimit is the total amount of local storage required for this EmptyDir volume.
17731+
The size limit is also applicable for memory medium.
17732+
The maximum usage on memory medium EmptyDir would be the minimum value between
17733+
the SizeLimit specified here and the sum of memory limits of all containers in a pod.
17734+
The default is nil which means that the limit is undefined.
17735+
More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
17736+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
17737+
x-kubernetes-int-or-string: true
17738+
type: object
1768917739
configReloaderExtraArgs:
1769017740
additionalProperties:
1769117741
type: string
@@ -19756,6 +19806,31 @@ spec:
1975619806
- key
1975719807
type: object
1975819808
x-kubernetes-map-type: atomic
19809+
configReloaderEmptyDir:
19810+
description: ConfigReloaderEmptyDir sets emptyDir for reloader emphemeral
19811+
volume, that is shared with main container
19812+
properties:
19813+
medium:
19814+
description: |-
19815+
medium represents what type of storage medium should back this directory.
19816+
The default is "" which means to use the node's default medium.
19817+
Must be an empty string (default) or Memory.
19818+
More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
19819+
type: string
19820+
sizeLimit:
19821+
anyOf:
19822+
- type: integer
19823+
- type: string
19824+
description: |-
19825+
sizeLimit is the total amount of local storage required for this EmptyDir volume.
19826+
The size limit is also applicable for memory medium.
19827+
The maximum usage on memory medium EmptyDir would be the minimum value between
19828+
the SizeLimit specified here and the sum of memory limits of all containers in a pod.
19829+
The default is nil which means that the limit is undefined.
19830+
More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
19831+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
19832+
x-kubernetes-int-or-string: true
19833+
type: object
1975919834
configReloaderExtraArgs:
1976019835
additionalProperties:
1976119836
type: string
@@ -24509,6 +24584,31 @@ spec:
2450924584
- key
2451024585
type: object
2451124586
x-kubernetes-map-type: atomic
24587+
configReloaderEmptyDir:
24588+
description: ConfigReloaderEmptyDir sets emptyDir for reloader emphemeral
24589+
volume, that is shared with main container
24590+
properties:
24591+
medium:
24592+
description: |-
24593+
medium represents what type of storage medium should back this directory.
24594+
The default is "" which means to use the node's default medium.
24595+
Must be an empty string (default) or Memory.
24596+
More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
24597+
type: string
24598+
sizeLimit:
24599+
anyOf:
24600+
- type: integer
24601+
- type: string
24602+
description: |-
24603+
sizeLimit is the total amount of local storage required for this EmptyDir volume.
24604+
The size limit is also applicable for memory medium.
24605+
The maximum usage on memory medium EmptyDir would be the minimum value between
24606+
the SizeLimit specified here and the sum of memory limits of all containers in a pod.
24607+
The default is nil which means that the limit is undefined.
24608+
More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir
24609+
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
24610+
x-kubernetes-int-or-string: true
24611+
type: object
2451224612
configReloaderExtraArgs:
2451324613
additionalProperties:
2451424614
type: string

docs/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ aliases:
2727
* FEATURE: [vlagent](https://docs.victoriametrics.com/operator/resources/vlagent): support logs collection. See [#1501](https://github.com/VictoriaMetrics/operator/issues/1501).
2828
* 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.
2929
* FEATURE: [vmoperator](https://docs.victoriametrics.com/operator/): added HPA support for all cluster CR storage. See [#1678](https://github.com/VictoriaMetrics/operator/issues/1678).
30+
* FEATURE: [vmoperator](https://docs.victoriametrics.com/operator/): added VM_CONFIG_RELOADER_EMPTY_DIR_SIZE_LIMIT global variable and `spec.configReloaderEmptyDirSizeLimit` parameter that allows to set sizeLimit for emptyDir volume that is created for configurations that are watched by config-reloader. See [#1711](https://github.com/VictoriaMetrics/operator/issues/1711).
3031

3132
* 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).
3233
* 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.

0 commit comments

Comments
 (0)