Skip to content
Open
Show file tree
Hide file tree
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 @@ -4,7 +4,6 @@ chain:
- chain: ipi-conf-vsphere-zones
- ref: ipi-conf-vsphere-template
- ref: upi-conf-vsphere-ova
- ref: upi-conf-vsphere-ova-vcm
- chain: ipi-install-vsphere
- ref: enable-qe-catalogsource
- chain: cucushift-installer-check
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ chain:
- ref: upi-conf-vsphere
- ref: upi-conf-vsphere-dns
- ref: upi-conf-vsphere-ova
- ref: upi-conf-vsphere-ova-vcm
- ref: upi-install-vsphere
- ref: enable-qe-catalogsource-disconnected
- ref: mirror-images-tag-images
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ chain:
- ref: upi-conf-vsphere
- ref: upi-conf-vsphere-dns
- ref: upi-conf-vsphere-ova
- ref: upi-conf-vsphere-ova-vcm
- ref: upi-install-vsphere
- ref: mirror-images-by-oc-adm-in-bastion
- ref: vsphere-disconnecting-network
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ chain:
- ref: upi-conf-vsphere
- ref: upi-conf-vsphere-dns
- ref: upi-conf-vsphere-ova
- ref: upi-conf-vsphere-ova-vcm
- ref: sdn-conf
- ref: upi-install-vsphere
- ref: enable-qe-catalogsource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ chain:
- ref: upi-conf-vsphere
- ref: upi-conf-vsphere-dns
- ref: upi-conf-vsphere-ova
- ref: upi-conf-vsphere-ova-vcm
- ref: sdn-conf
- ref: upi-install-vsphere
- ref: enable-qe-catalogsource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ chain:
- ref: upi-conf-vsphere-vcm
- ref: upi-conf-vsphere-dns
- ref: upi-conf-vsphere-ova
- ref: upi-conf-vsphere-ova-vcm
- ref: upi-install-vsphere
- ref: enable-qe-catalogsource
- chain: cucushift-installer-check
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ chain:
- ref: upi-conf-vsphere
- ref: upi-conf-vsphere-dns
- ref: upi-conf-vsphere-ova
- ref: upi-conf-vsphere-ova-vcm
- ref: upi-install-vsphere
- ref: enable-qe-catalogsource
- chain: cucushift-installer-check
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,13 @@ def main():
logger.critical("JOB_NAME_SAFE is undefined")
sys.exit(1)

vsphere_additional_cluster = os.environ.get("VSPHERE_ADDITIONAL_CLUSTER", "false")

base_domain = "vmc-ci.devcluster.openshift.com"
with open(f"{shared_dir}/basedomain.txt", "w") as base_domain_file:
logger.info(f"base_domain: {base_domain}")
base_domain_file.write(f"{base_domain}")

namespace = os.environ.get("NAMESPACE")
unique_name = os.environ.get("UNIQUE_HASH")
cluster_name = f"{namespace}-{unique_name}"
Expand All @@ -127,8 +129,9 @@ def main():
with open(f"{shared_dir}/vips.txt", "r") as vip_file:
vips = vip_file.readlines()

if len(vips) < 2:
logger.critical("reading vips.txt resulted in a list less than 2, exiting")
min_vips = 4 if vsphere_additional_cluster == "true" else 2
if len(vips) < min_vips:
logger.critical(f"reading vips.txt resulted in {len(vips)} vips, need at least {min_vips}, exiting")
sys.exit(1)

# empty change dictionary for batch and change_resource_record_sets
Expand All @@ -152,6 +155,20 @@ def main():
# *.apps.<cluster_domain> wildcard
resource_names = [f"api.{cluster_domain}", f"*.apps.{cluster_domain}"]

# When VSPHERE_ADDITIONAL_CLUSTER is true, add spoke cluster DNS records
# and write additional_cluster.sh for downstream consumers (e.g. hive e2e)
if vsphere_additional_cluster == "true":
additional_cluster_name = f"hive-{cluster_name}-spoke"
additional_cluster_domain = f"{additional_cluster_name}.{base_domain}"
resource_names.append(f"api.{additional_cluster_domain}")
resource_names.append(f"*.apps.{additional_cluster_domain}")

with open(f"{shared_dir}/additional_cluster.sh", "w") as ac_file:
ac_file.write(f"export ADDITIONAL_CLUSTER_NAME={additional_cluster_name}\n")
ac_file.write(f"export ADDITIONAL_CLUSTER_API_VIP={vips[2].strip()}\n")
ac_file.write(f"export ADDITIONAL_CLUSTER_INGRESS_VIP={vips[3].strip()}\n")
logger.info(f"wrote additional_cluster.sh for spoke {additional_cluster_name}")

# Windows nodes _still_ require api-int.<cluster_domain>
# This _should_ _not_ be here as we are not properly testing
# static pod coredns
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
ref:
as: ipi-conf-vsphere-dns
from: tools
commands: ipi-conf-vsphere-dns-commands.sh
from: vsphere-ci-python
commands: ipi-conf-vsphere-dns-commands.py
run_as_script: true
env:
- name: VSPHERE_ADDITIONAL_CLUSTER
default: "false"
Expand All @@ -16,8 +17,8 @@ ref:
name: ci-route-53
mount_path: /var/run/vault/vsphere
documentation: >-
Uses VIPs in ${SHARED_DIR}/vips.txt to create route53 dns records. Outputs
Uses VIPs in ${SHARED_DIR}/vips.txt to create Route53 DNS records. Outputs
${SHARED_DIR}/basedomain.txt to ensure consistent basedomain in conf and
deprovision steps. Saves batch job to delete DNS records to
${SHARED_DIR}/dns-delete.json for use in deprovisioning, with the hosted
zone ID in ${SHARED_DIR}/hosted-zone.txt.
deprovision steps. When VSPHERE_ADDITIONAL_CLUSTER is true, also creates
DNS records for the spoke cluster and writes ${SHARED_DIR}/additional_cluster.sh
with spoke cluster metadata for downstream consumers (e.g. hive e2e).
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ chain:
- ref: ipi-conf
- ref: ipi-conf-telemetry
- ref: ipi-conf-vsphere
- ref: ipi-conf-vsphere-vcm
- ref: ipi-install-monitoringpvc
documentation: >-
The vSphere IPI configure step chain generates prerequisites for installing
Expand Down
Loading