Skip to content

Commit 8b8e92c

Browse files
author
Harry Waye
authored
fix(clickhouse-operator): pin docker image version (#371)
* fix(clickhouse-operator): pin docker image version Previously we were using the latest available image. Here we pin to the latest image. It looks like they version the chart and the operator image the same. It may be worth pinning them to the same version. However, this will cause the operator to downgrade in existing installs, so here I'm opting to try to keep the image version the same as current installs. * update snapshot; * Add comment * fix
1 parent 744da29 commit 8b8e92c

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

charts/posthog/templates/clickhouse-operator/deployment.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#
44
# NAMESPACE=posthog
55
# COMMENT=
6-
# OPERATOR_IMAGE=altinity/clickhouse-operator:latest
6+
# OPERATOR_IMAGE=altinity/clickhouse-operator:0.19.0
77
# METRICS_EXPORTER_IMAGE=altinity/metrics-exporter:latest
88
#
99
# Setup Deployment for clickhouse-operator
@@ -47,7 +47,7 @@ spec:
4747
name: etc-clickhouse-operator-usersd-files
4848
containers:
4949
- name: clickhouse-operator
50-
image: altinity/clickhouse-operator:latest
50+
image: altinity/clickhouse-operator:0.19.0
5151
imagePullPolicy: Always
5252
volumeMounts:
5353
- name: etc-clickhouse-operator-folder

charts/posthog/tests/clickhouse-operator/__snapshot__/deployment.yaml.snap

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ the manifest should match the snapshot when using default values:
6262
resourceFieldRef:
6363
containerName: clickhouse-operator
6464
resource: limits.memory
65-
image: altinity/clickhouse-operator:latest
65+
image: altinity/clickhouse-operator:0.19.0
6666
imagePullPolicy: Always
6767
name: clickhouse-operator
6868
volumeMounts:

scripts/clickhouse_operator_sync.sh

+10-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ URL="https://raw.githubusercontent.com/Altinity/clickhouse-operator/${CLICKHOUSE
2828
#
2929
OPERATOR_NAMESPACE="${OPERATOR_NAMESPACE:-test-clickhouse-operator}"
3030
METRICS_EXPORTER_NAMESPACE="${OPERATOR_NAMESPACE}"
31-
OPERATOR_IMAGE="${OPERATOR_IMAGE:-altinity/clickhouse-operator:latest}"
31+
# NOTE: we pin to 0.19.0 here which is different to the 0.16.1 manifest version.
32+
# Prior to pinning we were specifying latest, so to ensure that the version
33+
# doesn't change on existing installs we pin to latest as of writing, thereby
34+
# mitigating the possibility that chart will unexpectedly update, while also
35+
# maintaining current functionality.
36+
OPERATOR_IMAGE="${OPERATOR_IMAGE:-altinity/clickhouse-operator:0.19.0}"
3237
METRICS_EXPORTER_IMAGE="${METRICS_EXPORTER_IMAGE:-altinity/metrics-exporter:latest}"
3338

3439
curl -s "${URL}" | \
@@ -57,16 +62,16 @@ kubectl-slice -f "$TMP_FOLDER/clickhouse-operator.yaml" -o "${CHART_PATH}/templa
5762
FILES="${CHART_PATH}/templates/clickhouse-operator/*"
5863
for f in $FILES
5964
do
60-
sed -i '' '1i\
65+
sed -i'' '1i\
6166
{{- if .Values.clickhouse.enabled }}
6267
' "$f"
6368

64-
sed -i '' '$a\
69+
sed -i'' '$a\
6570
{{- end }}
6671
' "$f"
6772

68-
sed -i '' 's/#namespace: posthog$/namespace: {{ .Values.clickhouse.namespace | default .Release.Namespace }}/g' "$f"
73+
sed -i'' 's/#namespace: posthog$/namespace: {{ .Values.clickhouse.namespace | default .Release.Namespace }}/g' "$f"
6974

70-
sed -i '' 's/namespace: posthog$/namespace: {{ .Values.clickhouse.namespace | default .Release.Namespace }}/g' "$f"
75+
sed -i'' 's/namespace: posthog$/namespace: {{ .Values.clickhouse.namespace | default .Release.Namespace }}/g' "$f"
7176

7277
done

0 commit comments

Comments
 (0)