The test flag -z makes the node.yaml checks 4.1.7 and 4.1.8 to fail:
as -z verifies if $CAFILE is zero instead of nonzero, to enter the first if condition and set CAFILE=$kubeletcafile.
As per test man page:
-n STRING
the length of STRING is nonzero
-z STRING
the length of STRING is zero