diff --git a/.github/resources-olm-upgrade/catalogsource.yaml b/.github/resources-olm-upgrade/catalogsource.yaml deleted file mode 100644 index c74492445..000000000 --- a/.github/resources-olm-upgrade/catalogsource.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: CatalogSource -metadata: - name: codeflare-olm-test - namespace: olm -spec: - displayName: '' - grpcPodConfig: - securityContextConfig: restricted - image: "${CATALOG_BASE_IMG}" - publisher: '' - sourceType: grpc diff --git a/.github/resources-olm-upgrade/operatorgroup.yaml b/.github/resources-olm-upgrade/operatorgroup.yaml deleted file mode 100644 index 1fa7fc7d7..000000000 --- a/.github/resources-olm-upgrade/operatorgroup.yaml +++ /dev/null @@ -1,5 +0,0 @@ -apiVersion: operators.coreos.com/v1 -kind: OperatorGroup -metadata: - name: openshift-operators - namespace: openshift-operators diff --git a/.github/resources-olm-upgrade/subscription.yaml b/.github/resources-olm-upgrade/subscription.yaml deleted file mode 100644 index 07fbb23bb..000000000 --- a/.github/resources-olm-upgrade/subscription.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: operators.coreos.com/v1alpha1 -kind: Subscription -metadata: - name: codeflare-operator - namespace: openshift-operators -spec: - channel: alpha - installPlanApproval: Automatic - name: codeflare-operator - source: codeflare-olm-test - sourceNamespace: olm - config: - resources: - limits: - cpu: 400m - memory: 128Mi - requests: - cpu: 50m - memory: 64Mi diff --git a/.github/workflows/build-and-push.yaml b/.github/workflows/build-and-push.yaml new file mode 100644 index 000000000..6147bce70 --- /dev/null +++ b/.github/workflows/build-and-push.yaml @@ -0,0 +1,75 @@ +# This workflow will build the CodeFlare Operator image and push it to the opendatahub image registry + +name: Build and Push + +on: + push: + branches: + - 'main' + paths: + - 'config/manager/params.env' + workflow_dispatch: + +jobs: + check-image-existence: + name: Check if ODH CFO image exists on Quay + runs-on: ubuntu-latest + outputs: + image-found: ${{ steps.image.outputs.found }} + steps: + - uses: actions/checkout@v4 + + - name: Verify that the latest images are available on Quay + id: image + run: | + imageTag=$(cat config/manager/params.env | grep codeflare-operator-controller-image | cut -d ':' -f2) + size=$(curl -s https://quay.io/api/v1/repository/opendatahub/codeflare-operator/tag/?specificTag=$imageTag | jq .tags[0].size) + if [[ "$size" -eq 0 ]]; then + echo "Operator image with tag $imageTag not found in Quay.io, will be built." + echo "found=false" >> "$GITHUB_OUTPUT" + else + echo "Operator image with tag $imageTag found in Quay.io" + fi + + build-and-push: + needs: [check-image-existence] + if: ${{ needs.check-image-existence.outputs.image-found == 'false' }} + + name: Build and push ODH/CFO image + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set Go + uses: actions/setup-go@v5 + with: + go-version-file: './go.mod' + + - name: Login to Quay.io + uses: redhat-actions/podman-login@v1 + with: + username: ${{ secrets.QUAY_BOT_USER }} + password: ${{ secrets.QUAY_BOT_PASSWORD }} + registry: quay.io + + - name: Get Upstream Release Tags + id: release-tags + run: | + release_tag=$(gh release view -R github.com/project-codeflare/codeflare-operator --json tagName | jq -r '.tagName') + echo "RELEASE_TAG=$release_tag" >> $GITHUB_ENV + env: + GITHUB_TOKEN: ${{ github.token }} + + - name: Cleanup the go.mod and go.sum + run: | + go mod tidy + + - name: Image Build and Push + run: | + make build + make image-build -e IMG=quay.io/opendatahub/codeflare-operator:${{ env.RELEASE_TAG }} + make image-push -e IMG=quay.io/opendatahub/codeflare-operator:${{ env.RELEASE_TAG }} + + - name: Delete remote branch + run: | + git push origin --delete sync-cfo-fork diff --git a/.github/workflows/e2e_tests.yaml b/.github/workflows/e2e_tests.yaml deleted file mode 100644 index 0a0ad3977..000000000 --- a/.github/workflows/e2e_tests.yaml +++ /dev/null @@ -1,117 +0,0 @@ -name: e2e - -on: - pull_request: - branches: - - main - - 'release-*' - paths-ignore: - - 'docs/**' - - '**.adoc' - - '**.md' - - 'LICENSE' - push: - branches: - - main - - 'release-*' - paths-ignore: - - 'docs/**' - - '**.adoc' - - '**.md' - - 'LICENSE' - -concurrency: - group: ${{ github.head_ref }}-${{ github.workflow }} - cancel-in-progress: true - -jobs: - kubernetes-e2e: - - runs-on: ubuntu-20.04-4core - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Checkout common repo code - uses: actions/checkout@v4 - with: - repository: 'project-codeflare/codeflare-common' - ref: 'main' - path: 'common' - - - name: Set Go - uses: actions/setup-go@v5 - with: - go-version-file: './go.mod' - - - name: Set up gotestfmt - uses: gotesttools/gotestfmt-action@v2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Setup and start KinD cluster - uses: ./common/github-actions/kind - - - name: Deploy CodeFlare stack - id: deploy - run: | - echo Setting up CodeFlare stack - make setup-e2e - - echo Deploying CodeFlare operator - IMG="${REGISTRY_ADDRESS}"/codeflare-operator - make image-push -e IMG="${IMG}" - make deploy -e IMG="${IMG}" -e ENV="e2e" - kubectl wait --timeout=120s --for=condition=Available=true deployment -n openshift-operators codeflare-operator-manager - - - name: Run e2e tests - run: | - export CODEFLARE_TEST_TIMEOUT_SHORT=1m - export CODEFLARE_TEST_TIMEOUT_MEDIUM=5m - export CODEFLARE_TEST_TIMEOUT_LONG=10m - export CODEFLARE_TEST_TIMEOUT_GPU_PROVISIONING=30m - - export CODEFLARE_TEST_OUTPUT_DIR=${{ env.TEMP_DIR }} - echo "CODEFLARE_TEST_OUTPUT_DIR=${CODEFLARE_TEST_OUTPUT_DIR}" >> $GITHUB_ENV - - set -euo pipefail - go test -timeout 30m -v ./test/e2e -json 2>&1 | tee ${CODEFLARE_TEST_OUTPUT_DIR}/gotest.log | gotestfmt - - - name: Print CodeFlare operator logs - if: always() && steps.deploy.outcome == 'success' - run: | - echo "Printing CodeFlare operator logs" - kubectl logs -n openshift-operators --tail -1 -l app.kubernetes.io/name=codeflare-operator | tee ${CODEFLARE_TEST_OUTPUT_DIR}/codeflare-operator.log - - - name: Print KubeRay operator logs - if: always() && steps.deploy.outcome == 'success' - run: | - echo "Printing KubeRay operator logs" - kubectl logs -n ray-system --tail -1 -l app.kubernetes.io/name=kuberay | tee ${CODEFLARE_TEST_OUTPUT_DIR}/kuberay.log - - - name: Export all KinD pod logs - uses: ./common/github-actions/kind-export-logs - if: always() && steps.deploy.outcome == 'success' - with: - output-directory: ${CODEFLARE_TEST_OUTPUT_DIR} - - - name: Upload logs - uses: actions/upload-artifact@v4 - if: always() && steps.deploy.outcome == 'success' - with: - name: logs - retention-days: 10 - path: | - ${{ env.CODEFLARE_TEST_OUTPUT_DIR }}/**/*.log - - - name: Post notification about failure to a Slack channel in case of push event - if: failure() && github.event_name == 'push' - uses: slackapi/slack-github-action@v1.24.0 - with: - channel-id: "codeflare-nightlies" - slack-message: "e2e test on push failed, " - env: - SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} diff --git a/.github/workflows/odh-release.yml b/.github/workflows/odh-release.yml new file mode 100644 index 000000000..900e910b0 --- /dev/null +++ b/.github/workflows/odh-release.yml @@ -0,0 +1,49 @@ +# This workflow will compile e2e tests and release them + +name: ODH Release +on: + workflow_dispatch: + inputs: + version: + description: 'Tag to be used for release, i.e.: v0.0.1' + required: true + +jobs: + release-odh: + runs-on: ubuntu-latest + + # Permission required to create a release + permissions: + contents: write + + steps: + - uses: actions/checkout@v4 + + - name: Set Go + uses: actions/setup-go@v5 + with: + go-version: v1.20 + + - name: Verify that release doesn't exist yet + shell: bash {0} + run: | + gh release view ${{ github.event.inputs.version }} + status=$? + if [[ $status -eq 0 ]]; then + echo "Release ${{ github.event.inputs.version }} already exists." + exit 1 + fi + env: + GITHUB_TOKEN: ${{ github.TOKEN }} + + - name: Compile tests + run: | + go test -c -o compiled-tests/e2e ./test/e2e/ + go test -c -o compiled-tests/odh ./test/odh/ + + - name: Creates a release in GitHub + run: | + gh release create ${{ github.event.inputs.version }} --target ${{ github.ref }} compiled-tests/* + env: + GITHUB_TOKEN: ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }} + shell: bash diff --git a/.github/workflows/olm_tests.yaml b/.github/workflows/olm_tests.yaml deleted file mode 100644 index b13f2f894..000000000 --- a/.github/workflows/olm_tests.yaml +++ /dev/null @@ -1,172 +0,0 @@ -# This workflow will build the CodeFlare Operator image and catalog containing bundle with this image, execute OLM upgrade tests using this catalog - -name: OLM Install and Upgrade - -on: - pull_request: - branches: - - main - - 'release-*' - paths-ignore: - - 'docs/**' - - '**.adoc' - - '**.md' - - 'LICENSE' - -concurrency: - group: ${{ github.head_ref }}-${{ github.workflow }} - cancel-in-progress: true - -jobs: - kubernetes-olm-upgrade: - runs-on: ubuntu-20.04-4core - timeout-minutes: 60 - env: - OLM_VERSION: v0.25.0 - VERSION: "v0.0.0-ghaction" # Need to supply some semver version for bundle to be properly generated - CATALOG_BASE_IMG: "registry.access.redhat.com/redhat/community-operator-index:v4.13" - CODEFLARE_TEST_TIMEOUT_SHORT: "1m" - CODEFLARE_TEST_TIMEOUT_MEDIUM: "5m" - CODEFLARE_TEST_TIMEOUT_LONG: "10m" - - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 # fetching also previous commits to get tags - - - name: Checkout common repo code - uses: actions/checkout@v4 - with: - repository: 'project-codeflare/codeflare-common' - ref: 'main' - path: 'common' - - - name: Set Go - uses: actions/setup-go@v5 - with: - go-version-file: './go.mod' - - - name: Set up gotestfmt - uses: gotesttools/gotestfmt-action@v2 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Setup and start KinD cluster - uses: ./common/github-actions/kind - - - name: Install OLM - run: | - kubectl create -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/${OLM_VERSION}/crds.yaml - # wait for a while to be sure CRDs are installed - sleep 1 - kubectl create -f https://github.com/operator-framework/operator-lifecycle-manager/releases/download/${OLM_VERSION}/olm.yaml - echo Wait for default CatalogSource to start - kubectl wait -n ${{ env.CATALOG_SOURCE_NAMESPACE }} catalogsource/${{ env.CATALOG_SOURCE_NAME }} --for=jsonpath='{.status.connectionState.lastObservedState}'=READY --timeout=180s - env: - CATALOG_SOURCE_NAME: "operatorhubio-catalog" - CATALOG_SOURCE_NAMESPACE: "olm" - - - name: Create openshift-operator namespace and OperatorGroup - run: | - # Need to use openshift-operator namespace due to https://github.com/project-codeflare/codeflare-operator/issues/161 - kubectl create namespace openshift-operators - kubectl create -f .github/resources-olm-upgrade/operatorgroup.yaml - - - name: Deploy latest released CodeFlare operator from OLM - id: deploy - run: | - echo Create the CodeFlare operator ConfigMap - kubectl apply -n '${{ env.SUBSCRIPTION_NAMESPACE }}' -f config/e2e/config.yaml - - echo Deploying CodeFlare operator using Subscription - envsubst < .github/resources-olm-upgrade/catalogsource.yaml > ${{ env.TEMP_DIR }}/catalogsource.yaml - envsubst < .github/resources-olm-upgrade/subscription.yaml > ${{ env.TEMP_DIR }}/subscription.yaml - - kubectl create -f ${{ env.TEMP_DIR }}/catalogsource.yaml - - echo Wait for CatalogSource ${{ env.CATALOG_SOURCE_NAME }} to start - kubectl wait -n ${{ env.CATALOG_SOURCE_NAMESPACE }} catalogsource/${{ env.CATALOG_SOURCE_NAME }} --for=jsonpath='{.status.connectionState.lastObservedState}'=READY --timeout=180s - - kubectl create -f ${{ env.TEMP_DIR }}/subscription.yaml - - echo Waiting for Subscription to be ready - kubectl wait -n ${{ env.SUBSCRIPTION_NAMESPACE }} subscription/${{ env.SUBSCRIPTION_NAME }} --for=jsonpath='{.status.state}'=AtLatestKnown --timeout=180s - - echo Waiting for Deployment to be ready - timeout 60 bash -c 'until [[ $(kubectl get deployment/codeflare-operator-manager -n '${{ env.SUBSCRIPTION_NAMESPACE }}') ]]; do sleep 5 && echo "$(kubectl get deployment/codeflare-operator-manager -n '${{ env.SUBSCRIPTION_NAMESPACE }}')"; done' - kubectl wait -n ${{ env.SUBSCRIPTION_NAMESPACE }} deployment/codeflare-operator-manager --for=condition=Available=true --timeout=60s - env: - CATALOG_SOURCE_NAME: "codeflare-olm-test" - CATALOG_SOURCE_NAMESPACE: "olm" - SUBSCRIPTION_NAME: "codeflare-operator" - SUBSCRIPTION_NAMESPACE: "openshift-operators" - - - name: Store latest CSV version as PREVIOUS_VERSION env variable (used for bundle build) - run: | - CSV_VERSION=$(kubectl get ClusterServiceVersion -l operators.coreos.com/codeflare-operator.openshift-operators='' -n openshift-operators -o json | jq -r .items[].spec.version) - echo "PREVIOUS_VERSION=v$CSV_VERSION" >> $GITHUB_ENV - - - name: Build operator and catalog image - run: | - make image-push - make bundle-build - make bundle-push - make catalog-build-from-index - make catalog-push - env: - IMG: "${{ env.REGISTRY_ADDRESS }}/codeflare-operator:v0.0.1" - BUNDLE_IMG: "${{ env.REGISTRY_ADDRESS }}/codeflare-operator-bundle:v0.0.1" - CATALOG_IMG: "${{ env.REGISTRY_ADDRESS }}/codeflare-operator-catalog:v0.0.1" - OPM_BUNDLE_OPT: "--use-http" - BUNDLE_PUSH_OPT: "--tls-verify=false" - CATALOG_PUSH_OPT: "--tls-verify=false" - - - name: Update Operator to the built version - run: | - ORIGINAL_POD_NAME=$(kubectl get pod -l app.kubernetes.io/name=codeflare-operator -n openshift-operators -o json | jq -r .items[].metadata.name) - echo "Running old operator pod name is ${ORIGINAL_POD_NAME}" - - echo Updating custom CatalogSource image to the built CatalogSource with latest operator - kubectl patch CatalogSource codeflare-olm-test -n olm --type merge --patch "{\"spec\":{\"image\":\"${CATALOG_IMG}\"}}" - - echo Waiting for previous operator pod to get deleted - kubectl wait --timeout=120s --for=delete pod/${ORIGINAL_POD_NAME} -n openshift-operators - - echo Waiting for Subscription to be ready - kubectl wait -n ${{ env.SUBSCRIPTION_NAMESPACE }} subscription/${{ env.SUBSCRIPTION_NAME }} --for=jsonpath='{.status.state}'=AtLatestKnown --timeout=180s - - echo Waiting for Deployment to be ready - timeout 60 bash -c 'until [[ $(kubectl get deployment/codeflare-operator-manager -n '${{ env.SUBSCRIPTION_NAMESPACE }}') ]]; do sleep 5 && echo "$(kubectl get deployment/codeflare-operator-manager -n '${{ env.SUBSCRIPTION_NAMESPACE }}')"; done' - kubectl wait -n ${{ env.SUBSCRIPTION_NAMESPACE }} deployment/codeflare-operator-manager --for=condition=Available=true --timeout=60s - - echo Checking that correct CSV is available - CSV_VERSION=$(kubectl get ClusterServiceVersion/codeflare-operator.${VERSION} -n openshift-operators -o json | jq -r .spec.version) - if [ "v${CSV_VERSION}" != "${VERSION}" ]; then - echo "CSV version v${CSV_VERSION} doesn't match expected version ${VERSION}" - exit 1 - fi - env: - CATALOG_IMG: "${{ env.REGISTRY_ADDRESS }}/codeflare-operator-catalog:v0.0.1" - SUBSCRIPTION_NAME: "codeflare-operator" - SUBSCRIPTION_NAMESPACE: "openshift-operators" - - - name: Print CodeFlare operator logs - if: always() && steps.deploy.outcome == 'success' - run: | - echo "Printing CodeFlare operator logs" - mkdir logs - kubectl logs -n openshift-operators --tail -1 -l app.kubernetes.io/name=codeflare-operator | tee logs/codeflare-operator.log - - - name: Export all KinD pod logs - uses: ./common/github-actions/kind-export-logs - if: always() && steps.deploy.outcome == 'success' - with: - output-directory: logs - - - name: Upload logs - uses: actions/upload-artifact@v4 - if: always() && steps.deploy.outcome == 'success' - with: - name: logs - retention-days: 10 - path: logs/**/*.log diff --git a/.github/workflows/sync-fork.yaml b/.github/workflows/sync-fork.yaml new file mode 100644 index 000000000..0c162a3a6 --- /dev/null +++ b/.github/workflows/sync-fork.yaml @@ -0,0 +1,39 @@ +# This workflow will create a sync pr for the opendatahub-io/codeflare-operator fork with project-codeflare/codeflare-operator + +name: Create Sync Fork PR + +on: + workflow_dispatch: + +jobs: + create-fork-sync-pr: + runs-on: ubuntu-latest + + env: + GIT_BRANCH: ${GITHUB_REF#refs/heads/} + + steps: + - uses: actions/checkout@v3 + with: + persist-credentials: false + - name: repo-sync + uses: repo-sync/github-sync@v2 + with: + source_repo: "https://github.com/project-codeflare/codeflare-operator.git" + source_branch: ${{ env.GIT_BRANCH }} + destination_branch: "sync-cfo-fork" + github_token: ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }} + + - name: Set up Git + run: | + git config --global user.email "138894154+codeflare-machine-account@users.noreply.github.com" + git config --global user.name "codeflare-machine-account" + + - name: Create Pull Request + run: | + PR_TITLE="Sync with Upstream" + PR_BODY="This pull request updates the fork to match the latest changes from the upstream repository." + gh pr create --base "${{ env.GIT_BRANCH }}" --head sync-cfo-fork --title "$PR_TITLE" --body "$PR_BODY" + env: + GITHUB_TOKEN: ${{ secrets.CODEFLARE_MACHINE_ACCOUNT_TOKEN }} + shell: bash diff --git a/Dockerfile b/Dockerfile index f5c51c3f5..02abd7952 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,24 @@ -# Build the manager binary -FROM registry.access.redhat.com/ubi8/go-toolset:1.20.10 as builder +# Go 1.21 +FROM registry-proxy.engineering.redhat.com/rh-osbs/openshift-golang-builder:v1.21 AS golang +# Build the manager binary +FROM registry.redhat.io/ubi8/ubi:8.8 AS builder WORKDIR /workspace + +ARG GOLANG_VERSION=1.21.6 + +# Install system dependencies +RUN dnf upgrade -y && dnf install -y \ + gcc \ + make \ + openssl-devel \ + && dnf clean all && rm -rf /var/cache/yum + +# Install Go +ENV PATH=/usr/local/go/bin:$PATH + +COPY --from=golang /usr/lib/golang /usr/local/go + # Copy the Go Modules manifests COPY go.mod go.mod COPY go.sum go.sum diff --git a/Makefile b/Makefile index 99e633247..61b524b71 100644 --- a/Makefile +++ b/Makefile @@ -194,6 +194,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 @@ -364,6 +369,17 @@ test-component: envtest ginkgo ## Run component 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 diff --git a/config/default/kustomization.yaml b/config/default/kustomization.yaml index 30b1273cd..71d9fd58a 100644 --- a/config/default/kustomization.yaml +++ b/config/default/kustomization.yaml @@ -1,5 +1,5 @@ # Adds namespace to all resources. -namespace: openshift-operators +namespace: opendatahub # Value of this field is prepended to the # names of all resources, e.g. a deployment named diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 847eca176..bdb8b68d8 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -12,6 +12,13 @@ configurations: - params.yaml vars: +- name: namespace + objref: + kind: ConfigMap + name: stack-config + apiVersion: v1 + fieldref: + fieldpath: data.namespace - name: codeflare_operator_controller_image objref: kind: ConfigMap diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 20a34fe9d..14f62ad48 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -1,8 +1,3 @@ -apiVersion: v1 -kind: Namespace -metadata: - name: system ---- apiVersion: apps/v1 kind: Deployment metadata: diff --git a/config/manager/params.yaml b/config/manager/params.yaml index 43509ff29..4d4bd9d60 100644 --- a/config/manager/params.yaml +++ b/config/manager/params.yaml @@ -1,3 +1,5 @@ varReference: + - path: subjects[]/namespace + kind: ClusterRoleBinding - path: spec/template/spec/containers[]/image kind: Deployment diff --git a/config/odh-operator/kustomization.yaml b/config/odh-operator/kustomization.yaml new file mode 100644 index 000000000..02358bd9f --- /dev/null +++ b/config/odh-operator/kustomization.yaml @@ -0,0 +1,2 @@ +resources: +- odh.yaml diff --git a/config/odh-operator/odh.yaml b/config/odh-operator/odh.yaml new file mode 100644 index 000000000..6f7521595 --- /dev/null +++ b/config/odh-operator/odh.yaml @@ -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 diff --git a/contrib/configuration/basic-dsc.yaml b/contrib/configuration/basic-dsc.yaml new file mode 100644 index 000000000..de9926369 --- /dev/null +++ b/contrib/configuration/basic-dsc.yaml @@ -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: '' + contextDir: 'config' + sourcePath: 'default' + managementState: Managed + dashboard: + managementState: Managed + datasciencepipelines: + managementState: Removed + kserve: + managementState: Removed + modelmeshserving: + managementState: Removed + ray: + managementState: Managed + workbenches: + managementState: Managed