Skip to content

Commit 3067ad6

Browse files
mprahlopenshift-merge-robot
authored andcommitted
Allow multiple managed clusters in hosted mode in local environment
The following change in the registration-operator Makefile adds support for differently named managed clusters in hosted mode: open-cluster-management-io/registration-operator#311 Signed-off-by: mprahl <[email protected]>
1 parent fe071f3 commit 3067ad6

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

build/manage-clusters.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,6 @@ if [[ -n "${MANAGED_CLUSTER_COUNT//[0-9]}" ]] || [[ "${MANAGED_CLUSTER_COUNT}" =
1313
exit 1
1414
fi
1515

16-
if [[ "${MANAGED_CLUSTER_COUNT}" -gt 1 ]] && [[ "${HOSTED_MODE}" == "true" ]]; then
17-
# This is a current limitation in the registration operator Makefile where the hosted mode Klusterlet object name
18-
# is not customizable.
19-
echo "error: provided MANAGED_CLUSTER_COUNT cannot be greater than 1 in hosted mode"
20-
exit 1
21-
fi
22-
2316
KIND_PREFIX=${KIND_PREFIX:-"policy-addon-ctrl"}
2417
CLUSTER_PREFIX=${CLUSTER_PREFIX:-"cluster"}
2518

@@ -48,6 +41,7 @@ esac
4841
for i in $(seq 2 $((MANAGED_CLUSTER_COUNT+1))); do
4942
export KIND_NAME="${KIND_PREFIX}${i}"
5043
export MANAGED_CLUSTER_NAME="${CLUSTER_PREFIX}${i}"
44+
export KLUSTERLET_NAME="${MANAGED_CLUSTER_NAME}-klusterlet"
5145
case ${RUN_MODE} in
5246
delete)
5347
make kind-delete-cluster

0 commit comments

Comments
 (0)