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

fix(clickhouse-operator): pin docker image version #371

Merged
merged 4 commits into from
May 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions charts/posthog/templates/clickhouse-operator/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# NAMESPACE=posthog
# COMMENT=
# OPERATOR_IMAGE=altinity/clickhouse-operator:latest
# OPERATOR_IMAGE=altinity/clickhouse-operator:0.19.0
# METRICS_EXPORTER_IMAGE=altinity/metrics-exporter:latest
#
# Setup Deployment for clickhouse-operator
Expand Down Expand Up @@ -47,7 +47,7 @@ spec:
name: etc-clickhouse-operator-usersd-files
containers:
- name: clickhouse-operator
image: altinity/clickhouse-operator:latest
image: altinity/clickhouse-operator:0.19.0
imagePullPolicy: Always
volumeMounts:
- name: etc-clickhouse-operator-folder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ the manifest should match the snapshot when using default values:
resourceFieldRef:
containerName: clickhouse-operator
resource: limits.memory
image: altinity/clickhouse-operator:latest
image: altinity/clickhouse-operator:0.19.0
imagePullPolicy: Always
name: clickhouse-operator
volumeMounts:
Expand Down
15 changes: 10 additions & 5 deletions scripts/clickhouse_operator_sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ URL="https://raw.githubusercontent.com/Altinity/clickhouse-operator/${CLICKHOUSE
#
OPERATOR_NAMESPACE="${OPERATOR_NAMESPACE:-test-clickhouse-operator}"
METRICS_EXPORTER_NAMESPACE="${OPERATOR_NAMESPACE}"
OPERATOR_IMAGE="${OPERATOR_IMAGE:-altinity/clickhouse-operator:latest}"
# NOTE: we pin to 0.19.0 here which is different to the 0.16.1 manifest version.
# Prior to pinning we were specifying latest, so to ensure that the version
# doesn't change on existing installs we pin to latest as of writing, thereby
# mitigating the possibility that chart will unexpectedly update, while also
# maintaining current functionality.
OPERATOR_IMAGE="${OPERATOR_IMAGE:-altinity/clickhouse-operator:0.19.0}"
METRICS_EXPORTER_IMAGE="${METRICS_EXPORTER_IMAGE:-altinity/metrics-exporter:latest}"

curl -s "${URL}" | \
Expand Down Expand Up @@ -57,16 +62,16 @@ kubectl-slice -f "$TMP_FOLDER/clickhouse-operator.yaml" -o "${CHART_PATH}/templa
FILES="${CHART_PATH}/templates/clickhouse-operator/*"
for f in $FILES
do
sed -i '' '1i\
sed -i'' '1i\
{{- if .Values.clickhouse.enabled }}
' "$f"

sed -i '' '$a\
sed -i'' '$a\
{{- end }}
' "$f"

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

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

done