Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: introduce update strategy for all components #454

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
2 changes: 1 addition & 1 deletion charts/clickhouse/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: clickhouse
description: A Helm chart for ClickHouse
type: application
version: 24.1.0
version: 24.2.0
appVersion: "24.1.2"
icon: https://github.com/ClickHouse/clickhouse-docs/raw/84f38d893eb7e561c7296279d7953b6a508ec413/static/img/clickhouse-logo.svg
sources:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,16 @@ metadata:
labels:
{{- include "clickhouseOperator.labels" . | nindent 4 }}
spec:
replicas: 1
selector:
matchLabels:
{{- include "clickhouseOperator.selectorLabels" . | nindent 6 }}
minReadySeconds: {{ .Values.clickhouseOperator.minReadySeconds }}
progressDeadlineSeconds: {{ .Values.clickhouseOperator.progressDeadlineSeconds }}
replicas: {{ .Values.clickhouseOperator.replicaCount }}
{{- with .Values.clickhouseOperator.updateStrategy }}
strategy:
{{- toYaml . | nindent 4 }}
{{- end }}
template:
metadata:
annotations:
Expand Down
19 changes: 19 additions & 0 deletions charts/clickhouse/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,14 @@ clickhouseOperator:
imagePullSecrets: []
# - "clickhouseOperator-pull-secret"

# -- Deployment strategy type for OtelDeployment
# ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
updateStrategy:
type: RollingUpdate
# rollingUpdate:
# maxSurge: 25%
# maxUnavailable: 25%

# ClickHouse Operator Service Account
serviceAccount:
# -- Specifies whether a service account should be created
Expand All @@ -489,6 +497,17 @@ clickhouseOperator:
podSecurityContext: {}
# fsGroup: 2000

# -- Replica count for Clickhouse Operator
replicaCount: 1

# -- Minimum number of seconds for which a newly created Pod should be ready
# without any of its containers crashing, for it to be considered available.
minReadySeconds: 5

# -- Number of seconds to wait for the Clickhouse Operator to progress before the
# system reports back that the Clickhouse Operator has failed.
progressDeadlineSeconds: 120

# Clickhouse Operator secret for ClickHouse user password
secret:
# -- Specifies whether a secret should be created
Expand Down
2 changes: 1 addition & 1 deletion charts/k8s-infra/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: k8s-infra
description: Helm chart for collecting metrics and logs in K8s
type: application
version: 0.11.6
version: 0.12.0
appVersion: "0.88.0"
home: https://signoz.io
icon: https://signoz.io/img/SigNozLogo-orange.svg
Expand Down
4 changes: 4 additions & 0 deletions charts/k8s-infra/templates/otel-agent/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ spec:
matchLabels:
{{- include "otelAgent.selectorLabels" . | nindent 6 }}
minReadySeconds: {{ .Values.otelAgent.minReadySeconds }}
{{- with .Values.otelAgent.updateStrategy }}
updateStrategy:
{{- toYaml . | nindent 4 }}
{{- end }}
template:
metadata:
annotations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: Pod
metadata:
name: "{{ include "otelAgent.fullname" . }}-test-connection"
namespace: {{ include "k8s-infra.namespace" . }}
annotations:
"helm.sh/hook": test
spec:
Expand Down
4 changes: 4 additions & 0 deletions charts/k8s-infra/templates/otel-deployment/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ spec:
minReadySeconds: {{ .Values.otelDeployment.minReadySeconds }}
progressDeadlineSeconds: {{ .Values.otelDeployment.progressDeadlineSeconds }}
replicas: {{ .Values.otelDeployment.replicaCount }}
{{- with .Values.otelDeployment.updateStrategy }}
strategy:
{{- toYaml . | nindent 4 }}
{{- end }}
template:
metadata:
annotations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ apiVersion: v1
kind: Pod
metadata:
name: "{{ include "otelDeployment.fullname" . }}-test-connection"
namespace: {{ include "k8s-infra.namespace" . }}
labels:
{{- include "otelDeployment.labels" . | nindent 4 }}
annotations:
Expand Down
20 changes: 20 additions & 0 deletions charts/k8s-infra/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,15 @@ otelAgent:
# -- OtelAgent command extra arguments
extraArgs: []

# -- Deployment strategy type for OtelAgent DaemonSet
# ref: https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/
updateStrategy:
type: RollingUpdate
# rollingUpdate:
# maxSurge: 0
# maxUnavailable: 1
# minReadySeconds: 0

configMap:
# -- Specifies whether a configMap should be created (true by default)
create: true
Expand Down Expand Up @@ -672,6 +681,14 @@ otelDeployment:
# -- OtelDeployment command extra arguments
extraArgs: []

# -- Deployment strategy type for OtelDeployment
# ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
updateStrategy:
type: RollingUpdate
# rollingUpdate:
# maxSurge: 25%
# maxUnavailable: 25%

configMap:
# -- Specifies whether a configMap should be created (true by default)
create: true
Expand Down Expand Up @@ -717,6 +734,9 @@ otelDeployment:
# runAsNonRoot: true
# runAsUser: 1000

# -- Replica count for OtelDeployment
replicaCount: 1

# -- Minimum number of seconds for which a newly created Pod should be ready
# without any of its containers crashing, for it to be considered available.
minReadySeconds: 5
Expand Down
4 changes: 4 additions & 0 deletions charts/signoz/templates/alertmanager/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ spec:
matchLabels:
{{- include "alertmanager.selectorLabels" . | nindent 6 }}
serviceName: {{ include "alertmanager.fullname" . }}-headless
{{- with .Values.alertmanager.updateStrategy }}
updateStrategy:
{{- toYaml . | nindent 4 }}
{{- end }}
template:
metadata:
labels:
Expand Down
4 changes: 4 additions & 0 deletions charts/signoz/templates/frontend/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ spec:
selector:
matchLabels:
{{- include "frontend.selectorLabels" . | nindent 6 }}
{{- with .Values.frontend.updateStrategy }}
strategy:
{{- toYaml . | nindent 4 }}
{{- end }}
template:
metadata:
annotations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ spec:
minReadySeconds: {{ .Values.otelCollectorMetrics.minReadySeconds }}
progressDeadlineSeconds: {{ .Values.otelCollectorMetrics.progressDeadlineSeconds }}
replicas: {{ .Values.otelCollectorMetrics.replicaCount }} # adjust replica count to your own requirements
{{- with .Values.otelCollectorMetrics.updateStrategy }}
strategy:
{{- toYaml . | nindent 4 }}
{{- end }}
template:
metadata:
annotations:
Expand Down
4 changes: 4 additions & 0 deletions charts/signoz/templates/otel-collector/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ spec:
{{- if not .Values.otelCollector.autoscaling.enabled }}
replicas: {{ .Values.otelCollector.replicaCount }}
{{- end }}
{{- with .Values.otelCollector.updateStrategy }}
strategy:
{{- toYaml . | nindent 4 }}
{{- end }}
template:
metadata:
annotations:
Expand Down
4 changes: 4 additions & 0 deletions charts/signoz/templates/query-service/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ spec:
selector:
matchLabels:
{{- include "queryService.selectorLabels" . | nindent 6 }}
{{- with .Values.queryService.updateStrategy }}
updateStrategy:
{{- toYaml . | nindent 4 }}
{{- end }}
template:
metadata:
annotations:
Expand Down
50 changes: 49 additions & 1 deletion charts/signoz/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,14 @@ clickhouse:
imagePullSecrets: []
# - "clickhouseOperator-pull-secret"

# -- Deployment strategy type for Clickhouse Operator
# ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
updateStrategy:
type: RollingUpdate
# rollingUpdate:
# maxSurge: 25%
# maxUnavailable: 25%

# ClickHouse Operator Service Account
serviceAccount:
# -- Specifies whether a service account should be created
Expand Down Expand Up @@ -581,6 +589,14 @@ queryService:
# If set, this has higher precedence than the root level or global value of imagePullSecrets.
imagePullSecrets: []

# -- Query-Service statefulset strategy type
# ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
updateStrategy:
type: RollingUpdate
# rollingUpdate:
# maxUnavailable: 1
# partition: 0

# Query-Service Service Account
serviceAccount:
# Specifies whether a service account should be created
Expand Down Expand Up @@ -811,6 +827,14 @@ frontend:
# If set, this has higher precedence than the root level or global value of imagePullSecrets.
imagePullSecrets: []

# -- Deployment strategy type for Frontend
# ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
updateStrategy:
type: RollingUpdate
# rollingUpdate:
# maxSurge: 25%
# maxUnavailable: 25%

# Frontend Service Account
serviceAccount:
# Specifies whether a service account should be created
Expand Down Expand Up @@ -981,6 +1005,14 @@ alertmanager:
# -- Alertmanager extra Arguments
extraArgs: {}

# -- Alertmanager statefulset strategy type
# ref: https://kubernetes.io/docs/concepts/workloads/controllers/statefulset/#update-strategies
updateStrategy:
type: RollingUpdate
# rollingUpdate:
# maxUnavailable: 1
# partition: 0

# Alertmanager Service Account
serviceAccount:
# Specifies whether a service account should be created
Expand Down Expand Up @@ -1394,6 +1426,14 @@ otelCollector:
# -- Specifies whether a configMap should be created (true by default)
create: true

# -- Deployment strategy type for OtelCollector
# ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
updateStrategy:
type: RollingUpdate
# rollingUpdate:
# maxSurge: 25%
# maxUnavailable: 25%

# OtelCollector Service Account
serviceAccount:
# Specifies whether a service account should be created
Expand Down Expand Up @@ -1984,7 +2024,7 @@ otelCollectorMetrics:
tag: 0.102.0
pullPolicy: IfNotPresent

# -- Image Registry Secret Names for OtelCollector
# -- Image Registry Secret Names for OtelCollectorMetrics
# If set, this has higher precedence than the root level or global value of imagePullSecrets.
imagePullSecrets: []

Expand All @@ -2000,6 +2040,14 @@ otelCollectorMetrics:
# -- Specifies whether a configMap should be created (true by default)
create: true

# -- Deployment strategy type for OtelCollectorMetrics
# ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy
updateStrategy:
type: RollingUpdate
# rollingUpdate:
# maxSurge: 25%
# maxUnavailable: 25%

# OtelCollectorMetrics Service Account
serviceAccount:
# Specifies whether a service account should be created
Expand Down
Loading