mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-27 18:18:41 +00:00
Upd: victoria-metrics operator to v0.55.0 (#792)
Signed-off-by: Andrei Kvapil <kvapss@gmail.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Upgraded operator and chart versions with additional configuration options for enhanced metrics scraping, security, and resource management. - Introduced new settings to fine-tune monitoring endpoints and resource definitions. - **Documentation** - Updated release notes and metadata for clearer change tracking. - Streamlined user documentation by removing legacy files. - **Improvements** - Enhanced error handling and validation logic for smoother deployments. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -3,4 +3,4 @@ dependencies:
|
||||
repository: ""
|
||||
version: 0.0.0
|
||||
digest: sha256:aeada3fbffa2565a325406ad014001fd2685f7c0c9cfc1167da4f10c75a1bd65
|
||||
generated: "2024-10-03T10:30:07.403949316Z"
|
||||
generated: "2025-03-15T22:08:36.140314181Z"
|
||||
|
||||
@@ -10,7 +10,7 @@ annotations:
|
||||
- name: QuentinBisson
|
||||
email: quentin.bisson@gmail.com
|
||||
apiVersion: v2
|
||||
appVersion: v0.77.1
|
||||
appVersion: v0.81.0
|
||||
dependencies:
|
||||
- name: crds
|
||||
repository: ""
|
||||
@@ -25,14 +25,18 @@ kubeVersion: '>=1.16.0-0'
|
||||
maintainers:
|
||||
- email: dacamposol@gmail.com
|
||||
name: dacamposol
|
||||
url: https://github.com/dacamposol
|
||||
- email: cedric@desaintmartin.fr
|
||||
name: desaintmartin
|
||||
url: https://github.com/desaintmartin
|
||||
- email: quentin.bisson@gmail.com
|
||||
name: QuentinBisson
|
||||
url: https://github.com/QuentinBisson
|
||||
- email: github@jkroepke.de
|
||||
name: jkroepke
|
||||
name: Jan-Otto Kröpke
|
||||
url: https://github.com/jkroepke
|
||||
name: prometheus-operator-crds
|
||||
sources:
|
||||
- https://github.com/prometheus-community/helm-charts
|
||||
type: application
|
||||
version: 15.0.0
|
||||
version: 19.0.0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.77.1/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
|
||||
# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.81.0/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
@@ -7,8 +7,8 @@ metadata:
|
||||
{{- with .Values.annotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
controller-gen.kubebuilder.io/version: v0.16.1
|
||||
operator.prometheus.io/version: 0.77.1
|
||||
controller-gen.kubebuilder.io/version: v0.17.2
|
||||
operator.prometheus.io/version: 0.81.0
|
||||
name: podmonitors.monitoring.coreos.com
|
||||
spec:
|
||||
group: monitoring.coreos.com
|
||||
@@ -81,6 +81,18 @@ spec:
|
||||
It requires Prometheus >= v2.28.0.
|
||||
pattern: (^0|([0-9]*[.])?[0-9]+((K|M|G|T|E|P)i?)?B)$
|
||||
type: string
|
||||
fallbackScrapeProtocol:
|
||||
description: |-
|
||||
The protocol to use if a scrape returns blank, unparseable, or otherwise invalid Content-Type.
|
||||
|
||||
It requires Prometheus >= v3.0.0.
|
||||
enum:
|
||||
- PrometheusProto
|
||||
- OpenMetricsText0.0.1
|
||||
- OpenMetricsText1.0.0
|
||||
- PrometheusText0.0.4
|
||||
- PrometheusText1.0.0
|
||||
type: string
|
||||
jobLabel:
|
||||
description: |-
|
||||
The label to use to retrieve the job name from.
|
||||
@@ -139,6 +151,23 @@ spec:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
nativeHistogramBucketLimit:
|
||||
description: |-
|
||||
If there are more than this many buckets in a native histogram,
|
||||
buckets will be merged to stay within the limit.
|
||||
It requires Prometheus >= v2.45.0.
|
||||
format: int64
|
||||
type: integer
|
||||
nativeHistogramMinBucketFactor:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: |-
|
||||
If the growth factor of one bucket to the next is smaller than this,
|
||||
buckets will be merged to increase the factor sufficiently.
|
||||
It requires Prometheus >= v2.50.0.
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
podMetricsEndpoints:
|
||||
description: Defines how to scrape metrics from the selected pods.
|
||||
items:
|
||||
@@ -746,10 +775,16 @@ spec:
|
||||
type: string
|
||||
port:
|
||||
description: |-
|
||||
Name of the Pod port which this endpoint refers to.
|
||||
The `Pod` port name which exposes the endpoint.
|
||||
|
||||
It takes precedence over `targetPort`.
|
||||
It takes precedence over the `portNumber` and `targetPort` fields.
|
||||
type: string
|
||||
portNumber:
|
||||
description: The `Pod` port number which exposes the endpoint.
|
||||
format: int32
|
||||
maximum: 65535
|
||||
minimum: 1
|
||||
type: integer
|
||||
proxyUrl:
|
||||
description: |-
|
||||
`proxyURL` configures the HTTP Proxy URL (e.g.
|
||||
@@ -868,6 +903,7 @@ spec:
|
||||
|
||||
If empty, Prometheus uses the global scrape timeout unless it is less
|
||||
than the target's scrape interval value in which the latter is used.
|
||||
The value cannot be greater than the scrape interval otherwise the operator will reject the resource.
|
||||
pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
|
||||
type: string
|
||||
targetPort:
|
||||
@@ -878,7 +914,7 @@ spec:
|
||||
Name or number of the target port of the `Pod` object behind the Service, the
|
||||
port must be specified with container port property.
|
||||
|
||||
Deprecated: use 'port' instead.
|
||||
Deprecated: use 'port' or 'portNumber' instead.
|
||||
x-kubernetes-int-or-string: true
|
||||
tlsConfig:
|
||||
description: TLS configuration to use when scraping the target.
|
||||
@@ -1069,6 +1105,11 @@ spec:
|
||||
description: The scrape class to apply.
|
||||
minLength: 1
|
||||
type: string
|
||||
scrapeClassicHistograms:
|
||||
description: |-
|
||||
Whether to scrape a classic histogram that is also exposed as a native histogram.
|
||||
It requires Prometheus >= v2.45.0.
|
||||
type: boolean
|
||||
scrapeProtocols:
|
||||
description: |-
|
||||
`scrapeProtocols` defines the protocols to negotiate during a scrape. It tells clients the
|
||||
@@ -1085,11 +1126,13 @@ spec:
|
||||
* `OpenMetricsText1.0.0`
|
||||
* `PrometheusProto`
|
||||
* `PrometheusText0.0.4`
|
||||
* `PrometheusText1.0.0`
|
||||
enum:
|
||||
- PrometheusProto
|
||||
- OpenMetricsText0.0.1
|
||||
- OpenMetricsText1.0.0
|
||||
- PrometheusText0.0.4
|
||||
- PrometheusText1.0.0
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: set
|
||||
@@ -1140,6 +1183,18 @@ spec:
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
selectorMechanism:
|
||||
description: |-
|
||||
Mechanism used to select the endpoints to scrape.
|
||||
By default, the selection process relies on relabel configurations to filter the discovered targets.
|
||||
Alternatively, you can opt in for role selectors, which may offer better efficiency in large clusters.
|
||||
Which strategy is best for your use case needs to be carefully evaluated.
|
||||
|
||||
It requires Prometheus >= v2.17.0.
|
||||
enum:
|
||||
- RelabelConfig
|
||||
- RoleSelector
|
||||
type: string
|
||||
targetLimit:
|
||||
description: |-
|
||||
`targetLimit` defines a limit on the number of scraped targets that will
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.77.1/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml
|
||||
# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.81.0/example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
@@ -7,8 +7,8 @@ metadata:
|
||||
{{- with .Values.annotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
controller-gen.kubebuilder.io/version: v0.16.1
|
||||
operator.prometheus.io/version: 0.77.1
|
||||
controller-gen.kubebuilder.io/version: v0.17.2
|
||||
operator.prometheus.io/version: 0.81.0
|
||||
name: probes.monitoring.coreos.com
|
||||
spec:
|
||||
group: monitoring.coreos.com
|
||||
@@ -177,6 +177,18 @@ spec:
|
||||
- key
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
fallbackScrapeProtocol:
|
||||
description: |-
|
||||
The protocol to use if a scrape returns blank, unparseable, or otherwise invalid Content-Type.
|
||||
|
||||
It requires Prometheus >= v3.0.0.
|
||||
enum:
|
||||
- PrometheusProto
|
||||
- OpenMetricsText0.0.1
|
||||
- OpenMetricsText1.0.0
|
||||
- PrometheusText0.0.4
|
||||
- PrometheusText1.0.0
|
||||
type: string
|
||||
interval:
|
||||
description: |-
|
||||
Interval at which targets are probed using the configured prober.
|
||||
@@ -304,6 +316,23 @@ spec:
|
||||
Example module configuring in the blackbox exporter:
|
||||
https://github.com/prometheus/blackbox_exporter/blob/master/example.yml
|
||||
type: string
|
||||
nativeHistogramBucketLimit:
|
||||
description: |-
|
||||
If there are more than this many buckets in a native histogram,
|
||||
buckets will be merged to stay within the limit.
|
||||
It requires Prometheus >= v2.45.0.
|
||||
format: int64
|
||||
type: integer
|
||||
nativeHistogramMinBucketFactor:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: |-
|
||||
If the growth factor of one bucket to the next is smaller than this,
|
||||
buckets will be merged to increase the factor sufficiently.
|
||||
It requires Prometheus >= v2.50.0.
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
oauth2:
|
||||
description: OAuth2 for the URL. Only valid in Prometheus versions
|
||||
2.27.0 and newer.
|
||||
@@ -664,6 +693,11 @@ spec:
|
||||
description: The scrape class to apply.
|
||||
minLength: 1
|
||||
type: string
|
||||
scrapeClassicHistograms:
|
||||
description: |-
|
||||
Whether to scrape a classic histogram that is also exposed as a native histogram.
|
||||
It requires Prometheus >= v2.45.0.
|
||||
type: boolean
|
||||
scrapeProtocols:
|
||||
description: |-
|
||||
`scrapeProtocols` defines the protocols to negotiate during a scrape. It tells clients the
|
||||
@@ -680,11 +714,13 @@ spec:
|
||||
* `OpenMetricsText1.0.0`
|
||||
* `PrometheusProto`
|
||||
* `PrometheusText0.0.4`
|
||||
* `PrometheusText1.0.0`
|
||||
enum:
|
||||
- PrometheusProto
|
||||
- OpenMetricsText0.0.1
|
||||
- OpenMetricsText1.0.0
|
||||
- PrometheusText0.0.4
|
||||
- PrometheusText1.0.0
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: set
|
||||
@@ -692,6 +728,7 @@ spec:
|
||||
description: |-
|
||||
Timeout for scraping metrics from the Prometheus exporter.
|
||||
If not specified, the Prometheus global scrape timeout is used.
|
||||
The value cannot be greater than the scrape interval otherwise the operator will reject the resource.
|
||||
pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
|
||||
type: string
|
||||
targetLimit:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.77.1/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
|
||||
# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.81.0/example/prometheus-operator-crd/monitoring.coreos.com_prometheusrules.yaml
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
@@ -7,8 +7,8 @@ metadata:
|
||||
{{- with .Values.annotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
controller-gen.kubebuilder.io/version: v0.16.1
|
||||
operator.prometheus.io/version: 0.77.1
|
||||
controller-gen.kubebuilder.io/version: v0.17.2
|
||||
operator.prometheus.io/version: 0.81.0
|
||||
name: prometheusrules.monitoring.coreos.com
|
||||
spec:
|
||||
group: monitoring.coreos.com
|
||||
@@ -62,6 +62,16 @@ spec:
|
||||
are evaluated.
|
||||
pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
|
||||
type: string
|
||||
labels:
|
||||
additionalProperties:
|
||||
type: string
|
||||
description: |-
|
||||
Labels to add or overwrite before storing the result for its rules.
|
||||
The labels defined at the rule level take precedence.
|
||||
|
||||
It requires Prometheus >= 3.0.0.
|
||||
The field is ignored for Thanos Ruler.
|
||||
type: object
|
||||
limit:
|
||||
description: |-
|
||||
Limit the number of alerts an alerting rule and series a recording
|
||||
@@ -79,6 +89,14 @@ spec:
|
||||
More info: https://github.com/thanos-io/thanos/blob/main/docs/components/rule.md#partial-response
|
||||
pattern: ^(?i)(abort|warn)?$
|
||||
type: string
|
||||
query_offset:
|
||||
description: |-
|
||||
Defines the offset the rule evaluation timestamp of this particular group by the specified duration into the past.
|
||||
|
||||
It requires Prometheus >= v2.53.0.
|
||||
It is not supported for ThanosRuler.
|
||||
pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
|
||||
type: string
|
||||
rules:
|
||||
description: List of alerting and recording rules.
|
||||
items:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.77.1/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
|
||||
# https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.81.0/example/prometheus-operator-crd/monitoring.coreos.com_servicemonitors.yaml
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
@@ -7,8 +7,8 @@ metadata:
|
||||
{{- with .Values.annotations }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
controller-gen.kubebuilder.io/version: v0.16.1
|
||||
operator.prometheus.io/version: 0.77.1
|
||||
controller-gen.kubebuilder.io/version: v0.17.2
|
||||
operator.prometheus.io/version: 0.81.0
|
||||
name: servicemonitors.monitoring.coreos.com
|
||||
spec:
|
||||
group: monitoring.coreos.com
|
||||
@@ -820,6 +820,7 @@ spec:
|
||||
|
||||
If empty, Prometheus uses the global scrape timeout unless it is less
|
||||
than the target's scrape interval value in which the latter is used.
|
||||
The value cannot be greater than the scrape interval otherwise the operator will reject the resource.
|
||||
pattern: ^(0|(([0-9]+)y)?(([0-9]+)w)?(([0-9]+)d)?(([0-9]+)h)?(([0-9]+)m)?(([0-9]+)s)?(([0-9]+)ms)?)$
|
||||
type: string
|
||||
targetPort:
|
||||
@@ -1014,6 +1015,18 @@ spec:
|
||||
type: boolean
|
||||
type: object
|
||||
type: array
|
||||
fallbackScrapeProtocol:
|
||||
description: |-
|
||||
The protocol to use if a scrape returns blank, unparseable, or otherwise invalid Content-Type.
|
||||
|
||||
It requires Prometheus >= v3.0.0.
|
||||
enum:
|
||||
- PrometheusProto
|
||||
- OpenMetricsText0.0.1
|
||||
- OpenMetricsText1.0.0
|
||||
- PrometheusText0.0.4
|
||||
- PrometheusText1.0.0
|
||||
type: string
|
||||
jobLabel:
|
||||
description: |-
|
||||
`jobLabel` selects the label from the associated Kubernetes `Service`
|
||||
@@ -1072,6 +1085,23 @@ spec:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
nativeHistogramBucketLimit:
|
||||
description: |-
|
||||
If there are more than this many buckets in a native histogram,
|
||||
buckets will be merged to stay within the limit.
|
||||
It requires Prometheus >= v2.45.0.
|
||||
format: int64
|
||||
type: integer
|
||||
nativeHistogramMinBucketFactor:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
description: |-
|
||||
If the growth factor of one bucket to the next is smaller than this,
|
||||
buckets will be merged to increase the factor sufficiently.
|
||||
It requires Prometheus >= v2.50.0.
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
podTargetLabels:
|
||||
description: |-
|
||||
`podTargetLabels` defines the labels which are transferred from the
|
||||
@@ -1089,6 +1119,11 @@ spec:
|
||||
description: The scrape class to apply.
|
||||
minLength: 1
|
||||
type: string
|
||||
scrapeClassicHistograms:
|
||||
description: |-
|
||||
Whether to scrape a classic histogram that is also exposed as a native histogram.
|
||||
It requires Prometheus >= v2.45.0.
|
||||
type: boolean
|
||||
scrapeProtocols:
|
||||
description: |-
|
||||
`scrapeProtocols` defines the protocols to negotiate during a scrape. It tells clients the
|
||||
@@ -1105,11 +1140,13 @@ spec:
|
||||
* `OpenMetricsText1.0.0`
|
||||
* `PrometheusProto`
|
||||
* `PrometheusText0.0.4`
|
||||
* `PrometheusText1.0.0`
|
||||
enum:
|
||||
- PrometheusProto
|
||||
- OpenMetricsText0.0.1
|
||||
- OpenMetricsText1.0.0
|
||||
- PrometheusText0.0.4
|
||||
- PrometheusText1.0.0
|
||||
type: string
|
||||
type: array
|
||||
x-kubernetes-list-type: set
|
||||
@@ -1160,6 +1197,18 @@ spec:
|
||||
type: object
|
||||
type: object
|
||||
x-kubernetes-map-type: atomic
|
||||
selectorMechanism:
|
||||
description: |-
|
||||
Mechanism used to select the endpoints to scrape.
|
||||
By default, the selection process relies on relabel configurations to filter the discovered targets.
|
||||
Alternatively, you can opt in for role selectors, which may offer better efficiency in large clusters.
|
||||
Which strategy is best for your use case needs to be carefully evaluated.
|
||||
|
||||
It requires Prometheus >= v2.17.0.
|
||||
enum:
|
||||
- RelabelConfig
|
||||
- RoleSelector
|
||||
type: string
|
||||
targetLabels:
|
||||
description: |-
|
||||
`targetLabels` defines the labels which are transferred from the
|
||||
|
||||
@@ -20,3 +20,5 @@
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
*.md
|
||||
*.md.gotmpl
|
||||
|
||||
@@ -1,612 +0,0 @@
|
||||
## Next release
|
||||
|
||||
- TODO
|
||||
|
||||
## 0.36.0
|
||||
|
||||
**Release date:** 2024-10-22
|
||||
|
||||

|
||||

|
||||
|
||||
- replaced `crd.enabled` property to `crds.plain`. Instead of disabling CRDs it selects if CRDs should be rendered from template or as plain CRDs
|
||||
|
||||
## 0.35.5
|
||||
|
||||
**Release date:** 2024-10-15
|
||||
|
||||

|
||||

|
||||
|
||||
- updates operator to [v0.48.4](https://github.com/VictoriaMetrics/operator/releases/tag/v0.48.4) version
|
||||
|
||||
## 0.35.4
|
||||
|
||||
**Release date:** 2024-10-11
|
||||
|
||||

|
||||

|
||||
|
||||
- Human-readable error about Helm version requirement
|
||||
|
||||
## 0.35.3
|
||||
|
||||
**Release date:** 2024-10-10
|
||||
|
||||

|
||||

|
||||
|
||||
- upgraded common chart dependency
|
||||
- made webhook pod port configurable. See [this issue](https://github.com/VictoriaMetrics/helm-charts/issues/1565)
|
||||
- added configurable cleanup hook resources. See [this issue](https://github.com/VictoriaMetrics/helm-charts/issues/1571)
|
||||
- added ability to configure `terminationGracePeriodSeconds` and `lifecycle`. See [this issue](https://github.com/VictoriaMetrics/helm-charts/issues/1563) for details
|
||||
|
||||
## 0.35.2
|
||||
|
||||
**Release date:** 2024-09-29
|
||||
|
||||

|
||||

|
||||
|
||||
- updates operator to [v0.48.3](https://github.com/VictoriaMetrics/operator/releases/tag/v0.48.3) version
|
||||
|
||||
## 0.35.1
|
||||
|
||||
**Release date:** 2024-09-26
|
||||
|
||||

|
||||

|
||||
|
||||
- updates operator to [v0.48.1](https://github.com/VictoriaMetrics/operator/releases/tag/v0.48.1) version
|
||||
|
||||
## 0.35.0
|
||||
|
||||
**Release date:** 2024-09-26
|
||||
|
||||

|
||||

|
||||
|
||||
- Made webhook port configurable. See [this issue](https://github.com/VictoriaMetrics/helm-charts/issues/1506)
|
||||
- Changed crd cleanup hook delete policy to prevent `resource already exists` error.
|
||||
- updates operator to [v0.48.0](https://github.com/VictoriaMetrics/operator/releases/tag/v0.48.0) version
|
||||
|
||||
## 0.34.8
|
||||
|
||||
**Release date:** 2024-09-10
|
||||
|
||||

|
||||

|
||||
|
||||
- Added ability to override deployment namespace using `namespaceOverride` and `global.namespaceOverride` variables
|
||||
- Fixed template for cert-manager certificates
|
||||
- Fixed operator Role creation when only watching own namespace using `watchNamespaces`
|
||||
- Changed webhook service port from 443 to 9443
|
||||
|
||||
## 0.34.7
|
||||
|
||||
**Release date:** 2024-09-03
|
||||
|
||||

|
||||

|
||||
|
||||
- Do not create ClusterRole if `watchNamespaces` contains only namespace, where operator is deployed
|
||||
|
||||
## 0.34.6
|
||||
|
||||
**Release date:** 2024-08-29
|
||||
|
||||

|
||||

|
||||
|
||||
- updates operator to [v0.47.3](https://github.com/VictoriaMetrics/operator/releases/tag/v0.47.3) version
|
||||
- Made `cleanupCRD` deprecated in a favour of `crd.cleanup.enabled`
|
||||
- Made `cleanupImage` deprecated in a favour of `crd.cleanup.image`
|
||||
- Made `watchNamespace` string deprecated in a favour of `watchNamespaces` slice
|
||||
- Decreased rendering time by 2 seconds
|
||||
|
||||
## 0.34.5
|
||||
|
||||
**Release date:** 2024-08-26
|
||||
|
||||

|
||||

|
||||
|
||||
- fixes typo at clean webhook. vmlogs->vlogs.
|
||||
|
||||
## 0.34.4
|
||||
|
||||
**Release date:** 2024-08-26
|
||||
|
||||

|
||||

|
||||
|
||||
- fixes RBAC by rollback <https://github.com/VictoriaMetrics/helm-charts/commit/7d75b93525bb0a99a8011b700d0a51b6b762321c>
|
||||
|
||||
## 0.34.3
|
||||
|
||||
**Release date:** 2024-08-26
|
||||
|
||||

|
||||

|
||||
|
||||
- removes not implemented scrape CRDs from validation webhook
|
||||
|
||||
## 0.34.2
|
||||
|
||||
**Release date:** 2024-08-26
|
||||
|
||||

|
||||

|
||||
|
||||
- set `admissionWebhooks.keepTLSSecret` to `true` by default
|
||||
- fixed indent, for Issuer crd, when `cert-manager.enabled: true`
|
||||
- updates operator to [v0.47.2](https://github.com/VictoriaMetrics/operator/releases/tag/v0.47.2) version
|
||||
|
||||
## 0.34.1
|
||||
|
||||
**Release date:** 2024-08-23
|
||||
|
||||

|
||||

|
||||
|
||||
**Update note**: main container name was changed to `operator`, which will recreate a pod.
|
||||
|
||||
- Updated operator to v0.47.1 release
|
||||
- Added global imagePullSecrets and image.registry
|
||||
- Use static container names in a pod
|
||||
- Updated operator service scrape config
|
||||
- Added `.Values.vmstorage.service.ipFamilies` and `.Values.vmstorage.service.ipFamilyPolicy` for service IP family management
|
||||
- Enabled webhook by default
|
||||
- Generate webhook certificate when Cert Manager is not enabled
|
||||
- Added ability to configure container port
|
||||
- Fixed image pull secrets. See [this issue](https://github.com/VictoriaMetrics/helm-charts/issues/1285)
|
||||
|
||||
## 0.34.0
|
||||
|
||||
**Release date:** 2024-08-15
|
||||
|
||||

|
||||

|
||||
|
||||
- Set minimal kubernetes version to 1.25
|
||||
- Removed support for policy/v1beta1/PodDisruptionBudget
|
||||
- Added configurable probes at `.Values.probe`
|
||||
- updates operator to [v0.47.0](https://github.com/VictoriaMetrics/operator/releases/tag/v0.47.0) release
|
||||
- adds RBAC permissions to VLogs object
|
||||
|
||||
## 0.33.6
|
||||
|
||||
**Release date:** 2024-08-07
|
||||
|
||||

|
||||

|
||||
|
||||
- add missing permission to allow patching `horizontalpodautoscalers` when operator watches single namespace.
|
||||
|
||||
## 0.33.5
|
||||
|
||||
**Release date:** 2024-08-01
|
||||
|
||||

|
||||

|
||||
|
||||
- fix cleanup job image tag when `.Capabilities.KubeVersion.Minor` returns version with plus sign. See [this pull request](https://github.com/VictoriaMetrics/helm-charts/pull/1169) by @dimaslv.
|
||||
|
||||
## 0.33.4
|
||||
|
||||
**Release date:** 2024-07-10
|
||||
|
||||

|
||||

|
||||
|
||||
- updates operator to [v0.46.4](https://github.com/VictoriaMetrics/operator/releases/tag/v0.46.4) release
|
||||
|
||||
## 0.33.3
|
||||
|
||||
**Release date:** 2024-07-05
|
||||
|
||||

|
||||

|
||||
|
||||
- updates operator to [v0.46.3](https://github.com/VictoriaMetrics/operator/releases/tag/v0.46.3) release
|
||||
|
||||
## 0.33.2
|
||||
|
||||
**Release date:** 2024-07-04
|
||||
|
||||

|
||||

|
||||
|
||||
- breaking change: operator uses different entrypoint, remove `command` entrypoint
|
||||
- breaking change: operator uses new flag for leader election `leader-elect`
|
||||
- removes podsecurity policy. It's longer supported by kubernetes
|
||||
- updates operator to [v0.46.2](https://github.com/VictoriaMetrics/operator/releases/tag/v0.46.2) release
|
||||
|
||||
## 0.33.1
|
||||
|
||||
**Release date:** 2024-07-03
|
||||
|
||||

|
||||

|
||||
|
||||
- breaking change: operator uses different entrypoint, remove `command` entrypoint
|
||||
- breaking change: operator uses new flag for leader election `leader-elect`
|
||||
- removes podsecurity policy. It's longer supported by kubernetes
|
||||
- updates operator to [v0.46.0](https://github.com/VictoriaMetrics/operator/releases/tag/v0.46.0) release
|
||||
|
||||
## 0.32.3
|
||||
|
||||
**Release date:** 2024-07-02
|
||||
|
||||

|
||||

|
||||
|
||||
- use bitnami/kubectl image for cleanup instead of deprecated gcr.io/google_containers/hyperkube
|
||||
|
||||
## 0.32.2
|
||||
|
||||
**Release date:** 2024-06-14
|
||||
|
||||

|
||||

|
||||
|
||||
- fix default image tag when using `Chart.AppVersion`, previously the version is missing "v".
|
||||
|
||||
## 0.32.1
|
||||
|
||||
**Release date:** 2024-06-14
|
||||
|
||||

|
||||

|
||||
|
||||
**Update note**: The VictoriaMetrics components image tag template has been updated. This change introduces `.Values.<component>.image.variant` to specify tag suffixes like `-scratch`, `-cluster`, `-enterprise`. Additionally, you can now omit `.Values.<component>.image.tag` to automatically use the version specified in `.Chart.AppVersion`.
|
||||
|
||||
- support specifying image tag suffix like "-enterprise" for VictoriaMetrics components using `.Values.<component>.image.variant`.
|
||||
|
||||
## 0.32.0
|
||||
|
||||
**Release date:** 2024-06-10
|
||||
|
||||

|
||||

|
||||
|
||||
- updates operator to [v0.45.0](https://github.com/VictoriaMetrics/operator/releases/tag/v0.45.0)
|
||||
|
||||
## 0.31.2
|
||||
|
||||
**Release date:** 2024-05-14
|
||||
|
||||

|
||||

|
||||
|
||||
- fix missing serviceaccounts patch permission in ClusterRole, see [this issue](https://github.com/VictoriaMetrics/helm-charts/issues/1012) for details.
|
||||
|
||||
## 0.31.1
|
||||
|
||||
**Release date:** 2024-05-10
|
||||
|
||||

|
||||

|
||||
|
||||
- fix serviceAccount template when `.Values.serviceAccount.create=false`, see this [pull request](https://github.com/VictoriaMetrics/helm-charts/pull/1002) by @tylerturk for details.
|
||||
- support creating aggregated clusterRoles for VM CRDs with admin and read permissions, see this [pull request](https://github.com/VictoriaMetrics/helm-charts/pull/996) by @reegnz for details.
|
||||
|
||||
## 0.31.0
|
||||
|
||||
**Release date:** 2024-05-09
|
||||
|
||||

|
||||

|
||||
|
||||
- updates operator to [v0.44.0](https://github.com/VictoriaMetrics/operator/releases/tag/v0.44.0)
|
||||
|
||||
## 0.30.3
|
||||
|
||||
**Release date:** 2024-04-26
|
||||
|
||||

|
||||

|
||||
|
||||
- updates operator to [v0.43.5](https://github.com/VictoriaMetrics/operator/releases/tag/v0.43.5)
|
||||
|
||||
## 0.30.2
|
||||
|
||||
**Release date:** 2024-04-23
|
||||
|
||||

|
||||

|
||||
|
||||
- updates operator to v0.43.1 version
|
||||
- fixes typo at single-namespace role for `vmscrapeconfig`. See this [issue](https://github.com/VictoriaMetrics/helm-charts/issues/987) for details.
|
||||
|
||||
## 0.30.1
|
||||
|
||||
**Release date:** 2024-04-18
|
||||
|
||||

|
||||

|
||||
|
||||
- TODO
|
||||
|
||||
- updates operator to v0.43.1 version
|
||||
|
||||
## 0.30.0
|
||||
|
||||
**Release date:** 2024-04-18
|
||||
|
||||

|
||||

|
||||
|
||||
- updates operator to v0.43.0-0 version
|
||||
- adds `events` create permission
|
||||
- properly truncate value of `app.kubernetes.io/managed-by` and `app.kubernetes.io/instance` labels in case release name exceeds 63 characters.
|
||||
|
||||
## 0.29.6
|
||||
|
||||
**Release date:** 2024-04-16
|
||||
|
||||

|
||||

|
||||
|
||||
- clean up vmauth as well when uninstall chart with `cleanupCRD: true`, since it also has `finalizers`.
|
||||
- sync new crd VMScrapeConfig from operator, see detail in <https://docs.victoriametrics.com/operator/api/#vmscrapeconfig>.
|
||||
|
||||
## 0.29.5
|
||||
|
||||
**Release date:** 2024-04-02
|
||||
|
||||

|
||||

|
||||
|
||||
- bump version of VM operator to [0.42.4](https://github.com/VictoriaMetrics/operator/releases/tag/v0.42.4)
|
||||
|
||||
## 0.29.4
|
||||
|
||||
**Release date:** 2024-03-28
|
||||
|
||||

|
||||

|
||||
|
||||
- added ability to use slice variables in extraArgs (#944)
|
||||
|
||||
## 0.29.3
|
||||
|
||||
**Release date:** 2024-03-12
|
||||
|
||||

|
||||

|
||||
|
||||
- TODO
|
||||
|
||||
## 0.29.2
|
||||
|
||||
**Release date:** 2024-03-06
|
||||
|
||||

|
||||

|
||||
|
||||
- bump version of VM operator to [0.42.2](https://github.com/VictoriaMetrics/operator/releases/tag/v0.42.2)
|
||||
|
||||
## 0.29.0
|
||||
|
||||
**Release date:** 2024-03-06
|
||||
|
||||

|
||||

|
||||
|
||||
- bump version of VM operator to [0.42.1](https://github.com/VictoriaMetrics/operator/releases/tag/v0.42.1)
|
||||
|
||||
## 0.29.0
|
||||
|
||||
**Release date:** 2024-03-04
|
||||
|
||||

|
||||

|
||||
|
||||
- bump version of VM operator to [0.42.0](https://github.com/VictoriaMetrics/operator/releases/tag/v0.42.0)
|
||||
|
||||
## 0.28.1
|
||||
|
||||
**Release date:** 2024-02-21
|
||||
|
||||

|
||||

|
||||
|
||||
- bump version of VM operator to [0.41.2](https://github.com/VictoriaMetrics/operator/releases/tag/v0.41.2)
|
||||
|
||||
## 0.28.0
|
||||
|
||||
**Release date:** 2024-02-09
|
||||
|
||||

|
||||

|
||||
|
||||
- Update victoriametrics CRD resources yaml.
|
||||
|
||||
## 0.27.11
|
||||
|
||||
**Release date:** 2024-02-01
|
||||
|
||||

|
||||

|
||||
|
||||
- bump version of VM operator to [0.41.1](https://github.com/VictoriaMetrics/operator/releases/tag/v0.41.1)
|
||||
|
||||
## 0.27.10
|
||||
|
||||
**Release date:** 2024-01-24
|
||||
|
||||

|
||||

|
||||
|
||||
- Bump operator version to [0.40.0](https://github.com/VictoriaMetrics/operator/releases/tag/v0.40.0)
|
||||
|
||||
## 0.27.9
|
||||
|
||||
**Release date:** 2023-12-12
|
||||
|
||||

|
||||

|
||||
|
||||
- bump version of VM operator to [0.39.4](https://github.com/VictoriaMetrics/operator/releases/tag/v0.39.4)
|
||||
|
||||
## 0.27.8
|
||||
|
||||
**Release date:** 2023-12-08
|
||||
|
||||

|
||||

|
||||
|
||||
- Sync CRD resources with operator [v0.39.3](https://github.com/VictoriaMetrics/operator/releases/tag/v0.39.3).
|
||||
|
||||
## 0.27.7
|
||||
|
||||
**Release date:** 2023-12-08
|
||||
|
||||

|
||||

|
||||
|
||||
- Skip deleting victoriametrics CRD resources when uninstall release.
|
||||
|
||||
## 0.27.6
|
||||
|
||||
**Release date:** 2023-11-16
|
||||
|
||||

|
||||

|
||||
|
||||
- bump version of VM operator to [0.39.3](https://github.com/VictoriaMetrics/operator/releases/tag/v0.39.3)
|
||||
|
||||
## 0.27.5
|
||||
|
||||
**Release date:** 2023-11-15
|
||||
|
||||

|
||||

|
||||
|
||||
- bump version of VM operator to [0.39.2](https://github.com/VictoriaMetrics/operator/releases/tag/v0.39.2)
|
||||
- Add `extraObjects` to allow deploying additional resources with the chart release. (#751)
|
||||
|
||||
## 0.27.4
|
||||
|
||||
**Release date:** 2023-11-01
|
||||
|
||||

|
||||

|
||||
|
||||
- bump version of VM operator to [0.39.1](https://github.com/VictoriaMetrics/operator/releases/tag/v0.39.1)
|
||||
|
||||
## 0.27.3
|
||||
|
||||
**Release date:** 2023-10-08
|
||||
|
||||

|
||||

|
||||
|
||||
- Added endpointslices permissions to operator roles (#708)
|
||||
|
||||
## 0.27.2
|
||||
|
||||
**Release date:** 2023-10-04
|
||||
|
||||

|
||||

|
||||
|
||||
- bump version of VM operator to [0.39.0](https://github.com/VictoriaMetrics/operator/releases/tag/v0.39.0)
|
||||
|
||||
## 0.27.1
|
||||
|
||||
**Release date:** 2023-09-28
|
||||
|
||||

|
||||

|
||||
|
||||
- Fix `relabelConfigs` for operator's VMServiceScrape (#624)
|
||||
|
||||
## 0.27.0
|
||||
|
||||
**Release date:** 2023-09-11
|
||||
|
||||

|
||||

|
||||
|
||||
- Bump version of operator to [v0.38.0](https://github.com/VictoriaMetrics/operator/releases/tag/v0.38.0)
|
||||
|
||||
## 0.26.2
|
||||
|
||||
**Release date:** 2023-09-07
|
||||
|
||||

|
||||

|
||||
|
||||
- Updated CRDs for operator
|
||||
|
||||
## 0.26.1
|
||||
|
||||
**Release date:** 2023-09-04
|
||||
|
||||

|
||||

|
||||
|
||||
- Bump version of Victoria Metrics operator to `v0.37.1`
|
||||
|
||||
## 0.26.0
|
||||
|
||||
**Release date:** 2023-08-30
|
||||
|
||||

|
||||

|
||||
|
||||
- Bump operator version to [v0.37.0](https://github.com/VictoriaMetrics/operator/releases/tag/v0.37.0)
|
||||
- `psp_auto_creation_enabled` for operator is disabled by default
|
||||
|
||||
## 0.25.0
|
||||
|
||||
**Release date:** 2023-08-24
|
||||
|
||||

|
||||

|
||||
|
||||
- Added `topologySpreadConstraints` for the operator + a small refactoring (#611)
|
||||
- Fix vm operator appVersion (#589)
|
||||
- Fixes operator doc description
|
||||
- Add `cleanupCRD` option to clean up vm cr resources when uninstalling (#593)
|
||||
- Bump operator version to [v0.36.0](https://github.com/VictoriaMetrics/operator/releases/tag/v0.36.0)
|
||||
|
||||
## 0.24.1
|
||||
|
||||
**Release date:** 2023-07-13
|
||||
|
||||

|
||||

|
||||
|
||||
- operator release v0.35.1
|
||||
|
||||
## 0.24.0
|
||||
|
||||
**Release date:** 2023-07-03
|
||||
|
||||

|
||||

|
||||
|
||||
- updates operator for v0.35.0
|
||||
- updates for v1.91.1 release
|
||||
|
||||
## 0.23.1
|
||||
|
||||
**Release date:** 2023-05-29
|
||||
|
||||

|
||||

|
||||
|
||||
- updates operator for v0.34.1 version
|
||||
|
||||
## 0.23.0
|
||||
|
||||
**Release date:** 2023-05-25
|
||||
|
||||

|
||||

|
||||
|
||||
- bump operator version
|
||||
- feat(operator): add PodDisruptionBudget (#546)
|
||||
@@ -1,9 +1,9 @@
|
||||
dependencies:
|
||||
- name: victoria-metrics-common
|
||||
repository: https://victoriametrics.github.io/helm-charts
|
||||
version: 0.0.16
|
||||
version: 0.0.42
|
||||
- name: crds
|
||||
repository: ""
|
||||
version: 0.0.*
|
||||
digest: sha256:1dbeda933645106331943d21d8ba9fb76db1eca47446d47f98c916eadd1bbfbd
|
||||
generated: "2024-10-16T22:31:25.325936+03:00"
|
||||
digest: sha256:d186ad6f54d64a2f828cd80a136e06dcf1f30dbc8ae94964bb9b166ee32eb30e
|
||||
generated: "2025-03-19T09:59:22.84209872Z"
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
annotations:
|
||||
artifacthub.io/category: monitoring-logging
|
||||
artifacthub.io/changes: |
|
||||
- replaced `crd.enabled` property to `crds.plain`. Instead of disabling CRDs it selects if CRDs should be rendered from template or as plain CRDs
|
||||
- updates operator to [v0.55.0](https://github.com/VictoriaMetrics/operator/releases/tag/v0.55.0) version
|
||||
artifacthub.io/license: Apache-2.0
|
||||
artifacthub.io/links: |
|
||||
- name: Sources
|
||||
url: https://github.com/VictoriaMetrics/helm-charts
|
||||
url: https://github.com/VictoriaMetrics/helm-charts/tree/master/charts/victoria-metrics-operator
|
||||
- name: Charts repo
|
||||
url: https://victoriametrics.github.io/helm-charts/
|
||||
- name: Docs
|
||||
url: https://docs.victoriametrics.com/operator
|
||||
- name: Changelog
|
||||
url: https://docs.victoriametrics.com/operator/changelog
|
||||
artifacthub.io/operator: "true"
|
||||
apiVersion: v2
|
||||
appVersion: v0.48.4
|
||||
appVersion: v0.55.0
|
||||
dependencies:
|
||||
- name: victoria-metrics-common
|
||||
repository: https://victoriametrics.github.io/helm-charts
|
||||
@@ -40,4 +42,4 @@ sources:
|
||||
- https://github.com/VictoriaMetrics/helm-charts
|
||||
- https://github.com/VictoriaMetrics/operator
|
||||
type: application
|
||||
version: 0.36.0
|
||||
version: 0.44.0
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,98 +0,0 @@
|
||||
{{ template "chart.typeBadge" . }} {{ template "chart.versionBadge" . }}
|
||||
[](https://artifacthub.io/packages/helm/victoriametrics/victoria-metrics-operator)
|
||||
|
||||
{{ template "chart.description" . }}
|
||||
|
||||
## Prerequisites
|
||||
|
||||
* Install the follow packages: ``git``, ``kubectl``, ``helm``, ``helm-docs``. See this [tutorial](https://docs.victoriametrics.com/helm/requirements/).
|
||||
* PV support on underlying infrastructure.
|
||||
|
||||
## ArgoCD issues
|
||||
|
||||
When running operator using ArgoCD without Cert Manager (`.Values.admissionWebhooks.certManager.enabled: false`) it will rerender webhook certificates
|
||||
on each sync since Helm `lookup` function is not respected by ArgoCD. To prevent this please update you operator Application `spec.syncPolicy` and `spec.ignoreDifferences` with a following:
|
||||
|
||||
```yaml
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
...
|
||||
spec:
|
||||
...
|
||||
syncPolicy:
|
||||
syncOptions:
|
||||
# https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/#respect-ignore-difference-configs
|
||||
# argocd must also ignore difference during apply stage
|
||||
# otherwise it ll silently override changes and cause a problem
|
||||
- RespectIgnoreDifferences=true
|
||||
ignoreDifferences:
|
||||
- group: ""
|
||||
kind: Secret
|
||||
name: <fullname>-validation
|
||||
namespace: kube-system
|
||||
jsonPointers:
|
||||
- /data
|
||||
- group: admissionregistration.k8s.io
|
||||
kind: ValidatingWebhookConfiguration
|
||||
name: <fullname>-admission
|
||||
jqPathExpressions:
|
||||
- '.webhooks[]?.clientConfig.caBundle'
|
||||
```
|
||||
where `<fullname>` is output of `{{"{{"}} include "vm-operator.fullname" {{"}}"}}` for your setup
|
||||
|
||||
## Upgrade guide
|
||||
|
||||
During release an issue with helm CRD was discovered. So for upgrade from version less then 0.1.3 you have to two options:
|
||||
1) use helm management for CRD, enabled by default.
|
||||
2) use own management system, need to add variable: --set createCRD=false.
|
||||
|
||||
If you choose helm management, following steps must be done before upgrade:
|
||||
|
||||
1) define namespace and helm release name variables
|
||||
|
||||
```
|
||||
export NAMESPACE=default
|
||||
export RELEASE_NAME=operator
|
||||
```
|
||||
|
||||
execute kubectl commands:
|
||||
|
||||
```
|
||||
kubectl get crd | grep victoriametrics.com | awk '{print $1 }' | xargs -i kubectl label crd {} app.kubernetes.io/managed-by=Helm --overwrite
|
||||
kubectl get crd | grep victoriametrics.com | awk '{print $1 }' | xargs -i kubectl annotate crd {} meta.helm.sh/release-namespace="$NAMESPACE" meta.helm.sh/release-name="$RELEASE_NAME" --overwrite
|
||||
```
|
||||
|
||||
run helm upgrade command.
|
||||
|
||||
## Chart Details
|
||||
|
||||
This chart will do the following:
|
||||
|
||||
* Rollout victoria metrics operator
|
||||
|
||||
{{ include "chart.installSection" . }}
|
||||
|
||||
## Validation webhook
|
||||
|
||||
Its possible to use validation of created resources with operator. For now, you need cert-manager to easily certificate management https://cert-manager.io/docs/
|
||||
|
||||
```yaml
|
||||
admissionWebhooks:
|
||||
enabled: true
|
||||
# what to do in case, when operator not available to validate request.
|
||||
certManager:
|
||||
# enables cert creation and injection by cert-manager
|
||||
enabled: true
|
||||
```
|
||||
|
||||
{{ include "chart.uninstallSection" . }}
|
||||
|
||||
{{ include "chart.helmDocs" . }}
|
||||
|
||||
## Parameters
|
||||
|
||||
The following tables lists the configurable parameters of the chart and their default values.
|
||||
|
||||
Change the values according to the need of the environment in ``victoria-metrics-operator/values.yaml`` file.
|
||||
|
||||
{{ template "chart.valuesTableHtml" . }}
|
||||
@@ -0,0 +1,7 @@
|
||||
# Release notes for version 0.44.0
|
||||
|
||||
**Release date:** 02 Apr 2025
|
||||
|
||||
 
|
||||
|
||||
- updates operator to [v0.55.0](https://github.com/VictoriaMetrics/operator/releases/tag/v0.55.0) version
|
||||
@@ -1,8 +0,0 @@
|
||||
# Release notes for version 0.36.0
|
||||
|
||||
**Release date:** 2024-10-22
|
||||
|
||||

|
||||

|
||||
|
||||
- replaced `crd.enabled` property to `crds.plain`. Instead of disabling CRDs it selects if CRDs should be rendered from template or as plain CRDs
|
||||
@@ -1,13 +0,0 @@
|
||||
---
|
||||
weight: 1
|
||||
title: CHANGELOG
|
||||
menu:
|
||||
docs:
|
||||
weight: 1
|
||||
identifier: helm-victoriametrics-operator-changelog
|
||||
parent: helm-victoriametrics-operator
|
||||
url: /helm/victoriametrics-operator/changelog
|
||||
aliases:
|
||||
- /helm/victoriametrics-operator/changelog/index.html
|
||||
---
|
||||
{{% content "CHANGELOG.md" %}}
|
||||
@@ -1,13 +0,0 @@
|
||||
---
|
||||
weight: 10
|
||||
title: VictoriaMetrics Operator
|
||||
menu:
|
||||
docs:
|
||||
parent: helm
|
||||
weight: 10
|
||||
identifier: helm-victoriametrics-operator
|
||||
url: /helm/victoriametrics-operator
|
||||
aliases:
|
||||
- /helm/victoriametrics-operator/index.html
|
||||
---
|
||||
{{% content "README.md" %}}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -20,3 +20,5 @@
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
*.md
|
||||
*.md.gotmpl
|
||||
|
||||
@@ -1,159 +0,0 @@
|
||||
# CHANGELOG for `victoria-metrics-common` helm-chart
|
||||
|
||||
## Next release
|
||||
|
||||
- TODO
|
||||
|
||||
## 0.0.16
|
||||
|
||||
**Release date:** 2024-10-15
|
||||
|
||||

|
||||
|
||||
- Allow extract name prefix from app level fullnameOverride property
|
||||
|
||||
## 0.0.15
|
||||
|
||||
**Release date:** 2024-10-11
|
||||
|
||||

|
||||
|
||||
- Display compatibility error message
|
||||
|
||||
## 0.0.14
|
||||
|
||||
**Release date:** 2024-10-04
|
||||
|
||||

|
||||
|
||||
- Fixed openshift compatibility templates
|
||||
|
||||
## 0.0.13
|
||||
|
||||
**Release date:** 2024-09-16
|
||||
|
||||

|
||||
|
||||
- Do not use image variant if custom image tag is set in `vm.image` template
|
||||
- Support multiple license flag styles, which are different for vmanomaly and other services
|
||||
|
||||
## 0.0.12
|
||||
|
||||
**Release date:** 2024-09-16
|
||||
|
||||

|
||||
|
||||
- Add enterprise to existing variant if enterprise enabled
|
||||
- Added `vm.enterprise.disabled` template to check if enterprise license is disabled
|
||||
- Use `service.servicePort` as a port source if flag is not set in `vm.url`
|
||||
|
||||
## 0.0.11
|
||||
|
||||
**Release date:** 2024-09-11
|
||||
|
||||

|
||||
|
||||
- Added ability to pass extra prefix for `vm.managed.fullname`
|
||||
|
||||
## 0.0.10
|
||||
|
||||
**Release date:** 2024-09-10
|
||||
|
||||

|
||||
|
||||
- Fixed protocol extraction with TLS enabled
|
||||
- Typo fixes
|
||||
- use appkey as `app` label by default
|
||||
- support multiple service naming styles for `vm.service`
|
||||
|
||||
## 0.0.9
|
||||
|
||||
**Release date:** 2024-09-02
|
||||
|
||||

|
||||
|
||||
- Allow `appKey` argument to be a list to support deeply nested objects
|
||||
- Added `vm.namespace`, which returns `namespaceOverride` or `global.namespaceOverride` or `Release.Namespace` as a default
|
||||
- Added `vm.managed.fullname`, which returns default fullname prefixed by `appKey`
|
||||
- Added `vm.plain.fullname`, which returns default fullname suffixed by `appKey`
|
||||
|
||||
## 0.0.8
|
||||
|
||||
**Release date:** 2024-08-29
|
||||
|
||||

|
||||
|
||||
- Added `vm.service` for unified service name generation
|
||||
- Added `vm.url` to construct service base url
|
||||
- Added `vm.name` for chart name
|
||||
- Added `vm.fullname` which is actively used in resource name construction
|
||||
- Added `vm.chart` to construct chart name label value
|
||||
- Added `vm.labels` for common labels
|
||||
- Added `vm.sa` for service account name
|
||||
- Added `vm.release` for release name
|
||||
- Added `vm.selectorLabels` for common selector labels
|
||||
|
||||
## 0.0.7
|
||||
|
||||
**Release date:** 2024-08-27
|
||||
|
||||

|
||||
|
||||
- Support short and long args flags in `vm.args`
|
||||
- Updated `vm.enterprise.only` error message
|
||||
|
||||
## 0.0.6
|
||||
|
||||
**Release date:** 2024-08-27
|
||||
|
||||

|
||||
|
||||
- Changed structure of `vm.args` template output
|
||||
- Removed `eula` support
|
||||
|
||||
## 0.0.5
|
||||
|
||||
**Release date:** 2024-08-26
|
||||
|
||||

|
||||
|
||||
- Fixed `vm.enterprise.only` template to check if at least one of both global.licence.eula and .Values.license.eula are defined
|
||||
- Convert `vm.args` bool `true` values to flags without values
|
||||
|
||||
## 0.0.4
|
||||
|
||||
**Release date:** 2024-08-26
|
||||
|
||||

|
||||
|
||||
- Updated `vm.probe.*` templates to remove Helm 3.14 restriction.
|
||||
- Added `vm.args` template for cmd args generation
|
||||
|
||||
## 0.0.3
|
||||
|
||||
**Release date:** 2024-08-25
|
||||
|
||||

|
||||
|
||||
- Moved license templates from other charts `vm.license.volume`, `vm.license.mount`, `vm.license.flag`
|
||||
- Moved `vm.compatibility.renderSecurityContext` template
|
||||
- Fixed a case, when null is passed to a `.Values.global`. See [this issue](https://github.com/VictoriaMetrics/helm-charts/issues/1296)
|
||||
|
||||
## 0.0.2
|
||||
|
||||
**Release date:** 2024-08-23
|
||||
|
||||

|
||||
|
||||
- Added `vm.port.from.flag` template to extract port from cmd flag listen address.
|
||||
|
||||
## 0.0.1
|
||||
|
||||
**Release date:** 2024-08-15
|
||||
|
||||

|
||||
|
||||
- Added `vm.enterprise.only` template to fail rendering if required license arguments weren't set.
|
||||
- Added `vm.image` template that introduces common chart logic of how to build image name from application variables.
|
||||
- Added `vm.ingress.port` template to render properly tngress port configuration depending on args type.
|
||||
- Added `vm.probe.*` templates to render probes params consistently across all templates.
|
||||
@@ -1,3 +1,3 @@
|
||||
dependencies: []
|
||||
digest: sha256:643d5437104296e21d906ecb15b2c96ad278f20cfc4af53b12bb6069bd853726
|
||||
generated: "2024-10-15T17:49:14.591209997Z"
|
||||
generated: "2024-11-13T12:10:17.363248379Z"
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
annotations:
|
||||
artifacthub.io/category: monitoring-logging
|
||||
artifacthub.io/changes: |
|
||||
- Allow extract name prefix from app level fullnameOverride property
|
||||
- Support custom case for list empty argument.
|
||||
artifacthub.io/license: Apache-2.0
|
||||
artifacthub.io/links: |
|
||||
- name: Sources
|
||||
url: https://github.com/VictoriaMetrics/helm-charts
|
||||
url: https://github.com/VictoriaMetrics/helm-charts/tree/master/charts/victoria-metrics-common
|
||||
- name: Charts repo
|
||||
url: https://victoriametrics.github.io/helm-charts/
|
||||
apiVersion: v2
|
||||
@@ -25,4 +25,4 @@ name: victoria-metrics-common
|
||||
sources:
|
||||
- https://github.com/VictoriaMetrics/helm-charts
|
||||
type: library
|
||||
version: 0.0.16
|
||||
version: 0.0.42
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
# Release notes for version 0.0.42
|
||||
|
||||
**Release date:** 19 Mar 2025
|
||||
|
||||

|
||||
|
||||
- Support custom case for list empty argument.
|
||||
@@ -1,7 +0,0 @@
|
||||
# Release notes for version 0.0.16
|
||||
|
||||
**Release date:** 2024-10-15
|
||||
|
||||

|
||||
|
||||
- Allow extract name prefix from app level fullnameOverride property
|
||||
@@ -1,11 +1,23 @@
|
||||
{{- define "vm.license.secret.key" -}}
|
||||
{{- $Values := (.helm).Values | default .Values -}}
|
||||
{{- (($Values.license).secret).key | default ((($Values.global).license).secret).key | default "" -}}
|
||||
{{- $plain := (($Values.license).secret).key | default ((($Values.global).license).secret).key -}}
|
||||
{{- $managed := (($Values.license).keyRef).key | default ((($Values.global).license).keyRef).key }}
|
||||
{{- if $plain -}}
|
||||
{{- $plain -}}
|
||||
{{- else if $managed -}}
|
||||
{{- $managed -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "vm.license.secret.name" -}}
|
||||
{{- $Values := (.helm).Values | default .Values -}}
|
||||
{{- (($Values.license).secret).name | default ((($Values.global).license).secret).name | default "" -}}
|
||||
{{- $plain := (($Values.license).secret).name | default ((($Values.global).license).secret).name -}}
|
||||
{{- $managed := (($Values.license).keyRef).name | default ((($Values.global).license).keyRef).name -}}
|
||||
{{- if $plain -}}
|
||||
{{- $plain -}}
|
||||
{{- else if $managed -}}
|
||||
{{- $managed -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "vm.license.key" -}}
|
||||
@@ -17,7 +29,7 @@
|
||||
{{- $licenseKey := (include "vm.license.key" .) -}}
|
||||
{{- $licenseSecretKey := (include "vm.license.secret.key" .) -}}
|
||||
{{- $licenseSecretName := (include "vm.license.secret.name" .) -}}
|
||||
{{- and (empty $licenseKey) (and (empty $licenseSecretName) (empty $licenseSecretKey)) -}}
|
||||
{{- or .noEnterprise (and (empty $licenseKey) (and (empty $licenseSecretName) (empty $licenseSecretKey))) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "vm.enterprise.only" -}}
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
{{- define "vm.namespace" -}}
|
||||
{{- include "vm.validate.args" . -}}
|
||||
{{- $Release := (.helm).Release | default .Release -}}
|
||||
{{- $Values := (.helm).Values | default .Values -}}
|
||||
{{- $Capabilities := (.helm).Capabilities | default .Capabilities -}}
|
||||
{{- if semverCompare "<3.14.0" $Capabilities.HelmVersion.Version }}
|
||||
{{- fail "This chart requires helm version 3.14.0 or higher" }}
|
||||
{{- end }}
|
||||
{{- $Values.namespaceOverride | default ($Values.global).namespaceOverride | default $Release.Namespace -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "vm.validate.args" -}}
|
||||
{{- $Chart := (.helm).Chart | default .Chart -}}
|
||||
{{- $Capabilities := (.helm).Capabilities | default .Capabilities -}}
|
||||
{{- if semverCompare "<3.14.0" $Capabilities.HelmVersion.Version }}
|
||||
{{- fail "This chart requires helm version 3.14.0 or higher" }}
|
||||
{{- end }}
|
||||
{{- if empty $Chart -}}
|
||||
{{- fail "invalid template data" -}}
|
||||
{{- end -}}
|
||||
@@ -20,7 +21,12 @@
|
||||
{{- include "vm.validate.args" . -}}
|
||||
{{- $Chart := (.helm).Chart | default .Chart -}}
|
||||
{{- $Values := (.helm).Values | default .Values -}}
|
||||
{{- $Values.nameOverride | default ($Values.global).nameOverride | default $Chart.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- $nameOverride := $Values.nameOverride | default ($Values.global).nameOverride | default $Chart.Name -}}
|
||||
{{- if or ($Values.global).disableNameTruncation $Values.disableNameTruncation -}}
|
||||
{{- $nameOverride -}}
|
||||
{{- else -}}
|
||||
{{- $nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /*
|
||||
@@ -34,88 +40,127 @@ If release name contains chart name it will be used as a full name.
|
||||
{{- $Chart := (.helm).Chart | default .Chart -}}
|
||||
{{- $Release := (.helm).Release | default .Release -}}
|
||||
{{- $fullname := "" -}}
|
||||
{{- if .appKey -}}
|
||||
{{- $appKey := ternary (list .appKey) .appKey (kindIs "string" .appKey) -}}
|
||||
{{- $values := $Values -}}
|
||||
{{- $global := (index $Values.global $Chart.Name) | default dict -}}
|
||||
{{- range $ak := $appKey }}
|
||||
{{- if $values -}}
|
||||
{{- $values = (index $values $ak) | default dict -}}
|
||||
{{- end -}}
|
||||
{{- if $global -}}
|
||||
{{- $global = (index $global $ak) | default dict -}}
|
||||
{{- end -}}
|
||||
{{- if and (kindIs "map" $values) $values.name -}}
|
||||
{{- $fullname = $values.name -}}
|
||||
{{- else if and (kindIs "map" $values) $values.fullnameOverride -}}
|
||||
{{- $fullname = $values.fullnameOverride -}}
|
||||
{{- else if and (kindIs "map" $global) $global.name -}}
|
||||
{{- $fullname = $global.name -}}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
{{- if empty $fullname -}}
|
||||
{{- if $Values.fullnameOverride -}}
|
||||
{{- $fullname = $Values.fullnameOverride -}}
|
||||
{{- else if (dig $Chart.Name "fullnameOverride" "" ($Values.global)) -}}
|
||||
{{- $fullname = (dig $Chart.Name "fullnameOverride" "" ($Values.global)) -}}
|
||||
{{- else if ($Values.global).fullnameOverride -}}
|
||||
{{- $fullname = $Values.global.fullnameOverride -}}
|
||||
{{- if $Values.fullnameOverride -}}
|
||||
{{- $fullname = $Values.fullnameOverride -}}
|
||||
{{- else if ($Values.global).fullnameOverride -}}
|
||||
{{- $fullname = $Values.global.fullnameOverride -}}
|
||||
{{- else -}}
|
||||
{{- $name := default $Chart.Name $Values.nameOverride -}}
|
||||
{{- if contains $name $Release.Name -}}
|
||||
{{- $fullname = $Release.Name -}}
|
||||
{{- else -}}
|
||||
{{- $name := default $Chart.Name $Values.nameOverride -}}
|
||||
{{- if contains $name $Release.Name -}}
|
||||
{{- $fullname = $Release.Name -}}
|
||||
{{- else -}}
|
||||
{{- $fullname = (printf "%s-%s" $Release.Name $name) }}
|
||||
{{- end -}}
|
||||
{{- $fullname = (printf "%s-%s" $Release.Name $name) }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- with .prefix -}}
|
||||
{{- $fullname = printf "%s-%s" . $fullname -}}
|
||||
{{- $fullname = tpl $fullname . -}}
|
||||
{{- if or ($Values.global).disableNameTruncation $Values.disableNameTruncation -}}
|
||||
{{- $fullname -}}
|
||||
{{- else -}}
|
||||
{{- $fullname | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- with .suffix -}}
|
||||
{{- $fullname = printf "%s-%s" $fullname . -}}
|
||||
{{- end -}}
|
||||
{{- $fullname | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end }}
|
||||
|
||||
{{- define "vm.cr.fullname" -}}
|
||||
{{- $Values := (.helm).Values | default .Values -}}
|
||||
{{- $_ := set . "overrideKey" "name" -}}
|
||||
{{- $fullname := include "vm.internal.key" . -}}
|
||||
{{- $_ := unset . "overrideKey" -}}
|
||||
{{- if empty $fullname -}}
|
||||
{{- $fullname = include "vm.fullname" . -}}
|
||||
{{- end -}}
|
||||
{{- $fullname = tpl $fullname . -}}
|
||||
{{- if or ($Values.global).disableNameTruncation $Values.disableNameTruncation -}}
|
||||
{{- $fullname -}}
|
||||
{{- else -}}
|
||||
{{- $fullname | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "vm.managed.fullname" -}}
|
||||
{{- $prefix := .appKey -}}
|
||||
{{- $oldPrefix := .prefix -}}
|
||||
{{- if kindIs "slice" $prefix -}}
|
||||
{{- $prefix = last $prefix -}}
|
||||
{{- $Values := (.helm).Values | default .Values -}}
|
||||
{{- $_ := set . "overrideKey" "name" -}}
|
||||
{{- $fullname := include "vm.internal.key" . -}}
|
||||
{{- $_ := unset . "overrideKey" -}}
|
||||
{{- if empty $fullname -}}
|
||||
{{- $fullname = include "vm.fullname" . -}}
|
||||
{{- end -}}
|
||||
{{- if $prefix -}}
|
||||
{{- with $oldPrefix -}}
|
||||
{{- $prefix = printf "%s-%s" $prefix . -}}
|
||||
{{- end }}
|
||||
{{- $_ := set $ "prefix" $prefix -}}
|
||||
{{- with include "vm.internal.key.default" . -}}
|
||||
{{- $prefix := ternary . (printf "vm%s" .) (or (hasPrefix "vm" .) (hasPrefix "vl" .)) -}}
|
||||
{{- $fullname = printf "%s-%s" $prefix $fullname -}}
|
||||
{{- end -}}
|
||||
{{- $fullname = tpl $fullname . -}}
|
||||
{{- if or ($Values.global).disableNameTruncation $Values.disableNameTruncation -}}
|
||||
{{- $fullname -}}
|
||||
{{- else -}}
|
||||
{{- $fullname | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- include "vm.fullname" . -}}
|
||||
{{- $_ := set . "prefix" $oldPrefix -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "vm.plain.fullname" -}}
|
||||
{{- $suffix := .appKey -}}
|
||||
{{- $oldSuffix := .suffix -}}
|
||||
{{- if kindIs "slice" $suffix -}}
|
||||
{{- $suffix = last $suffix }}
|
||||
{{- end -}}
|
||||
{{- if $suffix -}}
|
||||
{{- with $oldSuffix -}}
|
||||
{{- $suffix = printf "%s-%s" $suffix . -}}
|
||||
{{- $Values := (.helm).Values | default .Values -}}
|
||||
{{- $_ := set . "overrideKey" "fullnameOverride" -}}
|
||||
{{- $fullname := include "vm.internal.key" . -}}
|
||||
{{- $_ := unset . "overrideKey" -}}
|
||||
{{- if empty $fullname -}}
|
||||
{{- $fullname = include "vm.fullname" . -}}
|
||||
{{- with include "vm.internal.key.default" . -}}
|
||||
{{- $fullname = printf "%s-%s" $fullname . -}}
|
||||
{{- end -}}
|
||||
{{- $_ := set . "suffix" $suffix -}}
|
||||
{{- end -}}
|
||||
{{- include "vm.fullname" . -}}
|
||||
{{- $_ := set . "suffix" $oldSuffix -}}
|
||||
{{- $fullname = tpl $fullname . -}}
|
||||
{{- if or ($Values.global).disableNameTruncation $Values.disableNameTruncation -}}
|
||||
{{- $fullname -}}
|
||||
{{- else -}}
|
||||
{{- $fullname | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "vm.internal.key" -}}
|
||||
{{- include "vm.validate.args" . -}}
|
||||
{{- $overrideKey := .overrideKey | default "fullnameOverride" -}}
|
||||
{{- $Values := (.helm).Values | default .Values -}}
|
||||
{{- $key := "" -}}
|
||||
{{- if .appKey -}}
|
||||
{{- $appKey := ternary (list .appKey) .appKey (kindIs "string" .appKey) -}}
|
||||
{{- $ctx := . -}}
|
||||
{{- $values := $Values -}}
|
||||
{{- range $ak := $appKey }}
|
||||
{{- $values = ternary (default dict) (index $values $ak | default dict) (empty $values) -}}
|
||||
{{- $ctx = ternary (default dict) (index $ctx $ak | default dict) (empty $ctx) -}}
|
||||
{{- if and (empty $values) (empty $ctx) -}}
|
||||
{{- fail (printf "No data for appKey %s" (join "->" $appKey)) -}}
|
||||
{{- end -}}
|
||||
{{- if and (kindIs "map" $values) (index $values $overrideKey) -}}
|
||||
{{- $key = index $values $overrideKey -}}
|
||||
{{- else if and (kindIs "map" $ctx) (index $ctx $overrideKey) -}}
|
||||
{{- $key = index $ctx $overrideKey -}}
|
||||
{{- end -}}
|
||||
{{- end }}
|
||||
{{- if and (empty $key) .fallback -}}
|
||||
{{- $key = include "vm.internal.key.default" . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $key -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "vm.internal.key.default" -}}
|
||||
{{- with .appKey -}}
|
||||
{{- $key := ternary (list .) . (kindIs "string" .) -}}
|
||||
{{- last (without $key "spec") -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Create chart name and version as used by the chart label. */ -}}
|
||||
{{- define "vm.chart" -}}
|
||||
{{- include "vm.validate.args" . -}}
|
||||
{{- $Values := (.helm).Values | default .Values -}}
|
||||
{{- $Chart := (.helm).Chart | default .Chart -}}
|
||||
{{- printf "%s-%s" $Chart.Name $Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- $chart := printf "%s-%s" $Chart.Name $Chart.Version | replace "+" "_" -}}
|
||||
{{- if or ($Values.global).disableNameTruncation $Values.disableNameTruncation -}}
|
||||
{{- $chart -}}
|
||||
{{- else -}}
|
||||
{{- $chart | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- /* Create the name of the service account to use */ -}}
|
||||
@@ -138,14 +183,22 @@ If release name contains chart name it will be used as a full name.
|
||||
{{- toYaml $labels -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "vm.podLabels" -}}
|
||||
{{- include "vm.validate.args" . -}}
|
||||
{{- $Release := (.helm).Release | default .Release -}}
|
||||
{{- $labels := fromYaml (include "vm.selectorLabels" .) -}}
|
||||
{{- $labels = mergeOverwrite $labels (.extraLabels | default dict) -}}
|
||||
{{- $_ := set $labels "app.kubernetes.io/managed-by" $Release.Service -}}
|
||||
{{- toYaml $labels -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Common labels */ -}}
|
||||
{{- define "vm.labels" -}}
|
||||
{{- include "vm.validate.args" . -}}
|
||||
{{- $Chart := (.helm).Chart | default .Chart -}}
|
||||
{{- $labels := fromYaml (include "vm.selectorLabels" .) -}}
|
||||
{{- $labels = mergeOverwrite $labels (fromYaml (include "vm.metaLabels" .)) -}}
|
||||
{{- with $Chart.AppVersion -}}
|
||||
{{- $_ := set $labels "app.kubernetes.io/version" ($Chart.AppVersion) -}}
|
||||
{{- with (include "vm.image.tag" .) }}
|
||||
{{- $_ := set $labels "app.kubernetes.io/version" (regexReplaceAll "(.*)(@sha.*)" . "${1}") -}}
|
||||
{{- end -}}
|
||||
{{- toYaml $labels -}}
|
||||
{{- end -}}
|
||||
@@ -154,28 +207,20 @@ If release name contains chart name it will be used as a full name.
|
||||
{{- include "vm.validate.args" . -}}
|
||||
{{- $Release := (.helm).Release | default .Release -}}
|
||||
{{- $Values := (.helm).Values | default .Values -}}
|
||||
{{- default $Release.Name $Values.argocdReleaseOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- $release := default $Release.Name $Values.argocdReleaseOverride -}}
|
||||
{{- if or ($Values.global).disableNameTruncation $Values.disableNameTruncation -}}
|
||||
{{- $release -}}
|
||||
{{- else -}}
|
||||
{{- $release | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "vm.app.name" -}}
|
||||
{{- if .appKey -}}
|
||||
{{- $Values := (.helm).Values | default .Values -}}
|
||||
{{- $Chart := (.helm).Chart | default .Chart -}}
|
||||
{{- $values := $Values -}}
|
||||
{{- $global := (index $Values.global $Chart.Name) | default dict -}}
|
||||
{{- $appKey := ternary (list .appKey) .appKey (kindIs "string" .appKey) -}}
|
||||
{{- $name := last $appKey }}
|
||||
{{- range $ak := $appKey }}
|
||||
{{- $values = (index $values $ak) | default dict -}}
|
||||
{{- $global = (index $global $ak) | default dict -}}
|
||||
{{- if $values.name -}}
|
||||
{{- $name = $values.name -}}
|
||||
{{- else if $global.name -}}
|
||||
{{- $name = $global.name -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $name -}}
|
||||
{{- end -}}
|
||||
{{- $_ := set . "overrideKey" "name" -}}
|
||||
{{- $_ := set . "fallback" true -}}
|
||||
{{- tpl (include "vm.internal.key" .) . -}}
|
||||
{{- $_ := unset . "overrideKey" -}}
|
||||
{{- $_ := unset . "fallback" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /* Selector labels */ -}}
|
||||
@@ -184,7 +229,11 @@ If release name contains chart name it will be used as a full name.
|
||||
{{- $_ := set $labels "app.kubernetes.io/name" (include "vm.name" .) -}}
|
||||
{{- $_ := set $labels "app.kubernetes.io/instance" (include "vm.release" .) -}}
|
||||
{{- with (include "vm.app.name" .) -}}
|
||||
{{- $_ := set $labels "app" . -}}
|
||||
{{- if eq $.style "managed" -}}
|
||||
{{- $_ := set $labels "app.kubernetes.io/component" (printf "%s-%s" (include "vm.name" $) .) -}}
|
||||
{{- else -}}
|
||||
{{- $_ := set $labels "app" . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- toYaml $labels -}}
|
||||
{{- end }}
|
||||
|
||||
@@ -2,12 +2,25 @@
|
||||
Victoria Metrics Image
|
||||
*/}}
|
||||
{{- define "vm.image" -}}
|
||||
{{- $image := (fromYaml (include "vm.internal.image" .)).image | default dict -}}
|
||||
{{- $tag := include "vm.image.tag" . -}}
|
||||
{{- if empty $image.repository -}}
|
||||
{{- fail "cannot create image without `.repository` defined" -}}
|
||||
{{- end -}}
|
||||
{{- $result := tpl (printf "%s:%s" $image.repository $tag) . -}}
|
||||
{{- with $image.registry | default "" -}}
|
||||
{{- $result = (printf "%s/%s" . $result) -}}
|
||||
{{- end -}}
|
||||
{{- $result -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "vm.image.tag" -}}
|
||||
{{- $Chart := (.helm).Chart | default .Chart -}}
|
||||
{{- $Values := (.helm).Values | default .Values -}}
|
||||
{{- $tag := .app.image.tag -}}
|
||||
{{- $image := (fromYaml (include "vm.internal.image" .)).image | default dict -}}
|
||||
{{- $tag := $image.tag -}}
|
||||
{{- if empty $tag }}
|
||||
{{- $tag = $Chart.AppVersion -}}
|
||||
{{- $variant := .app.image.variant }}
|
||||
{{- $variant := $image.variant }}
|
||||
{{- if eq (include "vm.enterprise.disabled" .) "false" -}}
|
||||
{{- if $variant }}
|
||||
{{- $variant = printf "enterprise-%s" $variant }}
|
||||
@@ -19,9 +32,30 @@ Victoria Metrics Image
|
||||
{{- $tag = (printf "%s-%s" $tag .) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $image := tpl (printf "%s:%s" .app.image.repository $tag) . -}}
|
||||
{{- with .app.image.registry | default (($Values.global).image).registry | default "" -}}
|
||||
{{- $image = (printf "%s/%s" . $image) -}}
|
||||
{{- end -}}
|
||||
{{- $image -}}
|
||||
{{- $tag -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "vm.internal.image" -}}
|
||||
{{- $Values := (.helm).Values | default .Values -}}
|
||||
{{- $values := $Values -}}
|
||||
{{- $ctx := . -}}
|
||||
{{- with .appKey -}}
|
||||
{{- $appKey := ternary (list .) . (kindIs "string" .) -}}
|
||||
{{- range $ak := $appKey -}}
|
||||
{{- $values = ternary (default dict) (index $values $ak | default dict) (empty $values) -}}
|
||||
{{- $ctx = ternary (default dict) (index $ctx $ak | default dict) (empty $ctx) -}}
|
||||
{{- if and (empty $values) (empty $ctx) -}}
|
||||
{{- fail (printf "No data for appKey %s" (join "->" $appKey)) -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $image := ternary $ctx.image $values.image (hasKey $ctx "image") -}}
|
||||
{{- if not $image.registry }}
|
||||
{{- if (($Values.global).image).registry -}}
|
||||
{{- $_ := set $image "registry" (($Values.global).image).registry -}}
|
||||
{{- else if hasKey $image "registry" -}}
|
||||
{{- $_ := unset $image "registry" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- toYaml (dict "image" $image) -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -24,16 +24,13 @@ Usage:
|
||||
{{- include "vm.securityContext" (dict "securityContext" .Values.containerSecurityContext "helm" .) -}}
|
||||
*/ -}}
|
||||
{{- define "vm.securityContext" -}}
|
||||
{{- $securityContext := .securityContext -}}
|
||||
{{- $securityContext := omit .securityContext "enabled" -}}
|
||||
{{- $Values := (.helm).Values | default .Values -}}
|
||||
{{- $adaptMode := (((($Values).global).compatibility).openshift).adaptSecurityContext | default "" -}}
|
||||
{{- if or (eq $adaptMode "force") (and (eq $adaptMode "auto") (include "vm.isOpenshift" .)) -}}
|
||||
{{- $securityContext = omit $securityContext "fsGroup" "runAsUser" "runAsGroup" -}}
|
||||
{{- if not $securityContext.seLinuxOptions -}}
|
||||
{{- $securityContext = omit $securityContext "seLinuxOptions" -}}
|
||||
{{- end -}}
|
||||
{{- $securityContext = omit $securityContext "fsGroup" "runAsUser" "runAsGroup" "seLinuxOptions" -}}
|
||||
{{- end -}}
|
||||
{{- omit $securityContext "enabled" | toYaml -}}
|
||||
{{- toYaml $securityContext -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /*
|
||||
@@ -75,7 +72,11 @@ HTTP GET probe path
|
||||
HTTP GET probe scheme
|
||||
*/ -}}
|
||||
{{- define "vm.probe.http.scheme" -}}
|
||||
{{- ternary "HTTPS" "HTTP" (.app.extraArgs.tls | default false) -}}
|
||||
{{- $isSecure := false -}}
|
||||
{{- with ((.app).extraArgs).tls -}}
|
||||
{{- $isSecure = eq (toString .) "true" -}}
|
||||
{{- end -}}
|
||||
{{- ternary "HTTPS" "HTTP" $isSecure -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- /*
|
||||
@@ -86,12 +87,12 @@ Net probe port
|
||||
{{- end -}}
|
||||
|
||||
{{- define "vm.arg" -}}
|
||||
{{- if empty .value }}
|
||||
{{- if and (empty .value) (kindIs "string" .value) (ne (toString .list) "true") }}
|
||||
{{- .key -}}
|
||||
{{- else if and (kindIs "bool" .value) .value -}}
|
||||
{{- else if eq (toString .value) "true" -}}
|
||||
-{{ ternary "" "-" (eq (len .key) 1) }}{{ .key }}
|
||||
{{- else -}}
|
||||
-{{ ternary "" "-" (eq (len .key) 1) }}{{ .key }}={{ .value }}
|
||||
-{{ ternary "" "-" (eq (len .key) 1) }}{{ .key }}={{ ternary (toJson .value | squote) .value (has (kindOf .value) (list "map" "slice")) }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -106,7 +107,7 @@ command line arguments
|
||||
{{- end -}}
|
||||
{{- if kindIs "slice" $value -}}
|
||||
{{- range $v := $value -}}
|
||||
{{- $args = append $args (include "vm.arg" (dict "key" $key "value" $v)) -}}
|
||||
{{- $args = append $args (include "vm.arg" (dict "key" $key "value" $v "list" true)) -}}
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- $args = append $args (include "vm.arg" (dict "key" $key "value" $value)) -}}
|
||||
|
||||
@@ -2,11 +2,13 @@
|
||||
{{- define "vm.service" -}}
|
||||
{{- include "vm.validate.args" . -}}
|
||||
{{- $Values := (.helm).Values | default .Values -}}
|
||||
{{- $nameTpl := "vm.fullname" }}
|
||||
{{- $nameTpl := "" -}}
|
||||
{{- if eq .style "managed" -}}
|
||||
{{- $nameTpl = "vm.managed.fullname" }}
|
||||
{{- else if eq .style "plain" -}}
|
||||
{{- $nameTpl = "vm.plain.fullname" }}
|
||||
{{- else -}}
|
||||
{{- fail ".style argument should be either `plain` or `managed`"}}
|
||||
{{- end -}}
|
||||
{{- include $nameTpl . -}}
|
||||
{{- end }}
|
||||
@@ -32,18 +34,26 @@
|
||||
{{- $Values := (.helm).Values | default .Values -}}
|
||||
{{- if .appKey -}}
|
||||
{{- $appKey := ternary (list .appKey) .appKey (kindIs "string" .appKey) -}}
|
||||
{{- $spec := $Values -}}
|
||||
{{- $values := $Values -}}
|
||||
{{- $ctx := . -}}
|
||||
{{- range $ak := $appKey -}}
|
||||
{{- if index $spec $ak -}}
|
||||
{{- $spec = (index $spec $ak) -}}
|
||||
{{- end -}}
|
||||
{{- if and (kindIs "map" $spec) (hasKey $spec "spec") -}}
|
||||
{{- $spec = $spec.spec -}}
|
||||
{{- end -}}
|
||||
{{- $values = ternary (default dict) (index $values $ak | default dict) (empty $values) -}}
|
||||
{{- $ctx = ternary (default dict) (index $ctx $ak | default dict) (empty $ctx) -}}
|
||||
{{- end -}}
|
||||
{{- $spec := default dict -}}
|
||||
{{- if $ctx -}}
|
||||
{{- $spec = $ctx -}}
|
||||
{{- else if $values -}}
|
||||
{{- $spec = $values -}}
|
||||
{{- end -}}
|
||||
{{- with ($spec.extraArgs).tls -}}
|
||||
{{- $isSecure = eq (toString .) "true" -}}
|
||||
{{- end -}}
|
||||
{{- $isSecure = (eq ($spec.extraArgs).tls "true") | default $isSecure -}}
|
||||
{{- $port = (ternary 443 80 $isSecure) -}}
|
||||
{{- $port = $spec.port | default ($spec.service).servicePort | default $port -}}
|
||||
{{- $port = $spec.port | default ($spec.service).servicePort | default ($spec.service).port | default $port -}}
|
||||
{{- if hasKey . "appIdx" -}}
|
||||
{{- $port = (include "vm.port.from.flag" (dict "flag" ($spec.extraArgs).httpListenAddr "default" $port)) -}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- $fqdn }}:{{ $port }}
|
||||
{{- end -}}
|
||||
@@ -56,18 +66,23 @@
|
||||
{{- $isSecure := ternary false true (empty .appSecure) -}}
|
||||
{{- if .appKey -}}
|
||||
{{- $appKey := ternary (list .appKey) .appKey (kindIs "string" .appKey) -}}
|
||||
{{- $spec := $Values -}}
|
||||
{{- $values := $Values -}}
|
||||
{{- $ctx := . -}}
|
||||
{{- range $ak := $appKey -}}
|
||||
{{- if index $spec $ak -}}
|
||||
{{- $spec = (index $spec $ak) -}}
|
||||
{{- end -}}
|
||||
{{- if and (kindIs "map" $spec) (hasKey $spec "spec") -}}
|
||||
{{- $spec = $spec.spec -}}
|
||||
{{- end -}}
|
||||
{{- $values = ternary (default dict) (index $values $ak | default dict) (empty $values) -}}
|
||||
{{- $ctx = ternary (default dict) (index $ctx $ak | default dict) (empty $ctx) -}}
|
||||
{{- end -}}
|
||||
{{- $spec := default dict -}}
|
||||
{{- if $values -}}
|
||||
{{- $spec = $values -}}
|
||||
{{- else if $ctx -}}
|
||||
{{- $spec = $ctx -}}
|
||||
{{- end -}}
|
||||
{{- with ($spec.extraArgs).tls -}}
|
||||
{{- $isSecure = eq (toString .) "true" -}}
|
||||
{{- end -}}
|
||||
{{- $isSecure = (eq ($spec.extraArgs).tls "true") | default $isSecure -}}
|
||||
{{- $proto = (ternary "https" "http" $isSecure) -}}
|
||||
{{- $path = dig "http.pathPrefix" $path ($spec.extraArgs | default dict) -}}
|
||||
{{- end -}}
|
||||
{{- printf "%s://%s%s" $proto $host $path -}}
|
||||
{{- printf "%s://%s%s" $proto $host (trimSuffix "/" $path) -}}
|
||||
{{- end -}}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
unitTest: false
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
||||
{{ $.Chart.Name }} has been installed. Check its status by running:
|
||||
{{ include "vm.name" . }} has been installed. Check its status by running:
|
||||
kubectl --namespace {{ include "vm.namespace" . }} get pods -l "app.kubernetes.io/instance={{ $.Release.Name }}"
|
||||
|
||||
Get more information on https://github.com/VictoriaMetrics/helm-charts/tree/master/charts/victoria-metrics-operator.
|
||||
|
||||
@@ -1,82 +1,9 @@
|
||||
{{/* vim: set filetype=mustache: */}}
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "vm-operator.name" -}}
|
||||
{{- $Chart :=(.helm).Chart | default .Chart -}}
|
||||
{{- $Values :=(.helm).Values | default .Values -}}
|
||||
{{- default $Chart.Name $Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "vm-operator.cleanup.annotations" -}}
|
||||
"helm.sh/hook": pre-delete
|
||||
"helm.sh/hook-weight": "{{ .hookWeight }}"
|
||||
"helm.sh/hook-delete-policy": before-hook-creation
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "vm-operator.fullname" -}}
|
||||
{{- $Values :=(.helm).Values | default .Values -}}
|
||||
{{- $Release :=(.helm).Release | default .Release -}}
|
||||
{{- $Chart := (.helm).Chart | default .Chart -}}
|
||||
{{- if $Values.fullnameOverride -}}
|
||||
{{- $Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- $name := default $Chart.Name $Values.nameOverride -}}
|
||||
{{- if contains $name $Release.Name -}}
|
||||
{{- $Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- else -}}
|
||||
{{- printf "%s-%s" $Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "vm-operator.chart" -}}
|
||||
{{- $Chart := (.helm).Chart | default .Chart -}}
|
||||
{{- printf "%s-%s" $Chart.Name $Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account
|
||||
*/}}
|
||||
{{- define "vm-operator.serviceAccountName" -}}
|
||||
{{- $Values := (.helm).Values | default .Values }}
|
||||
{{- if $Values.serviceAccount.create -}}
|
||||
{{ default (include "vm-operator.fullname" .) $Values.serviceAccount.name }}
|
||||
{{- else -}}
|
||||
{{ default "default" $Values.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "vm-operator.selectorLabels" -}}
|
||||
{{- $Release := (.helm).Release | default .Release -}}
|
||||
app.kubernetes.io/name: {{ include "vm-operator.name" . }}
|
||||
app.kubernetes.io/instance: {{ $Release.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- with .extraLabels }}
|
||||
{{ toYaml . }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create unified labels for vm-operator components
|
||||
*/}}
|
||||
{{- define "vm-operator.labels" -}}
|
||||
{{- include "vm-operator.selectorLabels" . }}
|
||||
{{- $Release := (.helm).Release | default .Release }}
|
||||
helm.sh/chart: {{ include "vm-operator.chart" . }}
|
||||
app.kubernetes.io/managed-by: {{ $Release.Service | trunc 63 | trimSuffix "-" }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create unified annotations for vm-operator components
|
||||
*/}}
|
||||
@@ -87,13 +14,6 @@ meta.helm.sh/release-namespace: {{ include "vm.namespace" . }}
|
||||
meta.helm.sh/release-name: {{ $Release.Name }}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of service account and clusterRole for cleanup-hook
|
||||
*/}}
|
||||
{{- define "vm-operator.cleanupHookName" -}}
|
||||
{{- include "vm-operator.fullname" . }}-cleanup-hook
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Generate certificates for webhook
|
||||
*/}}
|
||||
@@ -102,8 +22,8 @@ Generate certificates for webhook
|
||||
{{- $Release := (.helm).Release | default .Release }}
|
||||
{{- $webhook := $Values.admissionWebhooks -}}
|
||||
{{- $tls := $webhook.tls -}}
|
||||
{{- $serviceName := (include "vm-operator.fullname" .) -}}
|
||||
{{- $secretName := (printf "%s-validation" $serviceName) -}}
|
||||
{{- $fullname := (include "vm.plain.fullname" .) -}}
|
||||
{{- $secretName := (printf "%s-validation" $fullname) -}}
|
||||
{{- $secret := lookup "v1" "Secret" (include "vm.namespace" .) $secretName -}}
|
||||
{{- if (and $tls.caCert $tls.cert $tls.key) -}}
|
||||
caCert: {{ $tls.caCert | b64enc }}
|
||||
@@ -115,12 +35,12 @@ clientCert: {{ index $secret.data "tls.crt" }}
|
||||
clientKey: {{ index $secret.data "tls.key" }}
|
||||
{{- else -}}
|
||||
{{- $altNames := default list -}}
|
||||
{{- $namePrefix := (printf "%s.%s" $serviceName (include "vm.namespace" .)) -}}
|
||||
{{- $namePrefix := (printf "%s.%s" $fullname (include "vm.namespace" .)) -}}
|
||||
{{- $altNames = append $altNames $namePrefix -}}
|
||||
{{- $altNames = append $altNames (printf "%s.svc" $namePrefix) -}}
|
||||
{{- $altNames = append $altNames (printf "%s.svc.%s" $namePrefix $Values.global.cluster.dnsDomain) -}}
|
||||
{{- $ca := genCA "vm-operator-ca" 3650 -}}
|
||||
{{- $cert := genSignedCert $serviceName nil $altNames 3650 $ca -}}
|
||||
{{- $cert := genSignedCert $fullname nil $altNames 3650 $ca -}}
|
||||
caCert: {{ $ca.Cert | b64enc }}
|
||||
clientCert: {{ $cert.Cert | b64enc }}
|
||||
clientKey: {{ $cert.Key | b64enc }}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{- if .Values.crds.cleanup.enabled }}
|
||||
{{- if and .Values.crds.enabled .Values.crds.cleanup.enabled }}
|
||||
{{- $app := .Values.crds.cleanup }}
|
||||
{{- if empty ($app.image).tag }}
|
||||
{{- $tag := (printf "%s.%s" .Capabilities.KubeVersion.Major .Capabilities.KubeVersion.Minor) | replace "+" "" -}}
|
||||
@@ -6,27 +6,31 @@
|
||||
{{- else if not (kindIs "string" ($app.image).tag) }}
|
||||
{{- fail "`crd.cleanup.image.tag` is not string, most probably you need to enquote provided value" -}}
|
||||
{{- end }}
|
||||
{{- $ctx := dict "helm" . "noEnterprise" true }}
|
||||
{{- $fullname := include "vm.plain.fullname" $ctx }}
|
||||
{{- $ns := include "vm.namespace" $ctx }}
|
||||
---
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ include "vm-operator.fullname" . }}-cleanup-hook
|
||||
namespace: {{ include "vm.namespace" . }}
|
||||
labels: {{ include "vm-operator.labels" . | nindent 4 }}
|
||||
name: {{ $fullname }}-cleanup-hook
|
||||
namespace: {{ $ns }}
|
||||
labels: {{ include "vm.labels" $ctx | nindent 4 }}
|
||||
annotations: {{ include "vm-operator.cleanup.annotations" (dict "hookWeight" "-3") | nindent 4 }}
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
name: {{ .Release.Name }}
|
||||
labels: {{ include "vm-operator.labels" . | nindent 8 }}
|
||||
name: {{ $fullname }}
|
||||
labels: {{ include "vm.labels" $ctx | nindent 8 }}
|
||||
spec:
|
||||
serviceAccountName: {{ include "vm-operator.fullname" . }}-cleanup-hook
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
serviceAccountName: {{ $fullname }}-cleanup-hook
|
||||
{{- with (.Values.imagePullSecrets | default .Values.global.imagePullSecrets) }}
|
||||
imagePullSecrets: {{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: kubectl
|
||||
image: {{ include "vm.image" (dict "helm" . "app" $app) }}
|
||||
{{- $_ := set $ctx "appKey" (list "crds" "cleanup") }}
|
||||
image: {{ include "vm.image" $ctx }}
|
||||
imagePullPolicy: {{ $app.image.pullPolicy }}
|
||||
resources: {{ toYaml $app.resources | nindent 12 }}
|
||||
args:
|
||||
|
||||
@@ -1,37 +1,41 @@
|
||||
{{- $ctx := dict "helm" . }}
|
||||
{{- $fullname := include "vm.plain.fullname" $ctx }}
|
||||
{{- $ns := include "vm.namespace" $ctx }}
|
||||
{{- if .Values.rbac.create }}
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: {{ include "vm-operator.fullname" . }}
|
||||
{{- $ctx := dict "helm" . "extraLabels" .Values.extraLabels }}
|
||||
labels: {{ include "vm-operator.labels" $ctx | nindent 4 }}
|
||||
name: {{ $fullname }}
|
||||
{{- $_ := set $ctx "extraLabels" .Values.extraLabels }}
|
||||
labels: {{ include "vm.labels" $ctx | nindent 4 }}
|
||||
{{- $_ := unset $ctx "extraLabels" }}
|
||||
{{- with .Values.annotations }}
|
||||
annotations: {{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "vm-operator.serviceAccountName" . }}
|
||||
namespace: {{ include "vm.namespace" . }}
|
||||
name: {{ (.Values.serviceAccount).name | default $fullname }}
|
||||
namespace: {{ $ns }}
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: {{ include "vm-operator.fullname" . }}
|
||||
name: {{ $fullname }}
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
{{- end -}}
|
||||
{{- if .Values.crds.cleanup.enabled }}
|
||||
{{- if and .Values.crds.enabled .Values.crds.cleanup.enabled }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ include "vm-operator.fullname" . }}-cleanup-hook
|
||||
namespace: {{ include "vm.namespace" . }}
|
||||
labels: {{ include "vm-operator.labels" . | nindent 4 }}
|
||||
name: {{ $fullname }}-cleanup-hook
|
||||
namespace: {{ $ns }}
|
||||
labels: {{ include "vm.labels" $ctx | nindent 4 }}
|
||||
annotations: {{ include "vm-operator.cleanup.annotations" (dict "hookWeight" "-4") | nindent 4 }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: {{ include "vm-operator.fullname" . }}-cleanup-hook
|
||||
name: {{ $fullname }}-cleanup-hook
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "vm-operator.fullname" . }}-cleanup-hook
|
||||
namespace: {{ include "vm.namespace" . }}
|
||||
name: {{ $fullname }}-cleanup-hook
|
||||
namespace: {{ $ns }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,15 +1,22 @@
|
||||
{{- /* do not update crds here, please update in /victoria-metrics-operator/crd.yaml */ -}}
|
||||
{{- /* this is used to add "helm.sh/resource-policy: keep" annotation for each crd */ -}}
|
||||
{{- /* see this pull request https://github.com/VictoriaMetrics/helm-charts/pull/771 for details */ -}}
|
||||
{{- if not .Values.crds.plain }}
|
||||
{{- $ctx := dict "helm" . }}
|
||||
{{- if and .Values.crds.plain (not .Values.crds.enabled) }}
|
||||
{{- fail "When CRDs are disabled (`crds.enabled: false`) you need to disable plain CRD rendering (`crds.plain: false`)" -}}
|
||||
{{- end -}}
|
||||
{{- if and (not .Values.crds.plain) .Values.crds.enabled }}
|
||||
{{- $files := .Files }}
|
||||
{{- $crds := $files.Get "crd.yaml" | splitList "---" }}
|
||||
{{- $labels := (include "vm-operator.labels" .) | fromYaml -}}
|
||||
{{- $annotations := (include "vm-operator.crds.annotations" .) | fromYaml -}}
|
||||
{{- $labels := (include "vm.labels" $ctx) | fromYaml -}}
|
||||
{{- $annotations := mergeOverwrite ((include "vm-operator.crds.annotations" .) | fromYaml) .Values.crds.annotations -}}
|
||||
{{- $extra := dict "metadata" (dict "annotations" $annotations "labels" $labels) -}}
|
||||
{{- range $crds }}
|
||||
{{- $crd := . | fromYaml }}
|
||||
{{- toYaml (merge $crd $extra) }}
|
||||
{{- $crd := merge (fromYaml .) $extra }}
|
||||
{{- range $attrKey, $attrValue := $crd }}
|
||||
{{- $attrKey }}: {{ toJson $attrValue }}
|
||||
{{- printf "\n" -}}
|
||||
{{ end }}
|
||||
{{- print "\n---\n" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,39 +1,47 @@
|
||||
{{- $ctx := dict "helm" . "noEnterprise" true }}
|
||||
{{- $fullname := include "vm.plain.fullname" $ctx }}
|
||||
{{- $ns := include "vm.namespace" $ctx }}
|
||||
---
|
||||
{{- if hasKey .Values "watchNamespace" }}
|
||||
{{- fail "`watchNamespace` is deprecated Please use `watchNamespaces` slice instead" -}}
|
||||
{{- end }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "vm-operator.fullname" . }}
|
||||
namespace: {{ include "vm.namespace" . }}
|
||||
{{- $ctx := dict "helm" . "extraLabels" .Values.extraLabels }}
|
||||
labels: {{ include "vm-operator.labels" $ctx | nindent 4 }}
|
||||
name: {{ $fullname }}
|
||||
namespace: {{ $ns }}
|
||||
{{- $_ := set $ctx "extraLabels" .Values.extraLabels }}
|
||||
labels: {{ include "vm.labels" $ctx | nindent 4 }}
|
||||
{{- $_ := unset $ctx "extraLabels" }}
|
||||
{{- with .Values.annotations }}
|
||||
annotations: {{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
replicas: {{.Values.replicaCount}}
|
||||
replicas: {{.Values.replicaCount }}
|
||||
selector:
|
||||
matchLabels: {{ include "vm-operator.selectorLabels" . | nindent 6 }}
|
||||
matchLabels: {{ include "vm.selectorLabels" $ctx | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.annotations }}
|
||||
annotations: {{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- $_ := set $ctx "extraLabels" .Values.podLabels }}
|
||||
labels: {{ include "vm-operator.selectorLabels" $ctx | nindent 8}}
|
||||
labels: {{ include "vm.podLabels" $ctx | nindent 8 }}
|
||||
{{- $_ := unset $ctx "extraLabels" }}
|
||||
spec:
|
||||
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
|
||||
{{- if .Values.podSecurityContext.enabled }}
|
||||
securityContext: {{ include "vm.securityContext" (dict "securityContext" .Values.podSecurityContext "helm" .) | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "vm-operator.serviceAccountName" . }}
|
||||
{{- if .Values.hostNetwork }}
|
||||
hostNetwork: true
|
||||
{{- end }}
|
||||
{{- if or (.Values.serviceAccount).name (.Values.serviceAccount).create }}
|
||||
serviceAccountName: {{ (.Values.serviceAccount).name | default $fullname }}
|
||||
{{- end }}
|
||||
{{- with (.Values.imagePullSecrets | default .Values.global.imagePullSecrets) }}
|
||||
imagePullSecrets: {{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: operator
|
||||
image: {{ include "vm.image" (dict "helm" . "app" .Values ) }}
|
||||
image: {{ include "vm.image" $ctx }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
{{- with .Values.envFrom }}
|
||||
envFrom: {{ toYaml . | nindent 12 }}
|
||||
@@ -128,6 +136,9 @@ spec:
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector: {{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.priorityClassName }}
|
||||
priorityClassName: {{ . }}
|
||||
{{- end }}
|
||||
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
|
||||
{{- with .Values.lifecycle }}
|
||||
lifecycle: {{ toYaml . | nindent 8 }}
|
||||
@@ -141,7 +152,7 @@ spec:
|
||||
- {{ toYaml $constraint | nindent 10 | trim }}
|
||||
{{- if not $constraint.labelSelector }}
|
||||
labelSelector:
|
||||
matchLabels: {{ include "vm-operator.selectorLabels" $ | nindent 14 }}
|
||||
matchLabels: {{ include "vm.selectorLabels" $ctx | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -153,7 +164,7 @@ spec:
|
||||
- name: cert
|
||||
secret:
|
||||
defaultMode: 420
|
||||
secretName: {{ include "vm-operator.fullname" . }}-validation
|
||||
secretName: {{ $fullname }}-validation
|
||||
{{- end }}
|
||||
{{- with .Values.extraVolumes }}
|
||||
{{- toYaml .| nindent 8 }}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{{ range .Values.extraObjects }}
|
||||
---
|
||||
{{ tpl (toYaml .) $ }}
|
||||
{{ tpl (ternary . (toYaml .) (typeIs "string" .)) $ }}
|
||||
{{ end }}
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
{{- $monitor := .Values.serviceMonitor }}
|
||||
{{- if $monitor.enabled -}}
|
||||
{{- $annotations := mustMerge $monitor.annotations .Values.annotations -}}
|
||||
{{- $labels := mustMerge $monitor.extraLabels .Values.extraLabels -}}
|
||||
{{- $ctx := dict "helm" . }}
|
||||
{{- $fullname := include "vm.plain.fullname" $ctx }}
|
||||
{{- $ns := include "vm.namespace" $ctx }}
|
||||
apiVersion: {{ ternary "operator.victoriametrics.com/v1beta1" "monitoring.coreos.com/v1" $monitor.vm }}
|
||||
kind: {{ ternary "VMServiceScrape" "ServiceMonitor" $monitor.vm }}
|
||||
metadata:
|
||||
name: {{ $fullname }}
|
||||
namespace: {{ $ns }}
|
||||
{{- $_ := set $ctx "extraLabels" $labels }}
|
||||
labels: {{ include "vm.labels" $ctx | nindent 4 }}
|
||||
{{- $_ := unset $ctx "extraLabels" }}
|
||||
{{- with $annotations }}
|
||||
annotations: {{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels: {{ include "vm.selectorLabels" $ctx | nindent 6 }}
|
||||
endpoints:
|
||||
- port: http
|
||||
{{- with $monitor.scheme }}
|
||||
scheme: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $monitor.interval }}
|
||||
interval: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $monitor.scrapeTimeout }}
|
||||
scrapeTimeout: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $monitor.tlsConfig }}
|
||||
tlsConfig: {{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with $monitor.relabelings }}
|
||||
{{ ternary "relabelConfigs" "relabelings" $monitor.vm }}: {{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with $monitor.basicAuth }}
|
||||
basicAuth: {{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with $monitor.proxyURL }}
|
||||
{{ ternary "proxyURL" "proxyUrl" $monitor.vm }}: {{ . }}
|
||||
{{- end }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ $ns }}
|
||||
{{- end }}
|
||||
@@ -1,18 +1,23 @@
|
||||
{{- if .Values.podDisruptionBudget.enabled }}
|
||||
{{- $pdb := .Values.podDisruptionBudget }}
|
||||
{{- if $pdb.enabled }}
|
||||
{{- $ctx := dict "helm" . }}
|
||||
{{- $fullname := include "vm.plain.fullname" $ctx }}
|
||||
{{- $ns := include "vm.namespace" $ctx }}
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ include "vm-operator.fullname" . }}
|
||||
namespace: {{ include "vm.namespace" . }}
|
||||
{{- $ctx := dict "helm" . "extraLabels" .Values.podDisruptionBudget.labels }}
|
||||
labels: {{ include "vm-operator.labels" $ctx | nindent 4 }}
|
||||
name: {{ $fullname }}
|
||||
namespace: {{ $ns }}
|
||||
{{- $_ := set $ctx "extraLabels" $pdb.labels }}
|
||||
labels: {{ include "vm.labels" $ctx | nindent 4 }}
|
||||
{{- $_ := unset $ctx "extraLabels" }}
|
||||
spec:
|
||||
{{- with .Values.podDisruptionBudget.minAvailable }}
|
||||
{{- with $pdb.minAvailable }}
|
||||
minAvailable: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.podDisruptionBudget.maxUnavailable }}
|
||||
{{- with $pdb.maxUnavailable }}
|
||||
maxUnavailable: {{ . }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels: {{ include "vm-operator.selectorLabels" . | nindent 6 }}
|
||||
matchLabels: {{ include "vm.selectorLabels" $ctx | nindent 6 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,20 +1,24 @@
|
||||
{{- if .Values.rbac.create -}}
|
||||
{{- $ctx := dict "helm" . }}
|
||||
{{- $fullname := include "vm.plain.fullname" $ctx }}
|
||||
{{- $ns := include "vm.namespace" $ctx }}
|
||||
kind: RoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: {{ include "vm-operator.fullname" . }}
|
||||
namespace: {{ include "vm.namespace" . }}
|
||||
{{- $ctx := dict "helm" . "extraLabels" .Values.extraLabels }}
|
||||
labels: {{ include "vm-operator.labels" $ctx | nindent 4 }}
|
||||
name: {{ $fullname }}
|
||||
namespace: {{ $ns }}
|
||||
{{- $_ := set $ctx "extraLabels" .Values.extraLabels }}
|
||||
labels: {{ include "vm.labels" $ctx | nindent 4 }}
|
||||
{{- $_ := unset $ctx "extraLabels" }}
|
||||
{{- with .Values.annotations }}
|
||||
annotations: {{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "vm-operator.serviceAccountName" . }}
|
||||
namespace: {{ include "vm.namespace" . }}
|
||||
name: {{ (.Values.serviceAccount).name | default $fullname }}
|
||||
namespace: {{ $ns }}
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: {{ include "vm-operator.fullname" . }}
|
||||
name: {{ $fullname }}
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
{{- end -}}
|
||||
|
||||
@@ -20,18 +20,20 @@
|
||||
{{- end -}}
|
||||
|
||||
{{- $ctx := dict "helm" . "extraLabels" .Values.extraLabels }}
|
||||
{{- $fullname := include "vm.plain.fullname" $ctx }}
|
||||
{{- $ns := include "vm.namespace" $ctx }}
|
||||
|
||||
{{- if .Values.rbac.create }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ include "vm-operator.fullname" . }}
|
||||
labels: {{ include "vm-operator.labels" $ctx | nindent 4 }}
|
||||
name: {{ $fullname }}
|
||||
labels: {{ include "vm.labels" $ctx | nindent 4 }}
|
||||
{{- with .Values.annotations }}
|
||||
annotations: {{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
namespace: {{ include "vm.namespace" . }}
|
||||
namespace: {{ $ns }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- coordination.k8s.io
|
||||
@@ -43,22 +45,20 @@ rules:
|
||||
- leases
|
||||
|
||||
{{- $watchNamespaces := (fromYaml (tpl (toYaml (dict "ns" .Values.watchNamespaces)) .)).ns }}
|
||||
{{- $selfNamespace := (include "vm.namespace" .) }}
|
||||
{{- $selfNamespace := $ns }}
|
||||
{{- $watchSelfNamespace := (and (eq (len $watchNamespaces) 1) (eq (first $watchNamespaces) $selfNamespace)) }}
|
||||
{{- if not $watchSelfNamespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ template "vm-operator.fullname" . }}
|
||||
labels: {{ include "vm-operator.labels" $ctx | nindent 4 }}
|
||||
name: {{ $fullname }}
|
||||
labels: {{ include "vm.labels" $ctx | nindent 4 }}
|
||||
{{- with .Values.annotations }}
|
||||
annotations: {{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
rules:
|
||||
- nonResourceURLs:
|
||||
- /metrics
|
||||
- /metrics/resources
|
||||
- nonResourceURLs: {{ toYaml .Values.allowedMetricsEndpoints | nindent 2 }}
|
||||
verbs:
|
||||
- get
|
||||
- watch
|
||||
@@ -97,6 +97,8 @@ rules:
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- daemonsets
|
||||
- daemonsets/finalizers
|
||||
- deployments
|
||||
- deployments/finalizers
|
||||
- replicasets
|
||||
@@ -177,14 +179,14 @@ rules:
|
||||
{{ toYaml . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.crds.cleanup.enabled }}
|
||||
{{- if and .Values.crds.enabled .Values.crds.cleanup.enabled }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ include "vm-operator.fullname" . }}-cleanup-hook
|
||||
namespace: {{ include "vm.namespace" . }}
|
||||
labels: {{ include "vm-operator.labels" . | nindent 4 }}
|
||||
name: {{ $fullname }}-cleanup-hook
|
||||
namespace: {{ $ns }}
|
||||
labels: {{ include "vm.labels" $ctx | nindent 4 }}
|
||||
annotations: {{ include "vm-operator.cleanup.annotations" (dict "hookWeight" "-5") | nindent 4 }}
|
||||
rules: {{ toYaml $rules.admin | nindent 2 }}
|
||||
{{- end }}
|
||||
@@ -195,22 +197,22 @@ rules: {{ toYaml $rules.admin | nindent 2 }}
|
||||
{{- /* kubernetes clusterrole aggregation feature to include these */ -}}
|
||||
{{- /* cluster roles into the default view and admin roles */ -}}
|
||||
{{- /* See https://kubernetes.io/docs/reference/access-authn-authz/rbac/#aggregated-clusterroles */}}
|
||||
---
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: victoriametrics:admin
|
||||
name: {{ $fullname }}-victoriametrics-admin
|
||||
labels:
|
||||
{{- include "vm-operator.labels" . | nindent 4 }}
|
||||
{{- include "vm.labels" $ctx | nindent 4 }}
|
||||
{{- .Values.rbac.aggregatedClusterRoles.labels.admin | toYaml | nindent 4 }}
|
||||
rules: {{ toYaml $rules.admin | nindent 2 }}
|
||||
rules: {{ toYaml ($rules.admin | default list) | nindent 2 }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: victoriametrics:view
|
||||
name: {{ $fullname }}-victoriametrics-view
|
||||
labels:
|
||||
{{- include "vm-operator.labels" . | nindent 4 }}
|
||||
{{- include "vm.labels" $ctx | nindent 4 }}
|
||||
{{- .Values.rbac.aggregatedClusterRoles.labels.view | toYaml | nindent 4 }}
|
||||
rules: {{ toYaml $rules.view | nindent 2 }}
|
||||
rules: {{ toYaml ($rules.view | default list) | nindent 2 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,45 +1,50 @@
|
||||
{{- $service := .Values.service }}
|
||||
{{- $ctx := dict "helm" . }}
|
||||
{{- $fullname := include "vm.plain.fullname" $ctx }}
|
||||
{{- $ns := include "vm.namespace" $ctx }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
namespace: {{ include "vm.namespace" . }}
|
||||
{{- with .Values.service.annotations }}
|
||||
namespace: {{ $ns }}
|
||||
{{- with $service.annotations }}
|
||||
annotations: {{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- $ctx := dict "helm" . "extraLabels" .Values.extraLabels }}
|
||||
labels: {{ include "vm-operator.labels" $ctx | nindent 4 }}
|
||||
name: {{ include "vm-operator.fullname" . }}
|
||||
{{- $_ := set $ctx "extraLabels" .Values.extraLabels }}
|
||||
labels: {{ include "vm.labels" $ctx | nindent 4 }}
|
||||
{{- $_ := unset $ctx "extraLabels" }}
|
||||
name: {{ $fullname }}
|
||||
spec:
|
||||
{{- with .Values.service.clusterIP }}
|
||||
{{- with $service.clusterIP }}
|
||||
clusterIP: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.service.externalIPs }}
|
||||
{{- with $service.externalIPs }}
|
||||
externalIPs: {{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.service.loadBalancerIP }}
|
||||
{{- with $service.loadBalancerIP }}
|
||||
loadBalancerIP: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.service.loadBalancerSourceRanges }}
|
||||
{{- with $service.loadBalancerSourceRanges }}
|
||||
loadBalancerSourceRanges: {{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
type: {{ .Values.service.type }}
|
||||
{{- with .Values.service.healthCheckNodePort }}
|
||||
type: {{ $service.type }}
|
||||
{{- with $service.healthCheckNodePort }}
|
||||
healthCheckNodePort: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.service.externalTrafficPolicy }}
|
||||
{{- with $service.externalTrafficPolicy }}
|
||||
externalTrafficPolicy: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.service.ipFamilyPolicy }}
|
||||
{{- with $service.ipFamilyPolicy }}
|
||||
ipFamilyPolicy: {{ . }}
|
||||
{{- end }}
|
||||
{{- with .Values.service.ipFamilies }}
|
||||
{{- with $service.ipFamilies }}
|
||||
ipFamilies: {{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
port: {{ .Values.service.servicePort }}
|
||||
port: {{ $service.servicePort }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
- name: webhook
|
||||
port: {{ .Values.service.webhookPort }}
|
||||
port: {{ $service.webhookPort }}
|
||||
targetPort: webhook
|
||||
selector: {{ include "vm-operator.selectorLabels" . | nindent 4 }}
|
||||
selector: {{ include "vm.selectorLabels" $ctx | nindent 4 }}
|
||||
|
||||
@@ -1,22 +1,27 @@
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
{{- $ctx := dict "helm" . }}
|
||||
{{- $fullname := include "vm.plain.fullname" $ctx }}
|
||||
{{- $ns := include "vm.namespace" $ctx }}
|
||||
{{- $sa := .Values.serviceAccount }}
|
||||
{{- if $sa.create -}}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "vm-operator.serviceAccountName" . }}
|
||||
namespace: {{ include "vm.namespace" . }}
|
||||
{{- $ctx := dict "helm" . "extraLabels" .Values.extraLabels }}
|
||||
labels: {{ include "vm-operator.labels" $ctx | nindent 4 }}
|
||||
name: {{ $sa.name | default $fullname }}
|
||||
namespace: {{ $ns }}
|
||||
{{- $_ := set $ctx "extraLabels" .Values.extraLabels }}
|
||||
labels: {{ include "vm.labels" $ctx | nindent 4 }}
|
||||
{{- with .Values.annotations }}
|
||||
annotations: {{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
|
||||
{{- end }}
|
||||
{{- if .Values.crds.cleanup.enabled }}
|
||||
{{- if and .Values.crds.enabled .Values.crds.cleanup.enabled }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "vm-operator.fullname" . }}-cleanup-hook
|
||||
namespace: {{ include "vm.namespace" . }}
|
||||
labels: {{ include "vm-operator.labels" . | nindent 4 }}
|
||||
name: {{ $fullname }}-cleanup-hook
|
||||
namespace: {{ $ns }}
|
||||
labels: {{ include "vm.labels" $ctx | nindent 4 }}
|
||||
annotations: {{ include "vm-operator.cleanup.annotations" (dict "hookWeight" "-5") | nindent 4 }}
|
||||
{{- end }}
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
{{- $serviceMonitor := .Values.serviceMonitor }}
|
||||
{{- if $serviceMonitor.enabled -}}
|
||||
{{- $mergedVMServiceScrapeAnnotations := mustMerge $serviceMonitor.annotations .Values.annotations -}}
|
||||
{{- $mergedVMServiceScrapeLabels := mustMerge $serviceMonitor.extraLabels .Values.extraLabels -}}
|
||||
apiVersion: operator.victoriametrics.com/v1beta1
|
||||
kind: VMServiceScrape
|
||||
metadata:
|
||||
name: {{ include "vm-operator.fullname" . }}
|
||||
namespace: {{ include "vm.namespace" . }}
|
||||
{{- $ctx := dict "helm" . "extraLabels" $mergedVMServiceScrapeLabels }}
|
||||
labels: {{ include "vm-operator.labels" $ctx | nindent 4 }}
|
||||
{{- with $mergedVMServiceScrapeAnnotations }}
|
||||
annotations: {{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels: {{ include "vm-operator.selectorLabels" . | nindent 6 }}
|
||||
endpoints:
|
||||
- port: http
|
||||
{{- with $serviceMonitor.scheme }}
|
||||
scheme: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $serviceMonitor.interval }}
|
||||
interval: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $serviceMonitor.scrapeTimeout }}
|
||||
scrapeTimeout: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $serviceMonitor.tlsConfig }}
|
||||
tlsConfig: {{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with $serviceMonitor.relabelings }}
|
||||
relabelConfigs: {{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with $serviceMonitor.basicAuth }}
|
||||
basicAuth: {{ toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ include "vm.namespace" . }}
|
||||
{{- end }}
|
||||
@@ -1,27 +1,31 @@
|
||||
{{- if .Values.admissionWebhooks.enabled }}
|
||||
{{- $tls := fromYaml (include "vm-operator.certs" .) }}
|
||||
{{- $ctx := dict "helm" . "extraLabels" .Values.extraLabels }}
|
||||
{{- $tls := fromYaml (include "vm-operator.certs" $ctx) }}
|
||||
{{- $fullname := include "vm.plain.fullname" $ctx }}
|
||||
{{- $domain := ((.Values.global).cluster).dnsDomain }}
|
||||
{{- $ns := include "vm.namespace" $ctx }}
|
||||
{{- $certManager := .Values.admissionWebhooks.certManager }}
|
||||
---
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: ValidatingWebhookConfiguration
|
||||
metadata:
|
||||
name: {{ include "vm-operator.fullname" . }}-admission
|
||||
{{- if .Values.admissionWebhooks.certManager.enabled }}
|
||||
name: {{ $fullname }}-admission
|
||||
{{- if $certManager.enabled }}
|
||||
annotations:
|
||||
certmanager.k8s.io/inject-ca-from: {{ printf "%s/%s-validation" (include "vm.namespace" .) ( include "vm-operator.fullname" .) | quote }}
|
||||
cert-manager.io/inject-ca-from: {{ printf "%s/%s-validation" (include "vm.namespace" .) (include "vm-operator.fullname" .) | quote }}
|
||||
certmanager.k8s.io/inject-ca-from: {{ printf "%s/%s-validation" $ns $fullname | quote }}
|
||||
cert-manager.io/inject-ca-from: {{ printf "%s/%s-validation" $ns $fullname | quote }}
|
||||
{{- end }}
|
||||
{{- $ctx := dict "helm" . "extraLabels" .Values.extraLabels }}
|
||||
labels: {{ include "vm-operator.labels" $ctx | nindent 4 }}
|
||||
labels: {{ include "vm.labels" $ctx | nindent 4 }}
|
||||
webhooks:
|
||||
{{- range $name, $enabled := .Values.admissionWebhooks.enabledCRDValidation }}
|
||||
{{- if $enabled }}
|
||||
- clientConfig:
|
||||
service:
|
||||
namespace: {{ include "vm.namespace" $ }}
|
||||
name: {{ include "vm-operator.fullname" $ }}
|
||||
namespace: {{ $ns }}
|
||||
name: {{ $fullname }}
|
||||
path: /validate-operator-victoriametrics-com-v1beta1-{{ $name }}
|
||||
port: {{ $.Values.service.webhookPort }}
|
||||
{{- if not $.Values.admissionWebhooks.certManager.enabled }}
|
||||
{{- if not $certManager.enabled }}
|
||||
caBundle: {{ $tls.caCert }}
|
||||
{{- end }}
|
||||
failurePolicy: {{ $.Values.admissionWebhooks.policy }}
|
||||
@@ -32,7 +36,7 @@ webhooks:
|
||||
matchExpressions:
|
||||
- key: app.kubernetes.io/name
|
||||
operator: NotIn
|
||||
values: [{{ include "vm-operator.name" $ }}]
|
||||
values: [{{ include "vm.name" $ }}]
|
||||
rules:
|
||||
- apiGroups:
|
||||
- operator.victoriametrics.com
|
||||
@@ -45,69 +49,84 @@ webhooks:
|
||||
- {{ $name }}{{ ternary "" "s" (hasSuffix "s" $name) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.admissionWebhooks.certManager.enabled }}
|
||||
{{- if not .Values.admissionWebhooks.certManager.issuer }}
|
||||
{{- if $certManager.enabled }}
|
||||
{{- if not $certManager.issuer }}
|
||||
---
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Issuer
|
||||
metadata:
|
||||
name: {{ include "vm-operator.fullname" . }}-root
|
||||
namespace: {{ include "vm.namespace" . }}
|
||||
name: {{ $fullname }}-root
|
||||
namespace: {{ $ns }}
|
||||
spec:
|
||||
selfSigned: {}
|
||||
---
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: {{ include "vm-operator.fullname" . }}-root-ca
|
||||
namespace: {{ include "vm.namespace" . }}
|
||||
name: {{ $fullname }}-root-ca
|
||||
namespace: {{ $ns }}
|
||||
spec:
|
||||
secretName: {{ include "vm-operator.fullname" . }}-root-ca
|
||||
duration: 63800h0m0s
|
||||
secretName: {{ $fullname }}-root-ca
|
||||
duration: {{ $certManager.ca.duration }}
|
||||
{{- with $certManager.ca.secretTemplate }}
|
||||
secretTemplate: {{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with $certManager.ca.subject }}
|
||||
subject: {{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
issuerRef:
|
||||
name: {{ include "vm-operator.fullname" . }}-root
|
||||
commonName: "ca.validation.victoriametrics"
|
||||
name: {{ $fullname }}-root
|
||||
commonName: {{ $certManager.ca.commonName }}
|
||||
isCA: true
|
||||
---
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Issuer
|
||||
metadata:
|
||||
name: {{ include "vm-operator.fullname" . }}-issuer
|
||||
namespace: {{ include "vm.namespace" . }}
|
||||
name: {{ $fullname }}-issuer
|
||||
namespace: {{ $ns }}
|
||||
spec:
|
||||
ca:
|
||||
secretName: {{ include "vm-operator.fullname" . }}-root-ca
|
||||
secretName: {{ $fullname }}-root-ca
|
||||
{{- end }}
|
||||
---
|
||||
# actual cert part for operator
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: {{ include "vm-operator.fullname" . }}-validation
|
||||
namespace: {{ include "vm.namespace" . }}
|
||||
name: {{ $fullname }}-validation
|
||||
namespace: {{ $ns }}
|
||||
spec:
|
||||
secretName: {{ include "vm-operator.fullname" . }}-validation
|
||||
duration: 45800h0m0s
|
||||
issuerRef:
|
||||
{{- if .Values.admissionWebhooks.certManager.issuer }}
|
||||
{{- range $k, $v := .Values.admissionWebhooks.certManager.issuer }}
|
||||
{{ $k}}: {{ $v}}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
name: {{ include "vm-operator.fullname" . }}-issuer
|
||||
secretName: {{ $fullname }}-validation
|
||||
duration: {{ $certManager.cert.duration }}
|
||||
{{- with $certManager.cert.secretTemplate }}
|
||||
secretTemplate: {{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with $certManager.cert.commonName }}
|
||||
commonName: {{ . }}
|
||||
{{- end }}
|
||||
{{- with $certManager.cert.subject }}
|
||||
subject: {{ toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- $issuerRef := $certManager.issuer | default dict }}
|
||||
{{- if empty $issuerRef }}
|
||||
{{- $_ := set $issuerRef "name" (printf "%s-issuer" $fullname) }}
|
||||
{{- end }}
|
||||
issuerRef: {{ toYaml $issuerRef | nindent 4 }}
|
||||
dnsNames:
|
||||
- {{ include "vm-operator.fullname" . }}
|
||||
- {{ include "vm-operator.fullname" . }}.{{ include "vm.namespace" . }}
|
||||
- {{ include "vm-operator.fullname" . }}.{{ include "vm.namespace" . }}.svc
|
||||
- {{ $fullname }}
|
||||
- {{ $fullname }}.{{ $ns }}
|
||||
- {{ $fullname }}.{{ $ns }}.svc
|
||||
{{- with $domain }}
|
||||
- {{ $fullname }}.{{ $ns }}.svc.{{ . }}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "vm-operator.fullname" . }}-validation
|
||||
namespace: {{ include "vm.namespace" . }}
|
||||
labels: {{ include "vm-operator.labels" . | nindent 4 }}
|
||||
name: {{ $fullname }}-validation
|
||||
namespace: {{ $ns }}
|
||||
labels: {{ include "vm.labels" $ctx | nindent 4 }}
|
||||
type: kubernetes.io/tls
|
||||
data:
|
||||
ca.crt: {{ $tls.caCert }}
|
||||
|
||||
@@ -9,7 +9,8 @@ global:
|
||||
openshift:
|
||||
adaptSecurityContext: "auto"
|
||||
cluster:
|
||||
dnsDomain: cluster.local
|
||||
# -- K8s cluster domain suffix, uses for building storage pods' FQDN. Details are [here](https://kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers/)
|
||||
dnsDomain: cluster.local.
|
||||
# Default values for victoria-metrics.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
@@ -29,10 +30,14 @@ image:
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
crds:
|
||||
# -- manages CRD creation. Disables CRD creation only in combination with `crds.plain: false` due to helm dependency conditions limitation
|
||||
enabled: true
|
||||
# -- check if plain or templated CRDs should be created.
|
||||
# with this option set to `false`, all CRDs will be rendered from templates.
|
||||
# with this option set to `true`, all CRDs are immutable and require manual upgrade.
|
||||
plain: false
|
||||
# -- additional CRD annotations, when `.Values.crds.plain: false`
|
||||
annotations: {}
|
||||
cleanup:
|
||||
# -- Tells helm to clean up all the vm resources under this release's namespace when uninstalling
|
||||
enabled: false
|
||||
@@ -57,15 +62,19 @@ replicaCount: 1
|
||||
# -- Secret to pull images
|
||||
imagePullSecrets: []
|
||||
|
||||
# -- VM operatror deployment name override
|
||||
# -- Override chart name
|
||||
nameOverride: ""
|
||||
|
||||
# -- Overrides the full name of server component
|
||||
# -- Overrides the full name of server component resources
|
||||
fullnameOverride: ""
|
||||
|
||||
# -- VM operator log level. Possible values: info and error.
|
||||
logLevel: "info"
|
||||
|
||||
allowedMetricsEndpoints:
|
||||
- /metrics
|
||||
- /metrics/resources
|
||||
|
||||
rbac:
|
||||
# -- Specifies whether the RBAC resources should be created
|
||||
create: true
|
||||
@@ -89,10 +98,18 @@ annotations: {}
|
||||
# -- Pod's security context. Details are [here](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/)
|
||||
podSecurityContext:
|
||||
enabled: true
|
||||
fsGroup: 2000
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1000
|
||||
|
||||
# -- Security context to be added to server pods
|
||||
securityContext:
|
||||
enabled: true
|
||||
allowPrivilegeEscalation: false
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
readOnlyRootFilesystem: true
|
||||
|
||||
operator:
|
||||
# -- By default, operator converts prometheus-operator objects.
|
||||
@@ -117,6 +134,9 @@ serviceAccount:
|
||||
# -- The name of the service account to use. If not set and create is true, a name is generated using the fullname template
|
||||
name: ""
|
||||
|
||||
# -- Whether to automount the service account token. Note that token needs to be mounted manually if this is disabled.
|
||||
automountServiceAccountToken: true
|
||||
|
||||
service:
|
||||
# -- Service annotations
|
||||
annotations: {}
|
||||
@@ -126,7 +146,7 @@ service:
|
||||
clusterIP: ""
|
||||
# -- Service external IPs. Check [here](https://kubernetes.io/docs/user-guide/services/#external-ips) for details
|
||||
externalIPs: ""
|
||||
# -- Service load balacner IP
|
||||
# -- Service load balancer IP
|
||||
loadBalancerIP: ""
|
||||
# -- Load balancer source range
|
||||
loadBalancerSourceRanges: []
|
||||
@@ -171,6 +191,9 @@ resources:
|
||||
# -- Pod's node selector. Details are [here](https://kubernetes.io/docs/user-guide/node-selection/)
|
||||
nodeSelector: {}
|
||||
|
||||
# -- Name of Priority Class
|
||||
priorityClassName: ""
|
||||
|
||||
# -- Array of tolerations object. Spec is [here](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/)
|
||||
tolerations: []
|
||||
|
||||
@@ -223,6 +246,9 @@ extraContainers:
|
||||
# - name: config-reloader
|
||||
# image: reloader-image
|
||||
|
||||
# -- Enable hostNetwork on operator deployment
|
||||
hostNetwork: false
|
||||
|
||||
# -- Configures resource validation
|
||||
admissionWebhooks:
|
||||
# -- Enables validation webhook.
|
||||
@@ -246,6 +272,18 @@ admissionWebhooks:
|
||||
enabled: false
|
||||
# --If needed, provide own issuer. Operator will create self-signed if empty.
|
||||
issuer: {}
|
||||
# -- Certificate Authority parameters
|
||||
ca:
|
||||
secretTemplate: {}
|
||||
subject: {}
|
||||
duration: 63800h0m0s
|
||||
commonName: ca.validation.victoriametrics
|
||||
# -- Certificate parameters
|
||||
cert:
|
||||
secretTemplate: {}
|
||||
subject: {}
|
||||
duration: 45800h0m0s
|
||||
commonName: ""
|
||||
keepTLSSecret: true
|
||||
# tls specifies TLS cert/key for the webhook
|
||||
tls:
|
||||
@@ -253,9 +291,11 @@ admissionWebhooks:
|
||||
cert:
|
||||
key:
|
||||
|
||||
# -- Configures monitoring with serviceScrape. VMServiceScrape must be pre-installed
|
||||
# -- Configures monitoring with serviceScrape using either `VMServiceScrape` or `ServiceMonitor`. For latter [Prometheus Operator CRDs](https://artifacthub.io/packages/helm/prometheus-community/prometheus-operator-crds) should be preinstalled
|
||||
serviceMonitor:
|
||||
enabled: false
|
||||
# -- Creates `VMServiceScrape` if `true` and `ServiceMonitor` otherwise. Make sure [Prometheus Operator CRDs](https://artifacthub.io/packages/helm/prometheus-community/prometheus-operator-crds) are installed if it's set to `false`
|
||||
vm: true
|
||||
extraLabels: {}
|
||||
annotations: {}
|
||||
relabelings: []
|
||||
|
||||
Reference in New Issue
Block a user