Skip to content

Commit 25dfa10

Browse files
committed
OCPEDGE-1825: [TNF] Reworked TNF logic to render fencing block conditionally.
Two Node OpenShift with Fencing (TNF) is a deployment topology with two control-plane nodes that was introduce as a Dev Preview in OpenShift 4.19. This commit updates the logic around TNF to only render fencing credentials in releases 4.19 and up, and also the sslInsecure parameter so that it uses certificateVerification in 4.20 and up, as introduced in openshift/installer#9640.
1 parent 4035a38 commit 25dfa10

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

utils.sh

+16-1
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,13 @@ EOF
304304
}
305305

306306
function node_map_to_install_config_fencing_credentials() {
307+
TNF_ENABLED_RELEASE=4.19
308+
309+
# If we didn't support TNF in this release, we skip rendering the fencing block
310+
if is_lower_version "$(openshift_version "${OCP_DIR}")" "$TNF_ENABLED_RELEASE"; then
311+
return 0
312+
fi
313+
307314
if [[ -z "${ENABLE_ARBITER:-}" ]] && [[ "${NUM_MASTERS}" -eq 2 ]]; then
308315
cat <<EOF
309316
fencing:
@@ -320,7 +327,15 @@ EOF
320327
address: ${address}
321328
username: ${username}
322329
password: ${password}
323-
sslInsecure: true
330+
EOF
331+
# We don't support overriding certificateVerification in 4.19
332+
if [ $(openshift_version "${OCP_DIR}") == "$TNF_ENABLED_RELEASE" ]; then
333+
continue
334+
fi
335+
336+
certificate_verification=$([ node_val ${idx} "driver_info.disableCertificateVerification" | tr '[:upper:]' '[:lower:]' == "true" ] && echo -n "Disabled" || echo -n "Enabled")
337+
cat <<EOF
338+
certificateVerification: ${certificate_verification}
324339
EOF
325340
done
326341
fi

0 commit comments

Comments
 (0)