Skip to content

Commit 63c0b69

Browse files
committed
Fix installer to default template URL to OPERATOR_VERSION
1 parent 43be7b8 commit 63c0b69

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

deploy/operator-web-installer/clickhouse-operator-install.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,16 +143,21 @@ check_envsubst_available
143143
MANIFEST="${MANIFEST:-""}"
144144
# Template can have params to substitute
145145
DEFAULT_TEMPLATE="https://raw.githubusercontent.com/Altinity/clickhouse-operator/master/deploy/operator/clickhouse-operator-install-template.yaml"
146-
TEMPLATE="${TEMPLATE:-"${DEFAULT_TEMPLATE}"}"
146+
TEMPLATE="${TEMPLATE:-${DEFAULT_TEMPLATE}}"
147147
# Namespace to install operator
148148
OPERATOR_NAMESPACE="${OPERATOR_NAMESPACE:-"kube-system"}"
149149
METRICS_EXPORTER_NAMESPACE="${OPERATOR_NAMESPACE}"
150+
# Whether OPERATOR_VERSION was explicitly set (non-empty)
150151
# Operator's docker image
151152
if [[ -z "${OPERATOR_VERSION}" ]]; then
152153
# Going for default template
153154
RELEASE_VERSION=$(get_file https://raw.githubusercontent.com/Altinity/clickhouse-operator/master/release)
155+
OPERATOR_VERSION="${RELEASE_VERSION}"
156+
else
157+
TEMPLATE="https://raw.githubusercontent.com/Altinity/clickhouse-operator/${OPERATOR_VERSION}/deploy/operator/clickhouse-operator-install-template.yaml"
158+
RELEASE_VERSION=${OPERATOR_VERSION}
154159
fi
155-
OPERATOR_VERSION="${OPERATOR_VERSION:-"${RELEASE_VERSION}"}"
160+
156161
OPERATOR_IMAGE="${OPERATOR_IMAGE:-"altinity/clickhouse-operator:${OPERATOR_VERSION}"}"
157162
OPERATOR_IMAGE_PULL_POLICY="${OPERATOR_IMAGE_PULL_POLICY:-"Always"}"
158163
METRICS_EXPORTER_IMAGE="${METRICS_EXPORTER_IMAGE:-"altinity/metrics-exporter:${OPERATOR_VERSION}"}"
@@ -199,4 +204,4 @@ elif [[ ! -z "${TEMPLATE}" ]]; then
199204
)
200205
else
201206
echo "Neither manifest nor template available. Abort."
202-
fi
207+
fi

0 commit comments

Comments
 (0)