Skip to content

Commit

Permalink
MCE: adjust hypershift-mce-install step to support disconnected OVERRIDE
Browse files Browse the repository at this point in the history
  • Loading branch information
LiangquanLi930 committed Jan 7, 2025
1 parent 88e54a4 commit 36dfe5c
Show file tree
Hide file tree
Showing 8 changed files with 263 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ tests:
IP_STACK: v4v6
LVM_OPERATOR_SUB_CHANNEL: stable-4.17
MCE_VERSION: "2.7"
OVERRIDE_HO_IMAGE: virthost.ostest.test.metalkube.org:6001/openshifttest/hypershift:liangli0105-417
workflow: hypershift-mce-agent-disconnected-conformance
- as: e2e-agent-connected-ovn-ipv4-metal3-oadp
cron: 0 4 * * *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ releases:
architecture: amd64
channel: candidate
version: "4.18"
419-latest:
candidate:
product: ocp
stream: nightly
version: "4.19"
resources:
'*':
requests:
Expand Down Expand Up @@ -112,6 +117,7 @@ tests:
env:
LVM_OPERATOR_SUB_CHANNEL: stable-4.18
MCE_VERSION: "2.8"
OVERRIDE_HO_IMAGE: virthost.ostest.test.metalkube.org:6001/openshifttest/hypershift:liangli0106-1
workflow: hypershift-mce-agent-disconnected-conformance
- as: e2e-agent-disconnected-ovn-dualstack-metal3-conformance
cron: 0 20 * * *
Expand All @@ -129,6 +135,7 @@ tests:
IP_STACK: v4v6
LVM_OPERATOR_SUB_CHANNEL: stable-4.18
MCE_VERSION: "2.8"
OVERRIDE_HO_IMAGE: virthost.ostest.test.metalkube.org:6001/openshifttest/hypershift:liangli0106-1
workflow: hypershift-mce-agent-disconnected-conformance
- as: e2e-agent-connected-ovn-ipv4-metal3-oadp
cron: 0 4 * * *
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
base_images:
assisted-service-scripts:
name: ocm-2.13
namespace: edge-infrastructure
tag: assisted-service-scripts
dev-scripts:
name: test
namespace: ocp-kni
tag: dev-scripts
hypershift-operator:
name: hypershift-operator
namespace: hypershift
tag: latest
hypershift-tests:
name: hypershift-tests
namespace: hypershift
tag: latest
test-bin:
name: "4.19"
namespace: ocp
tag: hypershift-tests
upi-installer:
name: "4.19"
namespace: ocp
tag: upi-installer
releases:
latest:
candidate:
product: ocp
stream: ci
version: "4.18"
multi-latest:
candidate:
architecture: multi
product: ocp
stream: nightly
version: "4.18"
stable-latest:
release:
architecture: amd64
channel: candidate
version: "4.18"
resources:
'*':
requests:
cpu: 100m
memory: 200Mi
tests:
- as: e2e-agent-disconnected-ovn-ipv6-metal3-conformance
cron: 0 16 * * *
steps:
cluster_profile: equinix-ocp-hcp
env:
LVM_OPERATOR_SUB_CHANNEL: stable-4.19
MCE_VERSION: "2.8"
OVERRIDE_HO_IMAGE: virthost.ostest.test.metalkube.org:6001/openshifttest/hypershift:liangli0106-1
# OVERRIDE_HO_IMAGE: virthost.ostest.test.metalkube.org:6001/openshifttest/hypershift:liangli0105-8
workflow: hypershift-mce-agent-disconnected-conformance
- as: e2e-agent-disconnected-ovn-dualstack-metal3-conformance
cron: 0 16 * * *
steps:
cluster_profile: equinix-ocp-hcp
env:
DEVSCRIPTS_CONFIG: |
IP_STACK=v4v6
MIRROR_IMAGES=true
NETWORK_TYPE=OVNKubernetes
VM_EXTRADISKS=true
VM_EXTRADISKS_LIST=vda
VM_EXTRADISKS_SIZE=500G
NUM_EXTRA_WORKERS=3
IP_STACK: v4v6
LVM_OPERATOR_SUB_CHANNEL: stable-4.19
MCE_VERSION: "2.8"
OVERRIDE_HO_IMAGE: virthost.ostest.test.metalkube.org:6001/openshifttest/hypershift:liangli0106-1
# OVERRIDE_HO_IMAGE: virthost.ostest.test.metalkube.org:6001/openshifttest/hypershift:liangli0105-8
workflow: hypershift-mce-agent-disconnected-conformance
zz_generated_metadata:
branch: release-4.19
org: openshift
repo: hypershift
variant: periodics-mce
Original file line number Diff line number Diff line change
Expand Up @@ -1432,3 +1432,153 @@ periodics:
- name: result-aggregator
secret:
secretName: result-aggregator
- agent: kubernetes
cluster: build01
cron: 0 16 * * *
decorate: true
decoration_config:
skip_cloning: true
extra_refs:
- base_ref: release-4.19
org: openshift
repo: hypershift
labels:
ci-operator.openshift.io/cloud: equinix-ocp-metal
ci-operator.openshift.io/cloud-cluster-profile: equinix-ocp-hcp
ci-operator.openshift.io/variant: periodics-mce
ci.openshift.io/generator: prowgen
job-release: "4.18"
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: periodic-ci-openshift-hypershift-release-4.19-periodics-mce-e2e-agent-disconnected-ovn-dualstack-metal3-conformance
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
- --report-credentials-file=/etc/report/credentials
- --secret-dir=/secrets/ci-pull-credentials
- --target=e2e-agent-disconnected-ovn-dualstack-metal3-conformance
- --variant=periodics-mce
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: /secrets/gcs
name: gcs-credentials
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: 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: build01
cron: 0 16 * * *
decorate: true
decoration_config:
skip_cloning: true
extra_refs:
- base_ref: release-4.19
org: openshift
repo: hypershift
labels:
ci-operator.openshift.io/cloud: equinix-ocp-metal
ci-operator.openshift.io/cloud-cluster-profile: equinix-ocp-hcp
ci-operator.openshift.io/variant: periodics-mce
ci.openshift.io/generator: prowgen
job-release: "4.18"
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: periodic-ci-openshift-hypershift-release-4.19-periodics-mce-e2e-agent-disconnected-ovn-ipv6-metal3-conformance
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
- --report-credentials-file=/etc/report/credentials
- --secret-dir=/secrets/ci-pull-credentials
- --target=e2e-agent-disconnected-ovn-ipv6-metal3-conformance
- --variant=periodics-mce
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: /secrets/gcs
name: gcs-credentials
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: 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
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ fi
--api-server-address=api.${CLUSTER_NAME}.${BASEDOMAIN} \
--image-content-sources "${SHARED_DIR}/mgmt_icsp.yaml" \
--ssh-key="${SHARED_DIR}/id_rsa.pub" \
--release-image ${RELEASE_IMAGE}
--release-image ${RELEASE_IMAGE} --render-sensitive --render > /tmp/cluster-agent.yaml

oc apply -f /tmp/cluster-agent.yaml

if (( $(awk 'BEGIN {print ("'"$MCE_VERSION"'" < 2.4)}') )); then
echo "MCE version is less than 2.4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ workflow:
allow_best_effort_post_steps: true
allow_skip_on_success: true
post:
- ref: wait
- chain: hypershift-mce-agent-destroy
- chain: baremetalds-ipi-post
test:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,21 @@ echo "wait for addon to Available"
oc wait --timeout=5m --for=condition=Available -n local-cluster ManagedClusterAddOn/hypershift-addon
oc wait --timeout=5m --for=condition=Degraded=False -n local-cluster ManagedClusterAddOn/hypershift-addon
if [[ ${OVERRIDE_HO_IMAGE} ]] ; then
if [[ $MCE_QE_CATALOG == "true" ]]; then
oc apply -f - <<EOF
apiVersion: operator.openshift.io/v1alpha1
kind: ImageContentSourcePolicy
metadata:
name: hypershift-repo
spec:
repositoryDigestMirrors:
- mirrors:
- $(head -n 1 "${SHARED_DIR}/mirror_registry_url" | sed 's/5000/6001/g')/hypershift
source: quay.io/hypershift
EOF
echo "Waiting for the new ImageContentSourcePolicy to be updated on machines"
oc wait clusteroperators/machine-config --for=condition=Upgradeable=true --timeout=25m
fi
oc apply -f - <<EOF
apiVersion: v1
kind: ConfigMap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ ref:
documentation: If true, the QE catalog will be used to create MCE
- name: OVERRIDE_HO_IMAGE
default: ""
documentation: "Override the HyperShift operator image. If the default is an empty string, this will not override."
documentation: |-
Override the HyperShift operator image. If the default is an empty string, this will not override.
If in disconnected env also need to set MCE_QE_CATALOG: "true"
E.g: quay.io/hypershift/hypershift-operator:latest
commands: hypershift-mce-install-commands.sh
resources:
requests:
Expand Down

0 comments on commit 36dfe5c

Please sign in to comment.