Skip to content

Commit

Permalink
configurable replicas and services on singles (#1480)
Browse files Browse the repository at this point in the history
* configurable replicas and services on singles

* release OCI charts
  • Loading branch information
AndrewChubatiuk authored Sep 12, 2024
1 parent c055bf2 commit 0032c23
Show file tree
Hide file tree
Showing 23 changed files with 76 additions and 50 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,16 @@ jobs:
with:
config: .github/ci/cr.yaml

- name: Release OCI
run: |
helm registry login \
-u ${{ github.actor }} \
-p ${{ github.token }} \
ghcr.io
for package in $(find **/.cr-release-packages -name "*.tgz"); do
helm push $package oci://ghcr.io/${{ github.repository_owner }}/charts/;
done
- name: Automatic update changelogs and readme
run: |
rm charts/*/RELEASE_NOTES.md
Expand Down
2 changes: 2 additions & 0 deletions charts/victoria-logs-single/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
## Next release

- Added ability to override deployment namespace using `namespaceOverride` and `global.namespaceOverride` variables
- Made replicas configurable
- Allow override default for statefulset headless service

## 0.6.1

Expand Down
6 changes: 3 additions & 3 deletions charts/victoria-logs-single/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ dependencies:
version: 0.46.7
- name: victoria-metrics-common
repository: https://victoriametrics.github.io/helm-charts
version: 0.0.10
digest: sha256:297e416771da041cc4b4a607eccd6128abaf0a81977ff97b30f37b73d956f992
generated: "2024-09-10T06:09:32.743794014Z"
version: 0.0.11
digest: sha256:9065392de66fea380e81caff20894ff361e462c66461d19a787aec28e2737a1c
generated: "2024-09-12T11:50:32.588982509Z"
2 changes: 1 addition & 1 deletion charts/victoria-logs-single/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
appVersion: v0.28.0
description: Victoria Logs Single version - high-performance, cost-effective and scalable logs storage
name: victoria-logs-single
version: 0.6.1
version: 0.6.2
sources:
- https://github.com/VictoriaMetrics/helm-charts
icon: https://avatars.githubusercontent.com/u/43720803?s=200&v=4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ metadata:
spec:
selector:
matchLabels: {{ include "victoria-logs.server.matchLabels" . | nindent 6 }}
replicas: 1
replicas: {{ $app.replicaCount }}
{{- if $app.persistentVolume.enabled }}
strategy:
# Must be "Recreate" when we have a persistent volume
Expand Down
20 changes: 12 additions & 8 deletions charts/victoria-logs-single/templates/server-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,27 @@ metadata:
labels: {{ include "victoria-logs.server.labels" $ctx | nindent 4 }}
name: {{ include "victoria-logs.server.fullname" . }}
spec:
{{- $clusterIP := ternary "None" $app.service.clusterIP $app.statefulSet.enabled }}
{{- $clusterIP := $app.service.clusterIP }}
{{- if and (not $clusterIP) $app.statefulSet.enabled }}
{{- $clusterIP = "None" }}
{{- end }}
{{- with $clusterIP }}
clusterIP: {{ . }}
{{- end }}
{{- $externalIPs := ternary (default list) $app.service.externalIPs $app.statefulSet.enabled }}
{{- with $externalIPs }}
{{- with $app.service.externalIPs }}
externalIPs: {{ toYaml . | nindent 4 }}
{{- end }}
{{- $loadBalancerIP := ternary "" $app.service.loadBalancerIP $app.statefulSet.enabled }}
{{- with $loadBalancerIP }}
{{- with $app.service.loadBalancerIP }}
loadBalancerIP: {{ . }}
{{- end }}
{{- $loadBalancerSourceRanges := ternary (default list) $app.service.loadBalancerSourceRanges $app.statefulSet.enabled }}
{{- with $loadBalancerSourceRanges }}
{{- with $app.service.loadBalancerSourceRanges }}
loadBalancerSourceRanges: {{ toYaml . | nindent 4 }}
{{- end }}
type: {{ ternary "ClusterIP" $app.service.type $app.statefulSet.enabled }}
{{- $type := $app.service.type }}
{{- if and (not $type) $app.statefulSet.enabled }}
{{- $type = "ClusterIP" }}
{{- end }}
type: {{ $type }}
{{- with $app.service.healthCheckNodePort }}
healthCheckNodePort: {{ . }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
serviceName: {{ $fullname }}
selector:
matchLabels: {{ include "victoria-logs.server.matchLabels" . | nindent 6 }}
replicas: 1
replicas: {{ $app.replicaCount }}
podManagementPolicy: {{ $app.podManagementPolicy }}
template:
metadata:
Expand Down
2 changes: 2 additions & 0 deletions charts/victoria-logs-single/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ server:
pullPolicy: IfNotPresent
# -- Image pull secrets
imagePullSecrets: []
# -- Replica count
replicaCount: 1
# -- Name of Priority Class
priorityClassName: ""
# -- Data retention period in month
Expand Down
6 changes: 3 additions & 3 deletions charts/victoria-metrics-agent/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: victoria-metrics-common
repository: https://victoriametrics.github.io/helm-charts
version: 0.0.10
digest: sha256:94b062240fbfc242acafcd180a5e74ac6ff5d37778af8dcc5e3ff209004e18ed
generated: "2024-09-10T06:09:35.800836709Z"
version: 0.0.11
digest: sha256:d91f2afa5ae37158f11b1c6601cf8265b08dad62ec4eefd36064b32946e215a6
generated: "2024-09-12T11:50:35.502691843Z"
6 changes: 3 additions & 3 deletions charts/victoria-metrics-alert/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: victoria-metrics-common
repository: https://victoriametrics.github.io/helm-charts
version: 0.0.10
digest: sha256:94b062240fbfc242acafcd180a5e74ac6ff5d37778af8dcc5e3ff209004e18ed
generated: "2024-09-10T06:09:39.518487503Z"
version: 0.0.11
digest: sha256:d91f2afa5ae37158f11b1c6601cf8265b08dad62ec4eefd36064b32946e215a6
generated: "2024-09-12T11:50:39.261032678Z"
6 changes: 3 additions & 3 deletions charts/victoria-metrics-anomaly/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: victoria-metrics-common
repository: https://victoriametrics.github.io/helm-charts
version: 0.0.10
digest: sha256:94b062240fbfc242acafcd180a5e74ac6ff5d37778af8dcc5e3ff209004e18ed
generated: "2024-09-10T06:09:43.531705588Z"
version: 0.0.11
digest: sha256:d91f2afa5ae37158f11b1c6601cf8265b08dad62ec4eefd36064b32946e215a6
generated: "2024-09-12T11:50:43.125797222Z"
6 changes: 3 additions & 3 deletions charts/victoria-metrics-auth/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: victoria-metrics-common
repository: https://victoriametrics.github.io/helm-charts
version: 0.0.10
digest: sha256:94b062240fbfc242acafcd180a5e74ac6ff5d37778af8dcc5e3ff209004e18ed
generated: "2024-09-10T06:09:45.576248422Z"
version: 0.0.11
digest: sha256:d91f2afa5ae37158f11b1c6601cf8265b08dad62ec4eefd36064b32946e215a6
generated: "2024-09-12T11:50:45.212388959Z"
6 changes: 3 additions & 3 deletions charts/victoria-metrics-cluster/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: victoria-metrics-common
repository: https://victoriametrics.github.io/helm-charts
version: 0.0.10
digest: sha256:94b062240fbfc242acafcd180a5e74ac6ff5d37778af8dcc5e3ff209004e18ed
generated: "2024-09-10T06:09:47.574843548Z"
version: 0.0.11
digest: sha256:d91f2afa5ae37158f11b1c6601cf8265b08dad62ec4eefd36064b32946e215a6
generated: "2024-09-12T11:50:47.039315126Z"
2 changes: 1 addition & 1 deletion charts/victoria-metrics-cluster/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ type: application
appVersion: v1.103.0
description: Victoria Metrics Cluster version - high-performance, cost-effective and scalable TSDB, long-term remote storage for Prometheus
name: victoria-metrics-cluster
version: 0.13.6
version: 0.13.7
sources:
- https://github.com/VictoriaMetrics/helm-charts
icon: https://avatars.githubusercontent.com/u/43720803?s=200&v=4
Expand Down
6 changes: 3 additions & 3 deletions charts/victoria-metrics-gateway/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: victoria-metrics-common
repository: https://victoriametrics.github.io/helm-charts
version: 0.0.10
digest: sha256:94b062240fbfc242acafcd180a5e74ac6ff5d37778af8dcc5e3ff209004e18ed
generated: "2024-09-10T06:09:49.409038091Z"
version: 0.0.11
digest: sha256:d91f2afa5ae37158f11b1c6601cf8265b08dad62ec4eefd36064b32946e215a6
generated: "2024-09-12T11:50:49.115872835Z"
6 changes: 3 additions & 3 deletions charts/victoria-metrics-k8s-stack/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dependencies:
- name: victoria-metrics-common
repository: https://victoriametrics.github.io/helm-charts
version: 0.0.10
version: 0.0.11
- name: victoria-metrics-operator
repository: https://victoriametrics.github.io/helm-charts
version: 0.34.8
Expand All @@ -20,5 +20,5 @@ dependencies:
- name: prometheus-operator-crds
repository: https://prometheus-community.github.io/helm-charts
version: 11.0.0
digest: sha256:a392bf24c36349f4d3cae18d460dbfae13188d4c63c3081870965462c0391f8c
generated: "2024-09-10T06:09:52.148152592Z"
digest: sha256:11b119ebabf4ff0ea2951e7c72f51d0223dc3f50fb061a43b01fe7856491b836
generated: "2024-09-12T11:50:51.935071545Z"
2 changes: 2 additions & 0 deletions charts/victoria-metrics-single/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

- Added ability to override deployment namespace using `namespaceOverride` and `global.namespaceOverride` variables
- Removed deprecated API from RBAC. See [this issue](https://github.com/VictoriaMetrics/helm-charts/issues/1438)
- Made replicas configurable
- Allow override default for statefulset headless service

## 0.11.1

Expand Down
6 changes: 3 additions & 3 deletions charts/victoria-metrics-single/Chart.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies:
- name: victoria-metrics-common
repository: https://victoriametrics.github.io/helm-charts
version: 0.0.10
digest: sha256:94b062240fbfc242acafcd180a5e74ac6ff5d37778af8dcc5e3ff209004e18ed
generated: "2024-09-10T06:09:59.34163897Z"
version: 0.0.11
digest: sha256:d91f2afa5ae37158f11b1c6601cf8265b08dad62ec4eefd36064b32946e215a6
generated: "2024-09-12T11:50:58.52997534Z"
2 changes: 1 addition & 1 deletion charts/victoria-metrics-single/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ type: application
appVersion: v1.103.0
description: Victoria Metrics Single version - high-performance, cost-effective and scalable TSDB, long-term remote storage for Prometheus
name: victoria-metrics-single
version: 0.11.1
version: 0.11.2
sources:
- https://github.com/VictoriaMetrics/helm-charts
kubeVersion: ">=1.25.0-0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ metadata:
spec:
selector:
matchLabels: {{ include "victoria-metrics.server.matchLabels" . | nindent 6 }}
replicas: 1
replicas: {{ $app.replicaCount }}
{{- if $app.persistentVolume.enabled }}
strategy:
# Must be "Recreate" when we have a persistent volume
Expand Down
20 changes: 12 additions & 8 deletions charts/victoria-metrics-single/templates/server-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,27 @@ metadata:
labels: {{ include "victoria-metrics.server.labels" $ctx | nindent 4 }}
name: {{ include "victoria-metrics.server.fullname" . }}
spec:
{{- $clusterIP := ternary "None" $app.service.clusterIP $app.statefulSet.enabled }}
{{- $clusterIP := $app.service.clusterIP }}
{{- if and (not $clusterIP) $app.statefulSet.enabled }}
{{- $clusterIP = "None" }}
{{- end }}
{{- with $clusterIP }}
clusterIP: {{ . }}
{{- end }}
{{- $externalIPs := ternary (default list) $app.service.externalIPs $app.statefulSet.enabled }}
{{- with $externalIPs }}
{{- with $app.service.externalIPs }}
externalIPs: {{ toYaml . | nindent 4 }}
{{- end }}
{{- $loadBalancerIP := ternary "" $app.service.loadBalancerIP $app.statefulSet.enabled }}
{{- with $loadBalancerIP }}
{{- with $app.service.loadBalancerIP }}
loadBalancerIP: {{ . }}
{{- end }}
{{- $loadBalancerSourceRanges := ternary (default list) $app.service.loadBalancerSourceRanges $app.statefulSet.enabled }}
{{- with $loadBalancerSourceRanges }}
{{- with $app.service.loadBalancerSourceRanges }}
loadBalancerSourceRanges: {{ toYaml . | nindent 4 }}
{{- end }}
type: {{ ternary "ClusterIP" $app.service.type $app.statefulSet.enabled }}
{{- $type := $app.service.type }}
{{- if and (not $type) $app.statefulSet.enabled }}
{{- $type = "ClusterIP" }}
{{- end }}
type: {{ $type }}
{{- with $app.service.healthCheckNodePort }}
healthCheckNodePort: {{ . }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
serviceName: {{ include "victoria-metrics.server.fullname" . }}
selector:
matchLabels: {{ include "victoria-metrics.server.matchLabels" . | nindent 6 }}
replicas: 1
replicas: {{ $app.replicaCount }}
podManagementPolicy: {{ $app.podManagementPolicy }}
template:
metadata:
Expand Down
2 changes: 2 additions & 0 deletions charts/victoria-metrics-single/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ server:
# -- Image pull policy
pullPolicy: IfNotPresent
imagePullSecrets: []
# -- Replica count
replicaCount: 1
# -- Name of Priority Class
priorityClassName: ""
# -- Overrides the full name of server component
Expand Down

0 comments on commit 0032c23

Please sign in to comment.