From 68d37f390b935a82473b642c26146675e630bde5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20M=C3=ADnguez?= Date: Mon, 15 Dec 2025 12:20:43 +0100 Subject: [PATCH] make metal3.sh work for 3.4 --- .../edge-331-mgmt-cluster-metal3/custom/files/metal3.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/slemicro/eib-examples/edge-331-mgmt-cluster-metal3/custom/files/metal3.sh b/slemicro/eib-examples/edge-331-mgmt-cluster-metal3/custom/files/metal3.sh index ebc24bf..678312a 100755 --- a/slemicro/eib-examples/edge-331-mgmt-cluster-metal3/custom/files/metal3.sh +++ b/slemicro/eib-examples/edge-331-mgmt-cluster-metal3/custom/files/metal3.sh @@ -29,7 +29,8 @@ fi while ! ${KUBECTL} wait --for condition=ready -n ${METAL3_CHART_TARGETNAMESPACE} $(${KUBECTL} get pods -n ${METAL3_CHART_TARGETNAMESPACE} -l app.kubernetes.io/name=metal3-ironic -o name) --timeout=10s; do sleep 2 ; done # Get the ironic IP -IRONICIP=$(${KUBECTL} get cm -n ${METAL3_CHART_TARGETNAMESPACE} ironic-bmo -o jsonpath='{.data.IRONIC_IP}') +# 3.4 changed the CM name to just _ironic_. The following will get ironic-bmo or just ironic if it fails +IRONICIP=$(${KUBECTL} get cm -n ${METAL3_CHART_TARGETNAMESPACE} ironic-bmo -o jsonpath='{.data.IRONIC_IP}' 2>/dev/null || ${KUBECTL} get cm -n ${METAL3_CHART_TARGETNAMESPACE} ironic -o jsonpath='{.data.IRONIC_IP}' 2>/dev/null) # If LoadBalancer, use metallb, else it is NodePort if [ $(${KUBECTL} get svc -n ${METAL3_CHART_TARGETNAMESPACE} metal3-metal3-ironic -o jsonpath='{.spec.type}') == "LoadBalancer" ]; then