Skip to content

Commit e9f638a

Browse files
committed
Introduce PATTERN_DISCONNECTED_HOME
When doing disconnected installations this allows for setting a single variable pointing to the internal disconnected registry.
1 parent 07f6584 commit e9f638a

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

scripts/pattern-util.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ function version {
1111
if [ -z "$PATTERN_UTILITY_CONTAINER" ]; then
1212
PATTERN_UTILITY_CONTAINER="quay.io/hybridcloudpatterns/utility-container"
1313
fi
14+
# If PATTERN_DISCONNECTED_HOME is set it will be used to populate both PATTERN_UTILITY_CONTAINER
15+
# and PATTERN_INSTALL_CHART automatically
16+
if [ -n "${PATTERN_DISCONNECTED_HOME}" ]; then
17+
PATTERN_UTILITY_CONTAINER="${PATTERN_DISCONNECTED_HOME}/utility-container"
18+
PATTERN_INSTALL_CHART="oci://${PATTERN_DISCONNECTED_HOME}/pattern-install"
19+
echo "PATTERN_DISCONNECTED_HOME is set to ${PATTERN_DISCONNECTED_HOME}"
20+
echo "Setting the following variables:"
21+
echo " PATTERN_UTILITY_CONTAINER: ${PATTERN_UTILITY_CONTAINER}"
22+
echo " PATTERN_INSTALL_CHART: ${PATTERN_INSTALL_CHART}"
23+
fi
1424

1525
readonly commands=(podman)
1626
for cmd in ${commands[@]}; do is_available "$cmd"; done
@@ -81,6 +91,7 @@ podman run -it --rm --pull=newer \
8191
-e VALUES_SECRET \
8292
-e KUBECONFIG \
8393
-e PATTERN_INSTALL_CHART \
94+
-e PATTERN_DISCONNECTED_HOME \
8495
-e K8S_AUTH_HOST \
8596
-e K8S_AUTH_VERIFY_SSL \
8697
-e K8S_AUTH_SSL_CA_CERT \

0 commit comments

Comments
 (0)