Skip to content

Commit

Permalink
WINC-1191: add azure upgrade test to release 4.12 (openshift#47918)
Browse files Browse the repository at this point in the history
* wmco: bump operator-sdk in release 4.12

This commit updates the operator-sdk version to include
a required fix. operator-framework/operator-sdk#6477

* wmco: add azure upgrade test to release 4.12

This commit introduces the azure-e2e-upgrade test
in the release 4.12 branch by upgrading from the
last released 4.12 bundle to the pipeline bundle.
  • Loading branch information
jrvaldes authored and sgoveas committed Feb 22, 2024
1 parent 4c10a6e commit 9546f9f
Show file tree
Hide file tree
Showing 2 changed files with 179 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ base_images:
namespace: openshift
tag: rhel-8-release-golang-1.19-openshift-4.12
operator-sdk:
name: "4.12"
name: "4.14"
namespace: origin
tag: operator-sdk
binary_build_commands: make build
Expand Down Expand Up @@ -148,6 +148,106 @@ tests:
cpu: 1000m
memory: 400Mi
workflow: ipi-aws-ovn-hybrid
- always_run: false
as: azure-e2e-upgrade
steps:
cluster_profile: azure4
test:
- as: install
cli: latest
commands: |-
export WMCO_NS=openshift-windows-machine-config-operator
oc create namespace $WMCO_NS
oc label --overwrite=true ns $WMCO_NS openshift.io/cluster-monitoring=true \
pod-security.kubernetes.io/enforce=privileged
# deploy og
oc create -f - <<EOF
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: windows-machine-config-operator
namespace: ${WMCO_NS}
spec:
targetNamespaces:
- ${WMCO_NS}
EOF
# install operator via subscription
oc create -f - <<EOF
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: windows-machine-config-operator
namespace: ${WMCO_NS}
spec:
channel: stable
installPlanApproval: Automatic
name: windows-machine-config-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
EOF
# oc wait will immediately fail if the deployment does not exist yet, first retry until the deployment is
# created by the subscription controller
retries=0
while ! oc get -n $WMCO_NS deployment windows-machine-config-operator; do
if [[ $retries -eq 10 ]]; then
echo "max retries hit"
exit 1
fi
sleep 1m
retries=$((retries+1))
done
oc wait --timeout=10m --for condition=Available -n $WMCO_NS deployment windows-machine-config-operator
from: cli
resources:
requests:
cpu: 1000m
memory: 400Mi
- as: test-setup
cli: latest
commands: |-
#!/bin/bash
set -euo pipefail
export KUBE_SSH_KEY_PATH=${CLUSTER_PROFILE_DIR}/ssh-privatekey
oc create secret generic cloud-private-key --from-file=private-key.pem="${KUBE_SSH_KEY_PATH}" -n openshift-windows-machine-config-operator
make upgrade-test-setup
from: windows-machine-config-operator-test
resources:
requests:
cpu: 1000m
memory: 400Mi
- as: upgrade
cli: latest
commands: |
export WMCO_NS=openshift-windows-machine-config-operator
operator-sdk cleanup --timeout 1m windows-machine-config-operator -n $WMCO_NS || {
echo "operator-sdk cleanup timed out"
}
operator-sdk run bundle --timeout=10m --security-context-config restricted -n $WMCO_NS "$OO_BUNDLE"
sleep 5m
oc wait --timeout=5m --for condition=Available -n $WMCO_NS deployment windows-machine-config-operator
dependencies:
- env: OO_BUNDLE
name: wmco-bundle
from: operator-sdk
resources:
requests:
cpu: 1000m
memory: 400Mi
- as: test
cli: latest
commands: |-
#!/bin/bash
set -euo pipefail
export KUBE_SSH_KEY_PATH=${CLUSTER_PROFILE_DIR}/ssh-privatekey
make upgrade-test
from: windows-machine-config-operator-test
resources:
requests:
cpu: 1000m
memory: 400Mi
workflow: ipi-azure-ovn-hybrid
- always_run: false
as: platform-none-vsphere-e2e-operator
steps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,84 @@ presubmits:
secret:
secretName: result-aggregator
trigger: (?m)^/test( | .* )(azure-e2e-operator|remaining-required),?($|\s.*)
- agent: kubernetes
always_run: false
branches:
- ^release-4\.12$
- ^release-4\.12-
cluster: build03
context: ci/prow/azure-e2e-upgrade
decorate: true
labels:
ci-operator.openshift.io/cloud: azure4
ci-operator.openshift.io/cloud-cluster-profile: azure4
ci.openshift.io/generator: prowgen
pj-rehearse.openshift.io/can-be-rehearsed: "true"
name: pull-ci-openshift-windows-machine-config-operator-release-4.12-azure-e2e-upgrade
rerun_command: /test azure-e2e-upgrade
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
- --secret-dir=/usr/local/azure-e2e-upgrade-cluster-profile
- --target=azure-e2e-upgrade
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/azure-e2e-upgrade-cluster-profile
name: cluster-profile
- 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: cluster-profile
secret:
secretName: cluster-secrets-azure4
- 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
trigger: (?m)^/test( | .* )(azure-e2e-upgrade|remaining-required),?($|\s.*)
- agent: kubernetes
always_run: false
branches:
Expand Down

0 comments on commit 9546f9f

Please sign in to comment.