Skip to content

Commit

Permalink
add hypershift upgrade from amd64 to multi arch
Browse files Browse the repository at this point in the history
  • Loading branch information
heliubj18 committed Jun 26, 2024
1 parent b201beb commit 94e91b4
Show file tree
Hide file tree
Showing 7 changed files with 155 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ build_root:
namespace: openshift
tag: golang-1.18
releases:
amd64-latest:
release:
architecture: amd64
channel: candidate
version: "4.16"
latest:
prerelease:
architecture: multi
Expand All @@ -62,6 +67,18 @@ resources:
cpu: 100m
memory: 200Mi
tests:
- as: aws-ipi-ovn-hypershift-multi-f7
cron: 44 22 7,14,23,30 * *
steps:
cluster_profile: aws-qe
env:
BASE_DOMAIN: qe.devcluster.openshift.com
HYPERSHIFT_HC_RELEASE_IMAGE: release:amd64-latest
HYPERSHIFT_TARGET_MULTIARCH: "true"
TEST_FILTERS: ~DisconnectedOnly&;~HyperShiftMGMT&;~MicroShiftOnly&;~NonHyperShiftHOST&
test:
- chain: openshift-upgrade-qe-test-hypershift-to-multi
workflow: cucushift-installer-rehearse-aws-ipi-ovn-hypershift
- as: aws-ipi-ovn-ipsec-arm-mixarch-f28
cron: 2 4 22 * *
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70173,6 +70173,93 @@ periodics:
- name: result-aggregator
secret:
secretName: result-aggregator
- agent: kubernetes
cluster: build05
cron: 44 22 7,14,23,30 * *
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: aws
ci-operator.openshift.io/cloud-cluster-profile: aws-qe
ci-operator.openshift.io/variant: multi-stable-4.16-upgrade-from-stable-4.16
ci.openshift.io/generator: prowgen
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: periodic-ci-openshift-openshift-tests-private-release-4.16-multi-stable-4.16-upgrade-from-stable-4.16-aws-ipi-ovn-hypershift-multi-f7
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/aws-ipi-ovn-hypershift-multi-f7-cluster-profile
- --target=aws-ipi-ovn-hypershift-multi-f7
- --variant=multi-stable-4.16-upgrade-from-stable-4.16
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/aws-ipi-ovn-hypershift-multi-f7-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-aws-qe
- 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: build05
cron: 2 4 22 * *
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,14 @@ oc annotate hostedcluster -n "$HYPERSHIFT_NAMESPACE" "$cluster_name" "hypershift
set +x
oc patch hostedcluster "$cluster_name" -n "$HYPERSHIFT_NAMESPACE" --type=merge -p '{"spec":{"release":{"image":"'"${OPENSHIFT_UPGRADE_RELEASE_IMAGE_OVERRIDE}"'"}}}'

if [ -n "${HYPERSHIFT_TARGET_MULTIARCH}" ]; then
echo "target hc multiarch is ${HYPERSHIFT_TARGET_MULTIARCH}"
platform=$(oc get hostedcluster "$cluster_name" -n "$HYPERSHIFT_NAMESPACE" --ignore-not-found -o=jsonpath='{.spec.platform.type}')
if [ "${platform}" == "AWS" ] ; then
oc patch hostedcluster "$cluster_name" -n "$HYPERSHIFT_NAMESPACE" --type=merge -p '{"spec":{"platform":{"aws":{"multiArch": "'"${HYPERSHIFT_TARGET_MULTIARCH}"'"}}}}'
fi
fi

_upgradeReady=1
for ((i=1; i<=120; i++)); do
count=$(oc get hostedcluster -n "$HYPERSHIFT_NAMESPACE" "$cluster_name" -ojsonpath='{.status.version.history[?(@.image=="'"${OPENSHIFT_UPGRADE_RELEASE_IMAGE_OVERRIDE}"'")].state}' | grep -c Completed || true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ ref:
- name: HYPERSHIFT_NAMESPACE
default: "clusters"
documentation: "The Namespace where to create the HostedCluster and NodePools"
- name: HYPERSHIFT_TARGET_MULTIARCH
default: ""
documentation: "hypershift hostedcluster upgrade target architecture, true or false"
dependencies:
- name: "release:target"
env: "OPENSHIFT_UPGRADE_RELEASE_IMAGE_OVERRIDE"
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
approvers:
- jhou1
- liangxia
- jianzhangbjz
- kuiwang02
- jiajliu
- shellyyang1989
- aleskandro
- LiangquanLi930
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"path": "openshift/upgrade/qe/test/hypershift/to-multi/openshift-upgrade-qe-test-hypershift-to-multi-chain.yaml",
"owners": {
"approvers": [
"jhou1",
"liangxia",
"jianzhangbjz",
"kuiwang02",
"jiajliu",
"shellyyang1989",
"aleskandro",
"LiangquanLi930"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
chain:
as: openshift-upgrade-qe-test-hypershift-to-multi
steps:
- ref: cucushift-pre
- ref: openshift-extended-upgrade-pre
- ref: cucushift-upgrade-prepare
- ref: cucushift-upgrade-hypershift-control-plane-toimage
- ref: hypershift-aws-create-nodepool
- ref: openshift-extended-upgrade-post
- ref: cucushift-upgrade-check
- ref: openshift-upgrade-qe-test-report
documentation: |-
The chain executes upgrade-prepare, which creates test data on the cluster;
then upgrade the HyperShift HostedCluster(CP) to multi-arch release;
then create an arm64 nodepool;
then execute upgrade-check, which checks the prepared test data.

0 comments on commit 94e91b4

Please sign in to comment.