Skip to content

Commit

Permalink
Run E2E tests for codeflare operator
Browse files Browse the repository at this point in the history
  • Loading branch information
jiripetrlik committed Jun 19, 2023
1 parent 91077ca commit 1361494
Showing 1 changed file with 66 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,72 @@ tests:
requests:
cpu: 100m
memory: 200Mi
- as: codeflare-operator-e2e
commands: |
podman run -d -p 5000:5000 --name registry registry:2.8.1
export REGISTRY_ADDRESS=$(hostname -i):5000
KUBERAY_VERSION=$(make get-kuberay-version)
echo Deploying KubeRay ${KUBERAY_VERSION}
kubectl create -k "github.com/ray-project/kuberay/ray-operator/config/default?ref=${KUBERAY_VERSION}&timeout=90s"
echo Deploying CodeFlare operator
IMG="${REGISTRY_ADDRESS}"/codeflare-operator
make image-push -e IMG="${IMG}"
make deploy -e IMG="${IMG}"
kubectl wait --timeout=120s --for=condition=Available=true deployment -n openshift-operators codeflare-operator-manager
echo Deploying MCAD controller
kubectl create ns codeflare-system
cat <<EOF | kubectl apply -n codeflare-system -f -
apiVersion: codeflare.codeflare.dev/v1alpha1
kind: MCAD
metadata:
name: mcad
spec:
controllerResources: {}
EOF
cat <<EOF | kubectl apply -n codeflare-system -f -
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: mcad-controller-rayclusters
rules:
- apiGroups:
- ray.io
resources:
- rayclusters
- rayclusters/finalizers
- rayclusters/status
verbs:
- get
- list
- watch
- create
- update
- patch
- delete
EOF
cat <<EOF | kubectl apply -n codeflare-system -f -
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: mcad-controller-rayclusters
subjects:
- kind: ServiceAccount
name: mcad-controller-mcad
namespace: codeflare-system
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: mcad-controller-rayclusters
EOF
kubectl wait --timeout=120s --for=condition=Available=true deployment -n codeflare-system mcad-controller-mcad
GOFLAGS="" make test-e2e
from: test-bin
resources:
requests:
cpu: 100m
memory: 200Mi
workflow: hypershift-hostedcluster-workflow
zz_generated_metadata:
branch: main
Expand Down

0 comments on commit 1361494

Please sign in to comment.