@@ -21,6 +21,7 @@ CONTROL_NS=""
21
21
CHANNEL=" v4.13"
22
22
ODLM_CHANNEL=" v4.5"
23
23
MAINTAINED_CHANNEL=" v4.2"
24
+ SINGLETON_CHANNEL=" v4.2"
24
25
SOURCE=" opencloud-operators"
25
26
CERT_MANAGER_SOURCE=" ibm-cert-manager-catalog"
26
27
LICENSING_SOURCE=" ibm-licensing-catalog"
@@ -85,7 +86,7 @@ function main() {
85
86
arguments+=" --enable-private-catalog"
86
87
fi
87
88
88
- ${BASE_DIR} /setup_singleton.sh " --operator-namespace" " $SERVICES_NS " " -c" " $MAINTAINED_CHANNEL " " --cert-manager-source" " $CERT_MANAGER_SOURCE " " --licensing-source" " $LICENSING_SOURCE " " --license-accept" $arguments " --yq" " $YQ " " --oc" " $OC "
89
+ ${BASE_DIR} /setup_singleton.sh " --operator-namespace" " $SERVICES_NS " " -c" " $SINGLETON_CHANNEL " " --cert-manager-source" " $CERT_MANAGER_SOURCE " " --licensing-source" " $LICENSING_SOURCE " " --license-accept" $arguments " --yq" " $YQ " " --oc" " $OC "
89
90
90
91
if [ $? -ne 0 ]; then
91
92
error " Failed to migrate singleton services"
@@ -364,15 +365,21 @@ function pre_req() {
364
365
error " Channel is not semantic vx.y"
365
366
fi
366
367
367
- # When Common Service channel info is less then maintained channel, update maintained channel for backward compatibility e.g., v4.1 and v4.0
368
- # Otherwise, maintained channel is pinned at v4.2
368
+ # When Common Service channel is less than v4.2, maintained channel is the same as CS channel (e.g., v4.1 or v4.0)
369
+ # When Common Service channel is between v4.2 and v4.12, maintained channel is pinned at v4.2
370
+ # When Common Service channel is greater than v4.12, maintained channel is pinned at v4.3
371
+ # The singleton channel follows the same rule as maintained channel for channels less than v4.2
372
+
369
373
IFS=' .' read -r channel_major channel_minor <<< " ${CHANNEL#v}"
370
374
IFS=' .' read -r maintained_major maintained_minor <<< " ${MAINTAINED_CHANNEL#v}"
371
375
372
376
if (( channel_major < maintained_major )) || { (( channel_major == maintained_major )) && (( channel_minor < maintained_minor )) ; }; then
373
377
MAINTAINED_CHANNEL=" $CHANNEL "
378
+ SINGLETON_CHANNEL=" $CHANNEL "
379
+ elif (( channel_major == 4 )) && (( channel_minor > 12 )) ; then
380
+ MAINTAINED_CHANNEL=" v4.3"
374
381
fi
375
-
382
+
376
383
# When Common Service channel is less than v4.5, use maintained channel for ODLM channel
377
384
# When Common Service channel is between v4.5 and v4.10, use v4.3 for ODLM channel
378
385
# When Common Service channel is v4.11, use v4.4 for ODLM channel
0 commit comments