From 79dbbde1683f417e1082c7097bfdb9c5957f9f28 Mon Sep 17 00:00:00 2001 From: Prashant Shahi Date: Fri, 21 Jun 2024 10:40:22 +0530 Subject: [PATCH 1/5] feat: include update strategy for all components Signed-off-by: Prashant Shahi --- .../clickhouse-operator/deployment.yaml | 8 ++- charts/clickhouse/values.yaml | 19 +++++++ .../templates/otel-agent/daemonset.yaml | 4 ++ .../templates/otel-deployment/deployment.yaml | 4 ++ charts/k8s-infra/values.yaml | 19 +++++++ .../templates/alertmanager/statefulset.yaml | 4 ++ .../signoz/templates/frontend/deployment.yaml | 4 ++ .../otel-collector-metrics/deployment.yaml | 4 ++ .../templates/otel-collector/deployment.yaml | 4 ++ .../templates/query-service/statefulset.yaml | 4 ++ charts/signoz/values.yaml | 50 ++++++++++++++++++- 11 files changed, 122 insertions(+), 2 deletions(-) diff --git a/charts/clickhouse/templates/clickhouse-operator/deployment.yaml b/charts/clickhouse/templates/clickhouse-operator/deployment.yaml index ffd2d49..4fe7801 100644 --- a/charts/clickhouse/templates/clickhouse-operator/deployment.yaml +++ b/charts/clickhouse/templates/clickhouse-operator/deployment.yaml @@ -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: diff --git a/charts/clickhouse/values.yaml b/charts/clickhouse/values.yaml index 3223c96..721a2cb 100644 --- a/charts/clickhouse/values.yaml +++ b/charts/clickhouse/values.yaml @@ -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 @@ -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 diff --git a/charts/k8s-infra/templates/otel-agent/daemonset.yaml b/charts/k8s-infra/templates/otel-agent/daemonset.yaml index 1e0b213..ed14643 100644 --- a/charts/k8s-infra/templates/otel-agent/daemonset.yaml +++ b/charts/k8s-infra/templates/otel-agent/daemonset.yaml @@ -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: diff --git a/charts/k8s-infra/templates/otel-deployment/deployment.yaml b/charts/k8s-infra/templates/otel-deployment/deployment.yaml index bd64de7..473f76f 100644 --- a/charts/k8s-infra/templates/otel-deployment/deployment.yaml +++ b/charts/k8s-infra/templates/otel-deployment/deployment.yaml @@ -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: diff --git a/charts/k8s-infra/values.yaml b/charts/k8s-infra/values.yaml index ea86151..65590fd 100644 --- a/charts/k8s-infra/values.yaml +++ b/charts/k8s-infra/values.yaml @@ -320,6 +320,14 @@ 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: 25% + maxUnavailable: 25% + configMap: # -- Specifies whether a configMap should be created (true by default) create: true @@ -670,6 +678,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 @@ -715,6 +731,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 diff --git a/charts/signoz/templates/alertmanager/statefulset.yaml b/charts/signoz/templates/alertmanager/statefulset.yaml index ba86f50..1e15a0f 100644 --- a/charts/signoz/templates/alertmanager/statefulset.yaml +++ b/charts/signoz/templates/alertmanager/statefulset.yaml @@ -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: diff --git a/charts/signoz/templates/frontend/deployment.yaml b/charts/signoz/templates/frontend/deployment.yaml index 9072f0e..8545e88 100644 --- a/charts/signoz/templates/frontend/deployment.yaml +++ b/charts/signoz/templates/frontend/deployment.yaml @@ -15,6 +15,10 @@ spec: selector: matchLabels: {{- include "frontend.selectorLabels" . | nindent 6 }} + {{- with .Values.frontend.updateStrategy }} + strategy: + {{- toYaml . | nindent 4 }} + {{- end }} template: metadata: annotations: diff --git a/charts/signoz/templates/otel-collector-metrics/deployment.yaml b/charts/signoz/templates/otel-collector-metrics/deployment.yaml index fa2977b..456e909 100644 --- a/charts/signoz/templates/otel-collector-metrics/deployment.yaml +++ b/charts/signoz/templates/otel-collector-metrics/deployment.yaml @@ -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: diff --git a/charts/signoz/templates/otel-collector/deployment.yaml b/charts/signoz/templates/otel-collector/deployment.yaml index 8fd4a36..6e0d498 100644 --- a/charts/signoz/templates/otel-collector/deployment.yaml +++ b/charts/signoz/templates/otel-collector/deployment.yaml @@ -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: diff --git a/charts/signoz/templates/query-service/statefulset.yaml b/charts/signoz/templates/query-service/statefulset.yaml index 45b8d41..b2d2fc3 100644 --- a/charts/signoz/templates/query-service/statefulset.yaml +++ b/charts/signoz/templates/query-service/statefulset.yaml @@ -14,6 +14,10 @@ spec: selector: matchLabels: {{- include "queryService.selectorLabels" . | nindent 6 }} + {{- with .Values.queryService.updateStrategy }} + updateStrategy: + {{- toYaml . | nindent 4 }} + {{- end }} template: metadata: annotations: diff --git a/charts/signoz/values.yaml b/charts/signoz/values.yaml index ea70824..3056a49 100644 --- a/charts/signoz/values.yaml +++ b/charts/signoz/values.yaml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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: [] @@ -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 From fb086e5595a976c444c25d58d6a81bf6182f2390 Mon Sep 17 00:00:00 2001 From: Prashant Shahi Date: Fri, 21 Jun 2024 10:41:29 +0530 Subject: [PATCH 2/5] =?UTF-8?q?chore(release):=20=F0=9F=94=96=20Bump=20up?= =?UTF-8?q?=20clickhouse=20to=2024.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Prashant Shahi --- charts/clickhouse/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/clickhouse/Chart.yaml b/charts/clickhouse/Chart.yaml index 5d99f84..a37b8a0 100644 --- a/charts/clickhouse/Chart.yaml +++ b/charts/clickhouse/Chart.yaml @@ -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: From 0f2d44cf26af8ab5c35e2610bbf7df7180ef5154 Mon Sep 17 00:00:00 2001 From: Prashant Shahi Date: Fri, 21 Jun 2024 10:42:13 +0530 Subject: [PATCH 3/5] =?UTF-8?q?chore(release):=20=F0=9F=94=96=20Bump=20up?= =?UTF-8?q?=20k8s-infra=20to=200.12.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Prashant Shahi --- charts/k8s-infra/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/k8s-infra/Chart.yaml b/charts/k8s-infra/Chart.yaml index 2472b58..191b387 100644 --- a/charts/k8s-infra/Chart.yaml +++ b/charts/k8s-infra/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: k8s-infra description: Helm chart for collecting metrics and logs in K8s type: application -version: 0.11.5 +version: 0.12.0 appVersion: "0.88.0" home: https://signoz.io icon: https://signoz.io/img/SigNozLogo-orange.svg From fb13b3080a13e6d799ab7bcf7440157ab8d6d480 Mon Sep 17 00:00:00 2001 From: Prashant Shahi Date: Fri, 21 Jun 2024 11:10:44 +0530 Subject: [PATCH 4/5] chore(otel-agent): update update strategy rolling update to default and comment Signed-off-by: Prashant Shahi --- charts/k8s-infra/values.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/charts/k8s-infra/values.yaml b/charts/k8s-infra/values.yaml index 65590fd..4b2ffd8 100644 --- a/charts/k8s-infra/values.yaml +++ b/charts/k8s-infra/values.yaml @@ -324,9 +324,10 @@ otelAgent: # ref: https://kubernetes.io/docs/tasks/manage-daemon/update-daemon-set/ updateStrategy: type: RollingUpdate - rollingUpdate: - maxSurge: 25% - maxUnavailable: 25% + # rollingUpdate: + # maxSurge: 0 + # maxUnavailable: 1 + # minReadySeconds: 0 configMap: # -- Specifies whether a configMap should be created (true by default) From 8a7a4f5e03e0c1432b2ade7f109eb7474315547e Mon Sep 17 00:00:00 2001 From: Prashant Shahi Date: Fri, 21 Jun 2024 14:19:45 +0530 Subject: [PATCH 5/5] chore(k8s-infra): include namespace in test-connection Signed-off-by: Prashant Shahi --- charts/k8s-infra/templates/otel-agent/tests/test-connection.yaml | 1 + .../templates/otel-deployment/tests/test-connection.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/charts/k8s-infra/templates/otel-agent/tests/test-connection.yaml b/charts/k8s-infra/templates/otel-agent/tests/test-connection.yaml index fc90bb3..f2eb738 100644 --- a/charts/k8s-infra/templates/otel-agent/tests/test-connection.yaml +++ b/charts/k8s-infra/templates/otel-agent/tests/test-connection.yaml @@ -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: diff --git a/charts/k8s-infra/templates/otel-deployment/tests/test-connection.yaml b/charts/k8s-infra/templates/otel-deployment/tests/test-connection.yaml index 2f98e33..9c8c6de 100644 --- a/charts/k8s-infra/templates/otel-deployment/tests/test-connection.yaml +++ b/charts/k8s-infra/templates/otel-deployment/tests/test-connection.yaml @@ -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: