diff --git a/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-e2e.yaml b/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-e2e.yaml index 9d9259d5b7dd5..789cef0a367e4 100644 --- a/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-e2e.yaml +++ b/ci-operator/templates/openshift/installer/cluster-launch-installer-upi-e2e.yaml @@ -1226,43 +1226,43 @@ objects: esac echo "Azure region: ${AZURE_REGION}" - export BASE_DOMAIN_RESOURCE_GROUP="os4-common" + export BASE_DOMAIN_RESOURCE_GROUP="os4-common" base_domain="${BASE_DOMAIN:-ci.azure.devcluster.openshift.com}" - echo "Base domain: ${base_domain}" - - cat > /tmp/artifacts/installer/install-config.yaml << EOF - apiVersion: v1 - baseDomain: ${base_domain} - metadata: - name: ${CLUSTER_NAME} - controlPlane: - name: master - replicas: 3 - compute: - - name: worker - replicas: 0 - platform: - azure: - baseDomainResourceGroupName: ${BASE_DOMAIN_RESOURCE_GROUP} + echo "Base domain: ${base_domain}" + + cat > /tmp/artifacts/installer/install-config.yaml << EOF + apiVersion: v1 + baseDomain: ${base_domain} + metadata: + name: ${CLUSTER_NAME} + controlPlane: + name: master + replicas: 3 + compute: + - name: worker + replicas: 0 + platform: + azure: + baseDomainResourceGroupName: ${BASE_DOMAIN_RESOURCE_GROUP} region: ${AZURE_REGION} - pullSecret: > - ${PULL_SECRET} - sshKey: | - ${SSH_PUB_KEY} + pullSecret: > + ${PULL_SECRET} + sshKey: | + ${SSH_PUB_KEY} EOF export PATH=${HOME}/.local/bin:${PATH} echo "Creating manifests" openshift-install --dir=/tmp/artifacts/installer create manifests - + pushd /tmp/artifacts/installer echo "Editing manifests" - rm -f openshift/99_openshift-cluster-api_master-machines-*.yaml - rm -f openshift/99_openshift-cluster-api_worker-machineset-*.yaml + rm -f openshift/99_openshift-cluster-api_master-machines-*.yaml + rm -f openshift/99_openshift-cluster-api_worker-machineset-*.yaml sed -i "s;mastersSchedulable: true;mastersSchedulable: false;g" manifests/cluster-scheduler-02-config.yml - sed -i "/publicZone/,+1d" manifests/cluster-dns-02-config.yml - sed -i "/privateZone/,+1d" manifests/cluster-dns-02-config.yml + sed -i "/publicZone/,+1d" manifests/cluster-dns-02-config.yml + sed -i "/privateZone/,+1d" manifests/cluster-dns-02-config.yml popd else @@ -1893,6 +1893,9 @@ objects: # Copy sample UPI files cp -r /var/lib/openshift-install/upi/${CLUSTER_TYPE}/* /tmp/tf + # Copy Ignition to terraform directory + cp /tmp/artifacts/installer/*.ign /tmp/tf + # Create terraform.tfvars export MASTER_IGN=$(cat /tmp/artifacts/installer/master.ign) export WORKER_IGN=$(cat /tmp/artifacts/installer/worker.ign) @@ -1929,6 +1932,8 @@ objects: compute_ignition = <&1 | grep --line-buffered -v password & wait "$!" + # The image registry in some instances the config object + # is not properly configured. Rerun patching + # after cluster complete + if [[ "${CLUSTER_TYPE}" == "vsphere" ]]; then + update_image_registry + fi touch /tmp/install-complete # Performs cleanup of all created resources