Skip to content

Commit

Permalink
add vsphere ELB config
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaozhanqi committed Mar 4, 2024
1 parent 10b7251 commit 6026a5b
Show file tree
Hide file tree
Showing 5 changed files with 125 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2632,6 +2632,20 @@ tests:
test:
- chain: openshift-e2e-test-qe-destructive
workflow: cucushift-installer-rehearse-vsphere-ipi-zones-multisubnets-external-lb
- as: vsphere-ipi-zones-multisubnets-external-lb-usermanaged-f28
cron: 59 19 26 * *
steps:
cluster_profile: vsphere-multizone-2
env:
E2E_RUN_TAGS: '@vsphere-ipi and @network-ovnkubernetes and not @fips'
LB_TYPE: UserManaged
leases:
- count: 2
env: VSPHERE_EXTRA_LEASED_RESOURCE
resource_type: vsphere-multizone-2-quota-slice
test:
- chain: openshift-e2e-test-qe
workflow: cucushift-installer-rehearse-vsphere-ipi-zones-multisubnets-external-lb
- as: vsphere-ipi-zones-tp-f28
cron: 35 3 3 * *
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29851,6 +29851,94 @@ periodics:
- name: result-aggregator
secret:
secretName: result-aggregator
- agent: kubernetes
cluster: vsphere02
cron: 59 19 26 * *
decorate: true
decoration_config:
skip_cloning: true
extra_refs:
- base_ref: release-4.16
org: openshift
repo: openshift-tests-private
labels:
ci-operator.openshift.io/cloud: vsphere
ci-operator.openshift.io/cloud-cluster-profile: vsphere-multizone-2
ci-operator.openshift.io/variant: amd64-nightly
ci.openshift.io/generator: prowgen
job-release: "4.16"
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: periodic-ci-openshift-openshift-tests-private-release-4.16-amd64-nightly-vsphere-ipi-zones-multisubnets-external-lb-usermanaged-f28
spec:
containers:
- args:
- --gcs-upload-secret=/secrets/gcs/service-account.json
- --image-import-pull-secret=/etc/pull-secret/.dockerconfigjson
- --lease-server-credentials-file=/etc/boskos/credentials
- --oauth-token-path=/usr/local/github-credentials/oauth
- --report-credentials-file=/etc/report/credentials
- --secret-dir=/secrets/ci-pull-credentials
- --secret-dir=/usr/local/vsphere-ipi-zones-multisubnets-external-lb-usermanaged-f28-cluster-profile
- --target=vsphere-ipi-zones-multisubnets-external-lb-usermanaged-f28
- --variant=amd64-nightly
command:
- ci-operator
image: ci-operator:latest
imagePullPolicy: Always
name: ""
resources:
requests:
cpu: 10m
volumeMounts:
- mountPath: /etc/boskos
name: boskos
readOnly: true
- mountPath: /secrets/ci-pull-credentials
name: ci-pull-credentials
readOnly: true
- mountPath: /usr/local/vsphere-ipi-zones-multisubnets-external-lb-usermanaged-f28-cluster-profile
name: cluster-profile
- mountPath: /secrets/gcs
name: gcs-credentials
readOnly: true
- mountPath: /usr/local/github-credentials
name: github-credentials-openshift-ci-robot-private-git-cloner
readOnly: true
- mountPath: /secrets/manifest-tool
name: manifest-tool-local-pusher
readOnly: true
- mountPath: /etc/pull-secret
name: pull-secret
readOnly: true
- mountPath: /etc/report
name: result-aggregator
readOnly: true
serviceAccountName: ci-operator
volumes:
- name: boskos
secret:
items:
- key: credentials
path: credentials
secretName: boskos-credentials
- name: ci-pull-credentials
secret:
secretName: ci-pull-credentials
- name: cluster-profile
secret:
secretName: cluster-secrets-vsphere
- name: github-credentials-openshift-ci-robot-private-git-cloner
secret:
secretName: github-credentials-openshift-ci-robot-private-git-cloner
- name: manifest-tool-local-pusher
secret:
secretName: manifest-tool-local-pusher
- name: pull-secret
secret:
secretName: registry-pull-credentials
- name: result-aggregator
secret:
secretName: result-aggregator
- agent: kubernetes
cluster: vsphere02
cron: 35 3 3 * *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ workflow:
pre:
- chain: cucushift-installer-rehearse-vsphere-ipi-zones-multisubnets-external-lb-provision
post:
- ref: cucushift-hypershift-extended-debug
- chain: cucushift-installer-rehearse-vsphere-ipi-external-lb-pre-deprovision
documentation: |-
This is the workflow to trigger Prow's rehearsal test when submitting installer steps/chain/workflow
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ declare vsphere_extra_portgroup_2
source "${SHARED_DIR}/vsphere_context.sh"
# shellcheck source=/dev/null
source "${SHARED_DIR}/govc.sh"
declare -a vips
mapfile -t vips < "${SHARED_DIR}"/vips.txt
APIVIP=${vips[0]}
INGRESSVIP=${vips[1]}
export APIVIP
export INGRESSVIP

CONFIG="${SHARED_DIR}/install-config.yaml"
base_domain=$(<"${SHARED_DIR}"/basedomain.txt)
Expand Down Expand Up @@ -99,6 +105,17 @@ networking:
machineNetwork:
- cidr: "${machine_cidr}"
EOF

# if loadbalancer is UserManaged, it's mean using external LB,
# then keepalived and haproxy will not deployed, but coredns still keep

if [ ${LB_TYPE} = "UserManaged" ]; then
if [ ! -f /tmp/yq ]; then
curl -L https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -o /tmp/yq && chmod +x /tmp/yq
fi
/tmp/yq e --inplace '.platform.vsphere.apiVIPs += [strenv(APIVIP)],.platform.vsphere.ingressVIPs += [strenv(INGRESSVIP)]' ${CONFIG}
/tmp/yq e --inplace '.platform.vsphere.loadBalancer.type += "UserManaged"' ${CONFIG}
fi
# TODO: Add this back in once we have an vsphere
# environment that will support topology storage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ ref:
as: ipi-conf-vsphere-zones-multisubnets
from: upi-installer
commands: ipi-conf-vsphere-zones-multisubnets-commands.sh
env:
- name: LB_TYPE
default: OpenShiftManagedDefault
documentation: |-
There are two values: OpenShiftManagedDefault and UserManaged, if UserManaged will use external LB.
resources:
requests:
cpu: 10m
Expand Down

0 comments on commit 6026a5b

Please sign in to comment.