Skip to content

Commit d344625

Browse files
add clickhouse-operator deployment strategy parameters to Helm chart (#1789)
* feat: add deployment strategy configuration to helm chart Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <[email protected]> * add clickhouse-operator deployment strategy parameter to Helm chart --------- Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <[email protected]>
1 parent effb88c commit d344625

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,6 @@ tests/image/cache
4949

5050
# Ignore DevSpace cache and log folder
5151
/.devspace
52+
53+
# agents
54+
.aider*

deploy/helm/clickhouse-operator/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ For upgrade please install CRDs separately:
3535
| dashboards.annotations | object | `{}` | annotations to add to a secret with dashboards |
3636
| dashboards.enabled | bool | `false` | provision grafana dashboards as configMaps (can be synced by grafana dashboards sidecar https://github.com/grafana/helm-charts/blob/grafana-8.3.4/charts/grafana/values.yaml#L778 ) |
3737
| dashboards.grafana_folder | string | `"clickhouse"` | |
38+
| deployment.strategy.type | string | `"Recreate"` | |
3839
| fullnameOverride | string | `""` | full name of the chart. |
3940
| imagePullSecrets | list | `[]` | image pull secret for private images in clickhouse-operator pod possible value format `[{"name":"your-secret-name"}]`, check `kubectl explain pod.spec.imagePullSecrets` for details |
4041
| metrics.containerSecurityContext | object | `{}` | |

deploy/helm/clickhouse-operator/templates/generated/Deployment-clickhouse-operator.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ metadata:
1818
annotations: {{ include "altinity-clickhouse-operator.annotations" . | nindent 4 }}
1919
spec:
2020
replicas: 1
21+
strategy: {{ toYaml .Values.deployment.strategy | nindent 4 }}
2122
selector:
2223
matchLabels: {{ include "altinity-clickhouse-operator.selectorLabels" . | nindent 6 }}
2324
template:

deploy/helm/clickhouse-operator/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ namespaceOverride: ""
33
commonLabels: {}
44
# commonAnnotations -- set of annotations that will be applied to all the resources for the operator
55
commonAnnotations: {}
6+
deployment:
7+
# look details in `kubectl explain deployment.spec.strategy`
8+
strategy:
9+
type: Recreate
610
operator:
711
image:
812
# operator.image.repository -- image repository

dev/generate_helm_chart.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ function update_deployment_resource() {
190190
yq e -i '.metadata.labels |= "{{ include \"altinity-clickhouse-operator.labels\" . | nindent 4 }}"' "${file}"
191191
yq e -i '.metadata.annotations |= "{{ include \"altinity-clickhouse-operator.annotations\" . | nindent 4 }}"' "${file}"
192192
yq e -i '.spec.selector.matchLabels |= "{{ include \"altinity-clickhouse-operator.selectorLabels\" . | nindent 6 }}"' "${file}"
193+
yq e -i '.spec.strategy |= "{{ toYaml .Values.deployment.strategy | nindent 4 }}"' "${file}"
193194

194195
readonly annotations=$(yq e '.spec.template.metadata.annotations' "${file}")
195196
a_data="${annotations}" yq e -i '.podAnnotations |= env(a_data)' "${values_yaml}"

0 commit comments

Comments
 (0)