Skip to content

Commit

Permalink
Add Makefile and configuration files for e2e execution on OpenShift CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sutaakar authored and ChristianZaccaria committed Dec 11, 2023
1 parent 6985a5e commit cab51dc
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,11 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi
$(KUSTOMIZE) build config/${ENV} | kubectl delete --ignore-not-found=$(ignore-not-found) -f -
git restore config/*

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

##@ Build Dependencies

## Location to install dependencies to
Expand Down Expand Up @@ -368,6 +373,17 @@ test-unit: manifests fmt vet envtest ## Run unit tests.
test-e2e: manifests fmt vet ## Run e2e tests.
go test -timeout 30m -v ./test/e2e

.PHONY: test-odh
test-odh: manifests fmt vet ## Run e2e ODH tests.
go test -timeout 60m -v ./test/odh

.PHONY: store-odh-logs
store-odh-logs: # Store all ODH relevant logs into artifact directory
kubectl logs -n opendatahub deployment/codeflare-operator-manager > ${ARTIFACT_DIR}/codeflare-operator.log
kubectl logs -n opendatahub deployment/kuberay-operator > ${ARTIFACT_DIR}/kuberay-operator.log
kubectl logs -n openshift-operators deployment/opendatahub-operator-controller-manager > ${ARTIFACT_DIR}/odh-operator.log
kubectl get events -n opendatahub > ${ARTIFACT_DIR}/odh-events.log

.PHONY: kind-e2e
kind-e2e: ## Set up e2e KinD cluster
test/e2e/kind.sh
Expand Down
2 changes: 2 additions & 0 deletions config/odh-operator/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
resources:
- odh.yaml
13 changes: 13 additions & 0 deletions config/odh-operator/odh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: opendatahub-operator
labels:
operators.coreos.com/opendatahub-operator.openshift-operators: ''
namespace: openshift-operators
spec:
channel: fast
name: opendatahub-operator
installPlanApproval: Automatic
source: community-operators
sourceNamespace: openshift-marketplace
31 changes: 31 additions & 0 deletions contrib/configuration/basic-dsc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: datasciencecluster.opendatahub.io/v1
kind: DataScienceCluster
metadata:
labels:
app.kubernetes.io/created-by: opendatahub-operator
app.kubernetes.io/instance: default
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/name: datasciencecluster
app.kubernetes.io/part-of: opendatahub-operator
name: example-dsc
spec:
components:
codeflare:
devFlags:
manifests:
- uri: '<CFO PR tarball URI>'
contextDir: 'config'
sourcePath: 'manifests'
managementState: Managed
dashboard:
managementState: Managed
datasciencepipelines:
managementState: Removed
kserve:
managementState: Removed
modelmeshserving:
managementState: Removed
ray:
managementState: Managed
workbenches:
managementState: Managed

0 comments on commit cab51dc

Please sign in to comment.