Skip to content

Commit c0374be

Browse files
sutaakarChristianZaccaria
authored andcommitted
CARRY: Add Makefile and configuration files for e2e execution on OpenShift CI
1 parent ae7e91f commit c0374be

File tree

4 files changed

+62
-0
lines changed

4 files changed

+62
-0
lines changed

Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,11 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi
212212
$(KUSTOMIZE) build config/${ENV} | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
213213
git restore config/*
214214

215+
.PHONY: install-odh-operator
216+
install-odh-operator: kustomize ## Install ODH operator into the OpenShift cluster specified in ~/.kube/config.
217+
$(KUSTOMIZE) build config/odh-operator | kubectl apply -f -
218+
kubectl wait -n openshift-operators subscription/opendatahub-operator --for=jsonpath='{.status.state}'=AtLatestKnown --timeout=180s
219+
215220
##@ Build Dependencies
216221

217222
## Location to install dependencies to
@@ -372,6 +377,17 @@ test-unit: manifests fmt vet envtest ## Run unit tests.
372377
test-e2e: manifests fmt vet ## Run e2e tests.
373378
go test -timeout 30m -v ./test/e2e
374379

380+
.PHONY: test-odh
381+
test-odh: manifests fmt vet ## Run e2e ODH tests.
382+
go test -timeout 60m -v ./test/odh
383+
384+
.PHONY: store-odh-logs
385+
store-odh-logs: # Store all ODH relevant logs into artifact directory
386+
kubectl logs -n opendatahub deployment/codeflare-operator-manager > ${ARTIFACT_DIR}/codeflare-operator.log
387+
kubectl logs -n opendatahub deployment/kuberay-operator > ${ARTIFACT_DIR}/kuberay-operator.log
388+
kubectl logs -n openshift-operators deployment/opendatahub-operator-controller-manager > ${ARTIFACT_DIR}/odh-operator.log
389+
kubectl get events -n opendatahub > ${ARTIFACT_DIR}/odh-events.log
390+
375391
.PHONY: kind-e2e
376392
kind-e2e: ## Set up e2e KinD cluster
377393
test/e2e/kind.sh
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
resources:
2+
- odh.yaml

config/odh-operator/odh.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: operators.coreos.com/v1alpha1
2+
kind: Subscription
3+
metadata:
4+
name: opendatahub-operator
5+
labels:
6+
operators.coreos.com/opendatahub-operator.openshift-operators: ''
7+
namespace: openshift-operators
8+
spec:
9+
channel: fast
10+
name: opendatahub-operator
11+
installPlanApproval: Automatic
12+
source: community-operators
13+
sourceNamespace: openshift-marketplace
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
apiVersion: datasciencecluster.opendatahub.io/v1
2+
kind: DataScienceCluster
3+
metadata:
4+
labels:
5+
app.kubernetes.io/created-by: opendatahub-operator
6+
app.kubernetes.io/instance: default
7+
app.kubernetes.io/managed-by: kustomize
8+
app.kubernetes.io/name: datasciencecluster
9+
app.kubernetes.io/part-of: opendatahub-operator
10+
name: example-dsc
11+
spec:
12+
components:
13+
codeflare:
14+
devFlags:
15+
manifests:
16+
- uri: '<CFO PR tarball URI>'
17+
contextDir: 'config'
18+
sourcePath: 'manifests'
19+
managementState: Managed
20+
dashboard:
21+
managementState: Managed
22+
datasciencepipelines:
23+
managementState: Removed
24+
kserve:
25+
managementState: Removed
26+
modelmeshserving:
27+
managementState: Removed
28+
ray:
29+
managementState: Managed
30+
workbenches:
31+
managementState: Managed

0 commit comments

Comments
 (0)