Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci-operator/templates/openshift/installer/cluster-launch-installer-upi-e2e: Push AWS-specific default BASE_DOMAIN down into the template #5151

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ parameters:
- name: RELEASE_IMAGE_LATEST
required: true
- name: BASE_DOMAIN
value: origin-ci-int-aws.dev.rhcloud.com
required: true
- name: BUILD_ID
required: false

Expand Down Expand Up @@ -402,10 +400,12 @@ objects:
export PULL_SECRET=$(cat "${PULL_SECRET_PATH}")

if [[ "${CLUSTER_TYPE}" == "aws" ]]; then
base_domain="${BASE_DOMAIN:-origin-ci-int-aws.dev.rhcloud.com}"
echo "FIXME: Base domain: '${base_domain}"
MACHINE_CIDR=10.0.0.0/16
cat > /tmp/artifacts/installer/install-config.yaml << EOF
apiVersion: v1
baseDomain: ${BASE_DOMAIN}
baseDomain: ${base_domain}
metadata:
name: ${CLUSTER_NAME}
controlPlane:
Expand Down Expand Up @@ -442,12 +442,13 @@ objects:
openshift-install --dir=/tmp/artifacts/installer create manifests
rm -f /tmp/artifacts/installer/openshift/99_openshift-cluster-api_master-machines-*.yaml /tmp/artifacts/installer/openshift/99_openshift-cluster-api_worker-machinesets-*.yaml
elif [[ "${CLUSTER_TYPE}" == "vsphere" ]]; then
base_domain="${BASE_DOMAIN:-origin-ci-int-aws.dev.rhcloud.com}"
# Get user and password from TFVARS_PATH
export VSPHERE_USER=$(grep -oP 'vsphere_user="\K[^"]+' ${TFVARS_PATH})
export VSPHERE_PASSWORD=$(grep -oP 'vsphere_password="\K[^"]+' ${TFVARS_PATH})
cat > /tmp/artifacts/installer/install-config.yaml << EOF
apiVersion: v1beta4
baseDomain: ${BASE_DOMAIN}
baseDomain: ${base_domain}
metadata:
name: ${CLUSTER_NAME}
networking:
Expand Down Expand Up @@ -507,8 +508,8 @@ objects:
IGNITION_CA="$(jq '.ignition.security.tls.certificateAuthorities[0].source' /tmp/artifacts/installer/master.ign)" # explicitly keeping wrapping quotes

HOSTED_ZONE="$(aws route53 list-hosted-zones-by-name \
--dns-name "${BASE_DOMAIN}" \
--query "HostedZones[? Config.PrivateZone != \`true\` && Name == \`${BASE_DOMAIN}.\`].Id" \
--dns-name "${base_domain}" \
--query "HostedZones[? Config.PrivateZone != \`true\` && Name == \`${base_domain}.\`].Id" \
--output text)"

aws cloudformation create-stack --stack-name "${CLUSTER_NAME}-vpc" \
Expand Down Expand Up @@ -539,7 +540,7 @@ objects:
ParameterKey=ClusterName,ParameterValue="${CLUSTER_NAME}" \
ParameterKey=InfrastructureName,ParameterValue="${INFRA_ID}" \
ParameterKey=HostedZoneId,ParameterValue="${HOSTED_ZONE}" \
ParameterKey=HostedZoneName,ParameterValue="${BASE_DOMAIN}" \
ParameterKey=HostedZoneName,ParameterValue="${base_domain}" \
ParameterKey=VpcId,ParameterValue="${VPC_ID}" \
ParameterKey=PrivateSubnets,ParameterValue="${PRIVATE_SUBNETS}" \
ParameterKey=PublicSubnets,ParameterValue="${PUBLIC_SUBNETS}" &
Expand Down Expand Up @@ -612,12 +613,12 @@ objects:
ParameterKey=InfrastructureName,ParameterValue="${INFRA_ID}" \
ParameterKey=RhcosAmi,ParameterValue="${RHCOS_AMI}" \
ParameterKey=PrivateHostedZoneId,ParameterValue="${PRIVATE_HOSTED_ZONE}" \
ParameterKey=PrivateHostedZoneName,ParameterValue="${CLUSTER_NAME}.${BASE_DOMAIN}" \
ParameterKey=PrivateHostedZoneName,ParameterValue="${CLUSTER_NAME}.${base_domain}" \
ParameterKey=Master0Subnet,ParameterValue="${PRIVATE_SUBNET_0}" \
ParameterKey=Master1Subnet,ParameterValue="${PRIVATE_SUBNET_1}" \
ParameterKey=Master2Subnet,ParameterValue="${PRIVATE_SUBNET_2}" \
ParameterKey=MasterSecurityGroupId,ParameterValue="${MASTER_SECURITY_GROUP}" \
ParameterKey=IgnitionLocation,ParameterValue="https://api-int.${CLUSTER_NAME}.${BASE_DOMAIN}:22623/config/master" \
ParameterKey=IgnitionLocation,ParameterValue="https://api-int.${CLUSTER_NAME}.${base_domain}:22623/config/master" \
ParameterKey=CertificateAuthorities,ParameterValue="${IGNITION_CA}" \
ParameterKey=MasterInstanceProfileName,ParameterValue="${MASTER_INSTANCE_PROFILE}" \
ParameterKey=RegisterNlbIpTargetsLambdaArn,ParameterValue="${NLB_IP_TARGETS_LAMBDA}" \
Expand Down Expand Up @@ -648,7 +649,7 @@ objects:
ParameterKey=RhcosAmi,ParameterValue="${RHCOS_AMI}" \
ParameterKey=Subnet,ParameterValue="${!SUBNET}" \
ParameterKey=WorkerSecurityGroupId,ParameterValue="${WORKER_SECURITY_GROUP}" \
ParameterKey=IgnitionLocation,ParameterValue="https://api-int.${CLUSTER_NAME}.${BASE_DOMAIN}:22623/config/worker" \
ParameterKey=IgnitionLocation,ParameterValue="https://api-int.${CLUSTER_NAME}.${base_domain}:22623/config/worker" \
ParameterKey=CertificateAuthorities,ParameterValue="${IGNITION_CA}" \
ParameterKey=WorkerInstanceType,ParameterValue=m4.xlarge \
ParameterKey=WorkerInstanceProfileName,ParameterValue="${WORKER_INSTANCE_PROFILE}" &
Expand Down Expand Up @@ -690,9 +691,9 @@ objects:

cluster_id = "${CLUSTER_NAME}"

base_domain = "${BASE_DOMAIN}"
base_domain = "${base_domain}"

cluster_domain = "${CLUSTER_NAME}.${BASE_DOMAIN}"
cluster_domain = "${CLUSTER_NAME}.${base_domain}"

bootstrap_ignition_url = "${BOOTSTRAP_URI}"

Expand Down