diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 867e75c..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,182 +0,0 @@ -version: 2.1 -executors: - runai-executor: - docker: - - image: cimg/go:1.22.1 - -commands: - remote_docker: - steps: - - setup_remote_docker: - docker_layer_caching: true - version: 20.10.14 - install_project_dependencies: - steps: - - checkout - - run: - name: "Install project dependencies" - command: | - go mod download - go mod verify - - pre_docker_commands: - steps: - - remote_docker - - run: - name: "Extract gcloud private key to file" - command: echo "$STAGING_GCLOUD_SERVICE_JSON_CONTENT" | base64 -d > ./gcr_auth.json - - run: - name: "Docker gcr login" - command: cat gcr_auth.json | docker login -u _json_key --password-stdin https://gcr.io - - run: - name: "Docker Red Hat login" - command: echo "$REDHAT_DOCKER_PASS" | docker login -u $REDHAT_DOCKER_USER --password-stdin https://registry.redhat.io - - operator_update_version_in_helm_chart: - steps: - - run: - name: Update version in helm chart - command: | - TAG=${CIRCLE_TAG/v/''} - echo "Updating fake-gpu-operator new version number $TAG in runai helm chart directory..." - sed -i s/0.0.0/$TAG/g deploy/fake-gpu-operator/values.yaml - -jobs: - lint: - executor: runai-executor - steps: - - remote_docker - - install_project_dependencies - - run: - command: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.57.2 - golangci-lint run -v --timeout 5m - test: - executor: runai-executor - steps: - - remote_docker - - install_project_dependencies - - run: - name: "Create a temp directory for artifacts" - command: | - mkdir -p /tmp/artifacts - mkdir -p /tmp/artifacts/test-results - mkdir -p /tmp/artifacts/test-results/service-tests - - run: - name: "Run Service tests" - command: | - make test-all - - store_artifacts: - name: "Store artifacts" - path: /tmp/artifacts - - store_test_results: - name: "Store test results" - path: /tmp/artifacts/test-results - deploy_to_staging: - executor: runai-executor - steps: - - checkout - - pre_docker_commands - - run: - name: "Build Images" - environment: - CIRCLE_TAG: <> - command: | - DOCKER_REPO_BASE="gcr.io/run-ai-staging/fake-gpu-operator" - make images DOCKER_REPO_BASE=${DOCKER_REPO_BASE} DOCKER_TAG=${CIRCLE_TAG} - - run: - name: "Push to Google Cloud" - command: | - TAG=<> - DOCKER_REPO_BASE="gcr.io/run-ai-staging/fake-gpu-operator" - make push-all DOCKER_REPO_BASE=${DOCKER_REPO_BASE} DOCKER_TAG=${TAG} - deploy_to_production: - executor: runai-executor - steps: - - checkout - - pre_docker_commands - - run: - name: "Push to Google Cloud" - environment: - CIRCLE_TAG: <> - command: | - TAG=${CIRCLE_TAG/v/''} - DOCKER_REPO_BASE="gcr.io/run-ai-staging/fake-gpu-operator" - make images DOCKER_REPO_BASE=${DOCKER_REPO_BASE} DOCKER_TAG=${TAG} - make push-all DOCKER_REPO_BASE=${DOCKER_REPO_BASE} DOCKER_TAG=${TAG} - chart_build_staging: - working_directory: ~/go/src/github.com/run-ai/fake-gpu-operator - docker: - - image: google/cloud-sdk:276.0.0 # Later versions do not have pip - steps: - - checkout - - run: - name: Package and publish chart to staging - environment: - CIRCLE_SHA1: <> - CIRCLE_TAG: <> - PIPELINE_NUMBER: <> - REPO_URL: https://fake-gpu-operator.storage.googleapis.com/ - BUCKET: gs://fake-gpu-operator - UPLOAD_TARGET: prod - GCLOUD_PROJECT: run-ai-staging - command: | - chmod u+x script/uploadChart.sh - script/uploadChart.sh - -workflows: - version: 2 - production: - jobs: - - lint: - filters: - branches: - ignore: /.*/ - tags: - only: /^v.*/ - - test: - filters: - branches: - ignore: /.*/ - tags: - only: /^v.*/ - - deploy_to_production: - requires: - - lint - - test - filters: - branches: - ignore: /.*/ - tags: - only: /^v.*/ - - chart_build_staging: - requires: - - deploy_to_production - filters: - branches: - ignore: /.*/ - tags: - only: /^v.*/ - - test_lint_deploy: - jobs: - - lint: - filters: - tags: - ignore: /^v.*/ - - test: - filters: - tags: - ignore: /^v.*/ - - - deploy_to_staging: - requires: - - lint - - test - - filters: - tags: - ignore: /^v.*/ - branches: - only: - - main diff --git a/.github/workflows/ci-commit-master.yml b/.github/workflows/ci-commit-master.yml new file mode 100644 index 0000000..b63d4eb --- /dev/null +++ b/.github/workflows/ci-commit-master.yml @@ -0,0 +1,141 @@ +name: CI - commit to master + +on: + push: + paths-ignore: + - ".github/**" + branches: + - "master" + +concurrency: + group: ${{ github.head_ref || github.ref || github.run_id }} + cancel-in-progress: false + +permissions: + checks: write + contents: read + pull-requests: write + id-token: write + security-events: write + actions: read + repository-projects: read + +env: + ENVIRONMENT: "test" + CONTAINER_REGISTRY: "fake-gpu-operator-containers-test" + HELM_REGISTRY: "fake-gpu-operator-charts-test" + ENV_IN_A_CLICK_CLUSTER_NAME_PREFIX: "fgo" # fake-gpu-operator short + ARGO_CD_SECRET_NAME: "INFRA_ARGOCD_TOKEN_CICD" + ARGO_CD_TEAM_NAME: "cicd" + SERVICE_LIST: "fake-gpu-operator + fake-gpu-operator-chart" + +jobs: + env: + runs-on: ubuntu-latest + name: Set environment + outputs: + ENVIRONMENT: ${{ env.ENVIRONMENT }} + CONTAINER_REGISTRY: ${{ env.CONTAINER_REGISTRY }} + VERSION: ${{ steps.env.outputs.version }} + HELM_REGISTRY: ${{ env.HELM_REGISTRY }} + CLUSTER_NAME: ${{ steps.env.outputs.cluster_name }} + SERVICE_LIST: ${{ env.SERVICE_LIST }} + ARGO_CD_SECRET_NAME: ${{ env.ARGO_CD_SECRET_NAME }} + ARGO_CD_TEAM_NAME: ${{ env.ARGO_CD_TEAM_NAME }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + token: ${{ secrets.GIT_HUB_TOKEN }} + - name: set env + id: env + run: | + short_sha=$(echo ${{ github.sha }} | cut -c1-7) + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} + branch_name_md5=$(echo $branch | md5sum | cut -d' ' -f1 ) + unique_branch_id=${branch_name_md5: -4} + branch=$(echo $branch | tr '[:upper:]' '[:lower:]' | sed -e 's/[^a-z0-9-]//g' -e 's/--+/--/g' -e 's/^-*//' -e 's/-*$//' -e 's/-*-/-/g' | cut -c1-21 ) + [ "${branch: -1}" == "-" ] && branch=${branch: : -1} # If branch ends with '-' removing last character + cluster_name=${{ env.ENV_IN_A_CLICK_CLUSTER_NAME_PREFIX }}-$unique_branch_id-$branch + echo cluster_name=$cluster_name >> $GITHUB_OUTPUT + version="0.0.0-$((GITHUB_RUN_NUMBER + 1000000)).$branch-$short_sha" + echo version=$version >> $GITHUB_OUTPUT + echo $version + echo $cluster_name + + get-service-list: + name: Get service list + needs: env + uses: run-ai/runai-actions/.github/workflows/get-service-list-v2.yml@main + secrets: inherit + with: + service_list: ${{ needs.env.outputs.SERVICE_LIST }} + + docker-login: + name: Docker login + uses: run-ai/runai-actions/.github/workflows/docker-login-v2.yaml@main + needs: env + secrets: inherit + with: + env: ${{ needs.env.outputs.ENVIRONMENT }} + + make: + name: Make + needs: [get-service-list, env, docker-login] + strategy: + fail-fast: false + matrix: + service_list: ${{ fromJson(needs.get-service-list.outputs.service_list).service_list }} + uses: run-ai/runai-actions/.github/workflows/make-v2.yml@main + secrets: inherit + with: + service_name: ${{ matrix.service_list }} + version: ${{ needs.env.outputs.VERSION }} + registry: ${{ needs.env.outputs.CONTAINER_REGISTRY }} + env: ${{ needs.env.outputs.ENVIRONMENT }} + + build-and-push: + name: Build and push + needs: [make, env, get-service-list] + uses: run-ai/runai-actions/.github/workflows/build-and-push-v2.yml@main + strategy: + fail-fast: false + matrix: + service_list: ${{ fromJson(needs.get-service-list.outputs.service_list).service_list }} + secrets: inherit + with: + service_name: ${{ matrix.service_list }} + container_registry: ${{ needs.env.outputs.CONTAINER_REGISTRY }} + helm_registry: ${{ needs.env.outputs.HELM_REGISTRY }} + version: ${{ needs.env.outputs.VERSION }} + env: ${{ needs.env.outputs.ENVIRONMENT }} + + setup-env: + name: Setup environment + needs: env + uses: run-ai/runai-actions/.github/workflows/create-env-in-a-click-v2.yml@main + secrets: inherit + with: + cluster_name: ${{ needs.env.outputs.CLUSTER_NAME }} + runai-cluster-enabled: false + runai-control-plane-enabled: false + secret-name: ${{ needs.env.outputs.ARGO_CD_SECRET_NAME }} + team-name: ${{ needs.env.outputs.ARGO_CD_TEAM_NAME }} + fake-gpu-version: ${{ needs.env.outputs.VERSION }} + wait-for-sync: true + + send-logs-to-loki: + name: Send logs to Loki + needs: + [ + env, + get-service-list, + docker-login, + setup-env, + make, + build-and-push, + ] + if: failure() || success() + uses: run-ai/runai-actions/.github/workflows/send-log-to-loki-v2.yml@main + secrets: inherit diff --git a/.github/workflows/ci-pr-to-master.yml b/.github/workflows/ci-pr-to-master.yml new file mode 100644 index 0000000..820ae9f --- /dev/null +++ b/.github/workflows/ci-pr-to-master.yml @@ -0,0 +1,140 @@ +name: CI - pull-request to master + +on: + pull_request: + paths-ignore: + - ".github/**" + branches: + - "master" + +concurrency: + group: ${{ github.head_ref || github.ref || github.run_id }} + cancel-in-progress: true + +permissions: + checks: write + contents: read + pull-requests: write + id-token: write + security-events: write + actions: read + repository-projects: read + +env: + ENVIRONMENT: "lab" + CONTAINER_REGISTRY: "fake-gpu-operator-containers-lab" + HELM_REGISTRY: "fake-gpu-operator-charts-lab" + ENV_IN_A_CLICK_CLUSTER_NAME_PREFIX: "fgo" # fake-gpu-operator short + ARGO_CD_SECRET_NAME: "INFRA_ARGOCD_TOKEN_CICD" + ARGO_CD_TEAM_NAME: "cicd" + SERVICE_LIST: "fake-gpu-operator + fake-gpu-operator-chart" + +jobs: + env: + runs-on: ubuntu-latest + name: Set environment + outputs: + ENVIRONMENT: ${{ env.ENVIRONMENT }} + CONTAINER_REGISTRY: ${{ env.CONTAINER_REGISTRY }} + VERSION: ${{ steps.env.outputs.version }} + HELM_REGISTRY: ${{ env.HELM_REGISTRY }} + CLUSTER_NAME: ${{ steps.env.outputs.cluster_name }} + SERVICE_LIST: ${{ env.SERVICE_LIST }} + ARGO_CD_SECRET_NAME: ${{ env.ARGO_CD_SECRET_NAME }} + ARGO_CD_TEAM_NAME: ${{ env.ARGO_CD_TEAM_NAME }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: set env + id: env + run: | + short_sha=$(echo ${{ github.event.pull_request.head.sha }} | cut -c1-7) + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} + branch_name_md5=$(echo $branch | md5sum | cut -d' ' -f1 ) + unique_branch_id=${branch_name_md5: -4} + branch=$(echo $branch | tr '[:upper:]' '[:lower:]' | sed -e 's/[^a-z0-9-]//g' -e 's/--+/--/g' -e 's/^-*//' -e 's/-*$//' -e 's/-*-/-/g' | cut -c1-21 ) + [ "${branch: -1}" == "-" ] && branch=${branch: : -1} # If branch ends with '-' removing last character + cluster_name=${{ env.ENV_IN_A_CLICK_CLUSTER_NAME_PREFIX }}-$unique_branch_id-$branch + echo cluster_name=$cluster_name >> $GITHUB_OUTPUT + version="0.0.0-$((GITHUB_RUN_NUMBER + 1000000)).$branch-$short_sha" + echo version=$version >> $GITHUB_OUTPUT + echo $version + echo $cluster_name + + get-service-list: + name: Get service list + needs: env + uses: run-ai/runai-actions/.github/workflows/get-service-list-v2.yml@main + secrets: inherit + with: + service_list: ${{ needs.env.outputs.SERVICE_LIST }} + + docker-login: + name: Docker login + uses: run-ai/runai-actions/.github/workflows/docker-login-v2.yaml@main + needs: env + secrets: inherit + with: + env: ${{ needs.env.outputs.ENVIRONMENT }} + + make: + name: Make + needs: [get-service-list, env, docker-login] + strategy: + fail-fast: false + matrix: + service_list: ${{ fromJson(needs.get-service-list.outputs.service_list).service_list }} + uses: run-ai/runai-actions/.github/workflows/make-v2.yml@main + secrets: inherit + with: + service_name: ${{ matrix.service_list }} + version: ${{ needs.env.outputs.VERSION }} + registry: ${{ needs.env.outputs.CONTAINER_REGISTRY }} + env: ${{ needs.env.outputs.ENVIRONMENT }} + + build-and-push: + name: Build and push + needs: [make, env, get-service-list] + uses: run-ai/runai-actions/.github/workflows/build-and-push-v2.yml@main + strategy: + fail-fast: false + matrix: + service_list: ${{ fromJson(needs.get-service-list.outputs.service_list).service_list }} + secrets: inherit + with: + service_name: ${{ matrix.service_list }} + container_registry: ${{ needs.env.outputs.CONTAINER_REGISTRY }} + helm_registry: ${{ needs.env.outputs.HELM_REGISTRY }} + version: ${{ needs.env.outputs.VERSION }} + env: ${{ needs.env.outputs.ENVIRONMENT }} + + setup-env: + name: Setup environment + needs: env + uses: run-ai/runai-actions/.github/workflows/create-env-in-a-click-v2.yml@main + secrets: inherit + with: + cluster_name: ${{ needs.env.outputs.CLUSTER_NAME }} + runai-cluster-enabled: false + runai-control-plane-enabled: false + knative-operator: true + secret-name: ${{ needs.env.outputs.ARGO_CD_SECRET_NAME }} + team-name: ${{ needs.env.outputs.ARGO_CD_TEAM_NAME }} + fake-gpu-version: ${{ needs.env.outputs.VERSION }} + wait-for-sync: true + + send-logs-to-loki: + name: Send logs to Loki + needs: + [ + env, + get-service-list, + docker-login, + setup-env, + make, + build-and-push, + ] + if: failure() || success() + uses: run-ai/runai-actions/.github/workflows/send-log-to-loki-v2.yml@main + secrets: inherit diff --git a/.github/workflows/ci-pr-to-v.yml b/.github/workflows/ci-pr-to-v.yml new file mode 100644 index 0000000..9d72cd8 --- /dev/null +++ b/.github/workflows/ci-pr-to-v.yml @@ -0,0 +1,140 @@ +name: CI - pull-request to v* branch + +on: + pull_request: + paths-ignore: + - ".github/**" + branches: + - "v*.*" + +concurrency: + group: ${{ github.head_ref || github.ref || github.run_id }} + cancel-in-progress: false + +permissions: + checks: write + contents: read + pull-requests: write + id-token: write + security-events: write + actions: read + repository-projects: read + +env: + ENVIRONMENT: "lab" + CONTAINER_REGISTRY: "fake-gpu-operator-containers-lab" + HELM_REGISTRY: "fake-gpu-operator-charts-lab" + ENV_IN_A_CLICK_CLUSTER_NAME_PREFIX: "fgo" # fake-gpu-operator short + ARGO_CD_SECRET_NAME: "INFRA_ARGOCD_TOKEN_CICD" + ARGO_CD_TEAM_NAME: "cicd" + SERVICE_LIST: "fake-gpu-operator + fake-gpu-operator-chart" + +jobs: + env: + runs-on: ubuntu-latest + name: Set environment + outputs: + ENVIRONMENT: ${{ env.ENVIRONMENT }} + CONTAINER_REGISTRY: ${{ env.CONTAINER_REGISTRY }} + VERSION: ${{ steps.env.outputs.version }} + HELM_REGISTRY: ${{ env.HELM_REGISTRY }} + CLUSTER_NAME: ${{ steps.env.outputs.cluster_name }} + SERVICE_LIST: ${{ env.SERVICE_LIST }} + ARGO_CD_SECRET_NAME: ${{ env.ARGO_CD_SECRET_NAME }} + ARGO_CD_TEAM_NAME: ${{ env.ARGO_CD_TEAM_NAME }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: set env + id: env + run: | + short_sha=$(echo ${{ github.event.pull_request.head.sha }} | cut -c1-7) + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} + branch_name_md5=$(echo $branch | md5sum | cut -d' ' -f1 ) + unique_branch_id=${branch_name_md5: -4} + branch=$(echo $branch | tr '[:upper:]' '[:lower:]' | sed -e 's/[^a-z0-9-]//g' -e 's/--+/--/g' -e 's/^-*//' -e 's/-*$//' -e 's/-*-/-/g' | cut -c1-21 ) + [ "${branch: -1}" == "-" ] && branch=${branch: : -1} # If branch ends with '-' removing last character + cluster_name=${{ env.ENV_IN_A_CLICK_CLUSTER_NAME_PREFIX }}-$unique_branch_id-$branch + echo cluster_name=$cluster_name >> $GITHUB_OUTPUT + version="0.0.0-$((GITHUB_RUN_NUMBER + 1000000)).$branch-$short_sha" + echo version=$version >> $GITHUB_OUTPUT + echo $version + echo $cluster_name + + get-service-list: + name: Get service list + needs: env + uses: run-ai/runai-actions/.github/workflows/get-service-list-v2.yml@main + secrets: inherit + with: + service_list: ${{ needs.env.outputs.SERVICE_LIST }} + + docker-login: + name: Docker login + uses: run-ai/runai-actions/.github/workflows/docker-login-v2.yaml@main + needs: env + secrets: inherit + with: + env: ${{ needs.env.outputs.ENVIRONMENT }} + + make: + name: Make + needs: [get-service-list, env, docker-login] + strategy: + fail-fast: false + matrix: + service_list: ${{ fromJson(needs.get-service-list.outputs.service_list).service_list }} + uses: run-ai/runai-actions/.github/workflows/make-v2.yml@main + secrets: inherit + with: + service_name: ${{ matrix.service_list }} + version: ${{ needs.env.outputs.VERSION }} + registry: ${{ needs.env.outputs.CONTAINER_REGISTRY }} + env: ${{ needs.env.outputs.ENVIRONMENT }} + + build-and-push: + name: Build and push + needs: [make, env, get-service-list] + uses: run-ai/runai-actions/.github/workflows/build-and-push-v2.yml@main + strategy: + fail-fast: false + matrix: + service_list: ${{ fromJson(needs.get-service-list.outputs.service_list).service_list }} + secrets: inherit + with: + service_name: ${{ matrix.service_list }} + container_registry: ${{ needs.env.outputs.CONTAINER_REGISTRY }} + helm_registry: ${{ needs.env.outputs.HELM_REGISTRY }} + version: ${{ needs.env.outputs.VERSION }} + env: ${{ needs.env.outputs.ENVIRONMENT }} + + setup-env: + name: Setup environment + needs: env + uses: run-ai/runai-actions/.github/workflows/create-env-in-a-click-v2.yml@main + secrets: inherit + with: + cluster_name: ${{ needs.env.outputs.CLUSTER_NAME }} + runai-cluster-enabled: false + runai-control-plane-enabled: false + knative-operator: true + secret-name: ${{ needs.env.outputs.ARGO_CD_SECRET_NAME }} + team-name: ${{ needs.env.outputs.ARGO_CD_TEAM_NAME }} + fake-gpu-version: ${{ needs.env.outputs.VERSION }} + wait-for-sync: true + + send-logs-to-loki: + name: Send logs to Loki + needs: + [ + env, + get-service-list, + docker-login, + setup-env, + make, + build-and-push, + ] + if: failure() || success() + uses: run-ai/runai-actions/.github/workflows/send-log-to-loki-v2.yml@main + secrets: inherit diff --git a/.github/workflows/ci-tag.yml b/.github/workflows/ci-tag.yml new file mode 100644 index 0000000..cebe0d9 --- /dev/null +++ b/.github/workflows/ci-tag.yml @@ -0,0 +1,205 @@ +name: CI - tag + +on: + push: + paths-ignore: + - ".github/**" + tags: + - "[0-9].*.*" + +concurrency: + group: ${{ github.head_ref || github.ref || github.run_id }} + cancel-in-progress: false + +permissions: + checks: write + contents: read + pull-requests: write + id-token: write + security-events: write + actions: read + repository-projects: read + +env: + STAGING_ENVIRONMENT: "staging" + PROD_ENVIRONMENT: "prod" + STAGING_CONTAINER_REGISTRY: "fake-gpu-operator-containers-staging" + PROD_CONTAINER_REGISTRY: "fake-gpu-operator-containers-prod" + STAGING_HELM_REGISTRY: "fake-gpu-operator-charts-staging" + PROD_HELM_REGISTRY: "fake-gpu-operator-charts-staging" + ENV_IN_A_CLICK_CLUSTER_NAME_PREFIX: "fgo" # fake-gpu-operator short + ARGO_CD_SECRET_NAME: "INFRA_ARGOCD_TOKEN_CICD" + ARGO_CD_TEAM_NAME: "cicd" + SERVICE_LIST: "fake-gpu-operator + fake-gpu-operator-chart" + +jobs: + env: + runs-on: ubuntu-latest + name: Set environment + outputs: + PROD_ENVIRONMENT: ${{ env.PROD_ENVIRONMENT }} + STAGING_ENVIRONMENT: ${{ env.STAGING_ENVIRONMENT }} + STAGING_CONTAINER_REGISTRY: ${{ env.STAGING_CONTAINER_REGISTRY }} + PROD_CONTAINER_REGISTRY: ${{ env.PROD_CONTAINER_REGISTRY }} + VERSION: ${{ steps.env.outputs.version }} + STAGING_HELM_REGISTRY: ${{ env.STAGING_HELM_REGISTRY }} + PROD_HELM_REGISTRY: ${{ env.PROD_HELM_REGISTRY }} + CLUSTER_NAME: ${{ steps.env.outputs.cluster_name }} + SERVICE_LIST: ${{ env.SERVICE_LIST }} + ARGO_CD_SECRET_NAME: ${{ env.ARGO_CD_SECRET_NAME }} + ARGO_CD_TEAM_NAME: ${{ env.ARGO_CD_TEAM_NAME }} + DEPLOY_TO_PROD: ${{ steps.env.outputs.deploy_to_prod }} + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: set env + id: env + run: | + branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} + branch_name_md5=$(echo $branch | md5sum | cut -d' ' -f1 ) + unique_branch_id=${branch_name_md5: -4} + branch=$(echo $branch | tr '[:upper:]' '[:lower:]' | sed -e 's/[^a-z0-9-]//g' -e 's/--+/--/g' -e 's/^-*//' -e 's/-*$//' -e 's/-*-/-/g' | cut -c1-21 ) + [ "${branch: -1}" == "-" ] && branch=${branch: : -1} # If branch ends with '-' removing last character + cluster_name=${{ env.ENV_IN_A_CLICK_CLUSTER_NAME_PREFIX }}-$unique_branch_id-$branch + echo cluster_name=$cluster_name >> $GITHUB_OUTPUT + version="${{ github.ref_name }}" + deploy_to_prod=false + if [[ $version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "Deploying to production" + deploy_to_prod=true + fi + echo deploy_to_prod=$deploy_to_prod >> $GITHUB_OUTPUT + echo version=$version >> $GITHUB_OUTPUT + echo $version + echo $cluster_name + + get-service-list: + name: Get service list + needs: env + uses: run-ai/runai-actions/.github/workflows/get-service-list-v2.yml@main + secrets: inherit + with: + service_list: ${{ needs.env.outputs.SERVICE_LIST }} + + docker-login: + name: Docker login + uses: run-ai/runai-actions/.github/workflows/docker-login-v2.yaml@main + needs: env + secrets: inherit + with: + env: ${{ needs.env.outputs.STAGING_ENVIRONMENT }} + + make: + name: Make + needs: [get-service-list, env, docker-login] + strategy: + fail-fast: false + matrix: + service_list: ${{ fromJson(needs.get-service-list.outputs.service_list).service_list }} + uses: run-ai/runai-actions/.github/workflows/make-v2.yml@main + secrets: inherit + with: + service_name: ${{ matrix.service_list }} + version: ${{ needs.env.outputs.VERSION }} + registry: ${{ needs.env.outputs.STAGING_CONTAINER_REGISTRY }} + env: ${{ needs.env.outputs.STAGING_ENVIRONMENT }} + + build-and-push-staging: + name: Build and push + needs: [make, env, get-service-list] + uses: run-ai/runai-actions/.github/workflows/build-and-push-v2.yml@main + strategy: + fail-fast: false + matrix: + service_list: ${{ fromJson(needs.get-service-list.outputs.service_list).service_list }} + secrets: inherit + with: + service_name: ${{ matrix.service_list }} + container_registry: ${{ needs.env.outputs.STAGING_CONTAINER_REGISTRY }} + helm_registry: ${{ needs.env.outputs.STAGING_HELM_REGISTRY }} + version: ${{ needs.env.outputs.VERSION }} + env: ${{ needs.env.outputs.STAGING_ENVIRONMENT }} + + setup-env: + name: Setup environment + needs: env + uses: run-ai/runai-actions/.github/workflows/create-env-in-a-click-v2.yml@main + secrets: inherit + with: + cluster_name: ${{ needs.env.outputs.CLUSTER_NAME }} + runai-cluster-enabled: false + runai-control-plane-enabled: false + knative-operator: true + secret-name: ${{ needs.env.outputs.ARGO_CD_SECRET_NAME }} + team-name: ${{ needs.env.outputs.ARGO_CD_TEAM_NAME }} + fake-gpu-version: ${{ needs.env.outputs.VERSION }} + wait-for-sync: true + + wait-for-approval: + if: ${{ needs.env.outputs.DEPLOY_TO_PROD == 'true' }} + name: Wait for approval + environment: prod + needs: [setup-env, env] + runs-on: ubuntu-latest + steps: + - name: Wait for approval to deploy to production + run: | + echo "Waiting for approval" + + promote-artifacts: + name: Promote artifacts + needs: [env, wait-for-approval, get-service-list] + uses: run-ai/runai-actions/.github/workflows/promote-artifacts-v2.yml@main + secrets: inherit + strategy: + fail-fast: false + matrix: + service_list: ${{ fromJson(needs.get-service-list.outputs.service_list).service_list }} + with: + service_name: ${{ matrix.service_list }} + version: ${{ needs.env.outputs.VERSION }} + from_env: ${{ needs.env.outputs.STAGING_ENVIRONMENT }} + to_env: ${{ needs.env.outputs.PROD_ENVIRONMENT }} + from_container_registry: ${{ needs.env.outputs.STAGING_CONTAINER_REGISTRY }} + to_container_registry: ${{ needs.env.outputs.PROD_CONTAINER_REGISTRY }} + + make-prod: + name: Make fake-gpu-operator-chart only + needs: [promote-artifacts, env] + uses: run-ai/runai-actions/.github/workflows/make-v2.yml@main + secrets: inherit + with: + service_name: fake-gpu-operator-chart + version: ${{ needs.env.outputs.VERSION }} + registry: ${{ needs.env.outputs.PROD_CONTAINER_REGISTRY }} + env: ${{ needs.env.outputs.PROD_ENVIRONMENT }} + + build-and-push-prod: + name: Build and push fake-gpu-operator-chart only + needs: [env, make-prod] + uses: run-ai/runai-actions/.github/workflows/build-and-push-v2.yml@main + secrets: inherit + with: + service_name: fake-gpu-operator-chart + helm_registry: ${{ needs.env.outputs.PROD_HELM_REGISTRY }} + version: ${{ needs.env.outputs.VERSION }} + env: ${{ needs.env.outputs.PROD_ENVIRONMENT }} + + send-logs-to-loki: + name: Send logs to Loki + needs: + [ + env, + get-service-list, + docker-login, + setup-env, + make, + build-and-push-staging, + promote-artifacts, + make-prod, + build-and-push-prod, + ] + if: failure() || success() + uses: run-ai/runai-actions/.github/workflows/send-log-to-loki-v2.yml@main + secrets: inherit diff --git a/deploy/fake-gpu-operator/.helmignore b/fake-gpu-operator-chart/.helmignore similarity index 100% rename from deploy/fake-gpu-operator/.helmignore rename to fake-gpu-operator-chart/.helmignore diff --git a/deploy/fake-gpu-operator/Chart.yaml b/fake-gpu-operator-chart/Chart.yaml similarity index 100% rename from deploy/fake-gpu-operator/Chart.yaml rename to fake-gpu-operator-chart/Chart.yaml diff --git a/deploy/fake-gpu-operator/crds/nvidia.com_clusterpolicies.yaml b/fake-gpu-operator-chart/crds/nvidia.com_clusterpolicies.yaml similarity index 100% rename from deploy/fake-gpu-operator/crds/nvidia.com_clusterpolicies.yaml rename to fake-gpu-operator-chart/crds/nvidia.com_clusterpolicies.yaml diff --git a/deploy/fake-gpu-operator/templates/device-plugin/_helpers.tpl b/fake-gpu-operator-chart/templates/device-plugin/_helpers.tpl similarity index 100% rename from deploy/fake-gpu-operator/templates/device-plugin/_helpers.tpl rename to fake-gpu-operator-chart/templates/device-plugin/_helpers.tpl diff --git a/deploy/fake-gpu-operator/templates/device-plugin/clusterrole.yaml b/fake-gpu-operator-chart/templates/device-plugin/clusterrole.yaml similarity index 100% rename from deploy/fake-gpu-operator/templates/device-plugin/clusterrole.yaml rename to fake-gpu-operator-chart/templates/device-plugin/clusterrole.yaml diff --git a/deploy/fake-gpu-operator/templates/device-plugin/clusterrolebinding.yaml b/fake-gpu-operator-chart/templates/device-plugin/clusterrolebinding.yaml similarity index 100% rename from deploy/fake-gpu-operator/templates/device-plugin/clusterrolebinding.yaml rename to fake-gpu-operator-chart/templates/device-plugin/clusterrolebinding.yaml diff --git a/deploy/fake-gpu-operator/templates/device-plugin/daemonset.yml b/fake-gpu-operator-chart/templates/device-plugin/daemonset.yml similarity index 100% rename from deploy/fake-gpu-operator/templates/device-plugin/daemonset.yml rename to fake-gpu-operator-chart/templates/device-plugin/daemonset.yml diff --git a/deploy/fake-gpu-operator/templates/device-plugin/deployment-template.yaml b/fake-gpu-operator-chart/templates/device-plugin/deployment-template.yaml similarity index 100% rename from deploy/fake-gpu-operator/templates/device-plugin/deployment-template.yaml rename to fake-gpu-operator-chart/templates/device-plugin/deployment-template.yaml diff --git a/deploy/fake-gpu-operator/templates/device-plugin/ocp/rbac.yml b/fake-gpu-operator-chart/templates/device-plugin/ocp/rbac.yml similarity index 100% rename from deploy/fake-gpu-operator/templates/device-plugin/ocp/rbac.yml rename to fake-gpu-operator-chart/templates/device-plugin/ocp/rbac.yml diff --git a/deploy/fake-gpu-operator/templates/device-plugin/serviceaccount.yml b/fake-gpu-operator-chart/templates/device-plugin/serviceaccount.yml similarity index 100% rename from deploy/fake-gpu-operator/templates/device-plugin/serviceaccount.yml rename to fake-gpu-operator-chart/templates/device-plugin/serviceaccount.yml diff --git a/deploy/fake-gpu-operator/templates/gpu-operator/deployment.yml b/fake-gpu-operator-chart/templates/gpu-operator/deployment.yml similarity index 100% rename from deploy/fake-gpu-operator/templates/gpu-operator/deployment.yml rename to fake-gpu-operator-chart/templates/gpu-operator/deployment.yml diff --git a/deploy/fake-gpu-operator/templates/mig-faker/clusterrole.yaml b/fake-gpu-operator-chart/templates/mig-faker/clusterrole.yaml similarity index 100% rename from deploy/fake-gpu-operator/templates/mig-faker/clusterrole.yaml rename to fake-gpu-operator-chart/templates/mig-faker/clusterrole.yaml diff --git a/deploy/fake-gpu-operator/templates/mig-faker/clusterrolebinding.yaml b/fake-gpu-operator-chart/templates/mig-faker/clusterrolebinding.yaml similarity index 100% rename from deploy/fake-gpu-operator/templates/mig-faker/clusterrolebinding.yaml rename to fake-gpu-operator-chart/templates/mig-faker/clusterrolebinding.yaml diff --git a/deploy/fake-gpu-operator/templates/mig-faker/daemonset.yml b/fake-gpu-operator-chart/templates/mig-faker/daemonset.yml similarity index 100% rename from deploy/fake-gpu-operator/templates/mig-faker/daemonset.yml rename to fake-gpu-operator-chart/templates/mig-faker/daemonset.yml diff --git a/deploy/fake-gpu-operator/templates/mig-faker/serviceaccount.yml b/fake-gpu-operator-chart/templates/mig-faker/serviceaccount.yml similarity index 100% rename from deploy/fake-gpu-operator/templates/mig-faker/serviceaccount.yml rename to fake-gpu-operator-chart/templates/mig-faker/serviceaccount.yml diff --git a/deploy/fake-gpu-operator/templates/runtime-class.yml b/fake-gpu-operator-chart/templates/runtime-class.yml similarity index 100% rename from deploy/fake-gpu-operator/templates/runtime-class.yml rename to fake-gpu-operator-chart/templates/runtime-class.yml diff --git a/deploy/fake-gpu-operator/templates/status-exporter/_helpers.tpl b/fake-gpu-operator-chart/templates/status-exporter/_helpers.tpl similarity index 100% rename from deploy/fake-gpu-operator/templates/status-exporter/_helpers.tpl rename to fake-gpu-operator-chart/templates/status-exporter/_helpers.tpl diff --git a/deploy/fake-gpu-operator/templates/status-exporter/clusterrole.yaml b/fake-gpu-operator-chart/templates/status-exporter/clusterrole.yaml similarity index 100% rename from deploy/fake-gpu-operator/templates/status-exporter/clusterrole.yaml rename to fake-gpu-operator-chart/templates/status-exporter/clusterrole.yaml diff --git a/deploy/fake-gpu-operator/templates/status-exporter/clusterrolebinding.yaml b/fake-gpu-operator-chart/templates/status-exporter/clusterrolebinding.yaml similarity index 100% rename from deploy/fake-gpu-operator/templates/status-exporter/clusterrolebinding.yaml rename to fake-gpu-operator-chart/templates/status-exporter/clusterrolebinding.yaml diff --git a/deploy/fake-gpu-operator/templates/status-exporter/daemonset.yaml b/fake-gpu-operator-chart/templates/status-exporter/daemonset.yaml similarity index 100% rename from deploy/fake-gpu-operator/templates/status-exporter/daemonset.yaml rename to fake-gpu-operator-chart/templates/status-exporter/daemonset.yaml diff --git a/deploy/fake-gpu-operator/templates/status-exporter/deployment-template.yaml b/fake-gpu-operator-chart/templates/status-exporter/deployment-template.yaml similarity index 100% rename from deploy/fake-gpu-operator/templates/status-exporter/deployment-template.yaml rename to fake-gpu-operator-chart/templates/status-exporter/deployment-template.yaml diff --git a/deploy/fake-gpu-operator/templates/status-exporter/service.yaml b/fake-gpu-operator-chart/templates/status-exporter/service.yaml similarity index 100% rename from deploy/fake-gpu-operator/templates/status-exporter/service.yaml rename to fake-gpu-operator-chart/templates/status-exporter/service.yaml diff --git a/deploy/fake-gpu-operator/templates/status-exporter/serviceaccount.yaml b/fake-gpu-operator-chart/templates/status-exporter/serviceaccount.yaml similarity index 100% rename from deploy/fake-gpu-operator/templates/status-exporter/serviceaccount.yaml rename to fake-gpu-operator-chart/templates/status-exporter/serviceaccount.yaml diff --git a/deploy/fake-gpu-operator/templates/status-updater/clusterrole.yaml b/fake-gpu-operator-chart/templates/status-updater/clusterrole.yaml similarity index 100% rename from deploy/fake-gpu-operator/templates/status-updater/clusterrole.yaml rename to fake-gpu-operator-chart/templates/status-updater/clusterrole.yaml diff --git a/deploy/fake-gpu-operator/templates/status-updater/clusterrolebinding.yaml b/fake-gpu-operator-chart/templates/status-updater/clusterrolebinding.yaml similarity index 100% rename from deploy/fake-gpu-operator/templates/status-updater/clusterrolebinding.yaml rename to fake-gpu-operator-chart/templates/status-updater/clusterrolebinding.yaml diff --git a/deploy/fake-gpu-operator/templates/status-updater/deployment.yaml b/fake-gpu-operator-chart/templates/status-updater/deployment.yaml similarity index 100% rename from deploy/fake-gpu-operator/templates/status-updater/deployment.yaml rename to fake-gpu-operator-chart/templates/status-updater/deployment.yaml diff --git a/deploy/fake-gpu-operator/templates/status-updater/role.yaml b/fake-gpu-operator-chart/templates/status-updater/role.yaml similarity index 100% rename from deploy/fake-gpu-operator/templates/status-updater/role.yaml rename to fake-gpu-operator-chart/templates/status-updater/role.yaml diff --git a/deploy/fake-gpu-operator/templates/status-updater/rolebinding.yaml b/fake-gpu-operator-chart/templates/status-updater/rolebinding.yaml similarity index 100% rename from deploy/fake-gpu-operator/templates/status-updater/rolebinding.yaml rename to fake-gpu-operator-chart/templates/status-updater/rolebinding.yaml diff --git a/deploy/fake-gpu-operator/templates/status-updater/serviceaccount.yaml b/fake-gpu-operator-chart/templates/status-updater/serviceaccount.yaml similarity index 100% rename from deploy/fake-gpu-operator/templates/status-updater/serviceaccount.yaml rename to fake-gpu-operator-chart/templates/status-updater/serviceaccount.yaml diff --git a/deploy/fake-gpu-operator/templates/topology-cm.yml b/fake-gpu-operator-chart/templates/topology-cm.yml similarity index 100% rename from deploy/fake-gpu-operator/templates/topology-cm.yml rename to fake-gpu-operator-chart/templates/topology-cm.yml diff --git a/deploy/fake-gpu-operator/templates/topology-server/clusterrole.yaml b/fake-gpu-operator-chart/templates/topology-server/clusterrole.yaml similarity index 100% rename from deploy/fake-gpu-operator/templates/topology-server/clusterrole.yaml rename to fake-gpu-operator-chart/templates/topology-server/clusterrole.yaml diff --git a/deploy/fake-gpu-operator/templates/topology-server/clusterrolebinding.yaml b/fake-gpu-operator-chart/templates/topology-server/clusterrolebinding.yaml similarity index 100% rename from deploy/fake-gpu-operator/templates/topology-server/clusterrolebinding.yaml rename to fake-gpu-operator-chart/templates/topology-server/clusterrolebinding.yaml diff --git a/deploy/fake-gpu-operator/templates/topology-server/deployment.yaml b/fake-gpu-operator-chart/templates/topology-server/deployment.yaml similarity index 100% rename from deploy/fake-gpu-operator/templates/topology-server/deployment.yaml rename to fake-gpu-operator-chart/templates/topology-server/deployment.yaml diff --git a/deploy/fake-gpu-operator/templates/topology-server/service.yaml b/fake-gpu-operator-chart/templates/topology-server/service.yaml similarity index 100% rename from deploy/fake-gpu-operator/templates/topology-server/service.yaml rename to fake-gpu-operator-chart/templates/topology-server/service.yaml diff --git a/deploy/fake-gpu-operator/templates/topology-server/serviceaccount.yaml b/fake-gpu-operator-chart/templates/topology-server/serviceaccount.yaml similarity index 100% rename from deploy/fake-gpu-operator/templates/topology-server/serviceaccount.yaml rename to fake-gpu-operator-chart/templates/topology-server/serviceaccount.yaml diff --git a/deploy/fake-gpu-operator/values.yaml b/fake-gpu-operator-chart/values.yaml similarity index 100% rename from deploy/fake-gpu-operator/values.yaml rename to fake-gpu-operator-chart/values.yaml diff --git a/.dockerignore b/fake-gpu-operator/.dockerignore similarity index 100% rename from .dockerignore rename to fake-gpu-operator/.dockerignore diff --git a/.gitignore b/fake-gpu-operator/.gitignore similarity index 100% rename from .gitignore rename to fake-gpu-operator/.gitignore diff --git a/Dockerfile b/fake-gpu-operator/Dockerfile similarity index 100% rename from Dockerfile rename to fake-gpu-operator/Dockerfile diff --git a/LICENSE b/fake-gpu-operator/LICENSE similarity index 100% rename from LICENSE rename to fake-gpu-operator/LICENSE diff --git a/Makefile b/fake-gpu-operator/Makefile similarity index 100% rename from Makefile rename to fake-gpu-operator/Makefile diff --git a/cmd/device-plugin/main.go b/fake-gpu-operator/cmd/device-plugin/main.go similarity index 100% rename from cmd/device-plugin/main.go rename to fake-gpu-operator/cmd/device-plugin/main.go diff --git a/cmd/mig-faker/main.go b/fake-gpu-operator/cmd/mig-faker/main.go similarity index 100% rename from cmd/mig-faker/main.go rename to fake-gpu-operator/cmd/mig-faker/main.go diff --git a/cmd/nvidia-smi/main.go b/fake-gpu-operator/cmd/nvidia-smi/main.go similarity index 100% rename from cmd/nvidia-smi/main.go rename to fake-gpu-operator/cmd/nvidia-smi/main.go diff --git a/cmd/preloader/main.c b/fake-gpu-operator/cmd/preloader/main.c similarity index 100% rename from cmd/preloader/main.c rename to fake-gpu-operator/cmd/preloader/main.c diff --git a/cmd/status-exporter/main.go b/fake-gpu-operator/cmd/status-exporter/main.go similarity index 100% rename from cmd/status-exporter/main.go rename to fake-gpu-operator/cmd/status-exporter/main.go diff --git a/cmd/status-updater/main.go b/fake-gpu-operator/cmd/status-updater/main.go similarity index 100% rename from cmd/status-updater/main.go rename to fake-gpu-operator/cmd/status-updater/main.go diff --git a/cmd/topology-server/main.go b/fake-gpu-operator/cmd/topology-server/main.go similarity index 100% rename from cmd/topology-server/main.go rename to fake-gpu-operator/cmd/topology-server/main.go diff --git a/design/GPU Mock design.md b/fake-gpu-operator/design/GPU Mock design.md similarity index 100% rename from design/GPU Mock design.md rename to fake-gpu-operator/design/GPU Mock design.md diff --git a/design/MIG Metrics.md b/fake-gpu-operator/design/MIG Metrics.md similarity index 100% rename from design/MIG Metrics.md rename to fake-gpu-operator/design/MIG Metrics.md diff --git a/design/Node Autoscale.md b/fake-gpu-operator/design/Node Autoscale.md similarity index 100% rename from design/Node Autoscale.md rename to fake-gpu-operator/design/Node Autoscale.md diff --git a/design/RUN-4698.md b/fake-gpu-operator/design/RUN-4698.md similarity index 100% rename from design/RUN-4698.md rename to fake-gpu-operator/design/RUN-4698.md diff --git a/design/samples/2.17/fractional_pod.yaml b/fake-gpu-operator/design/samples/2.17/fractional_pod.yaml similarity index 100% rename from design/samples/2.17/fractional_pod.yaml rename to fake-gpu-operator/design/samples/2.17/fractional_pod.yaml diff --git a/design/samples/2.17/fractional_pod_reservation.yaml b/fake-gpu-operator/design/samples/2.17/fractional_pod_reservation.yaml similarity index 100% rename from design/samples/2.17/fractional_pod_reservation.yaml rename to fake-gpu-operator/design/samples/2.17/fractional_pod_reservation.yaml diff --git a/design/samples/<2.9/fraction/metrics/1_workload.ini b/fake-gpu-operator/design/samples/<2.9/fraction/metrics/1_workload.ini similarity index 100% rename from design/samples/<2.9/fraction/metrics/1_workload.ini rename to fake-gpu-operator/design/samples/<2.9/fraction/metrics/1_workload.ini diff --git a/design/samples/<2.9/fraction/node/1_workload.yaml b/fake-gpu-operator/design/samples/<2.9/fraction/node/1_workload.yaml similarity index 100% rename from design/samples/<2.9/fraction/node/1_workload.yaml rename to fake-gpu-operator/design/samples/<2.9/fraction/node/1_workload.yaml diff --git a/design/samples/<2.9/mig/metrics/4 Active Workloads.ini b/fake-gpu-operator/design/samples/<2.9/mig/metrics/4 Active Workloads.ini similarity index 100% rename from design/samples/<2.9/mig/metrics/4 Active Workloads.ini rename to fake-gpu-operator/design/samples/<2.9/mig/metrics/4 Active Workloads.ini diff --git a/design/samples/<2.9/mig/metrics/Active 1g.5gb.ini b/fake-gpu-operator/design/samples/<2.9/mig/metrics/Active 1g.5gb.ini similarity index 100% rename from design/samples/<2.9/mig/metrics/Active 1g.5gb.ini rename to fake-gpu-operator/design/samples/<2.9/mig/metrics/Active 1g.5gb.ini diff --git a/design/samples/<2.9/mig/metrics/Active 2*1g.5gb + 2g.10gb.ini b/fake-gpu-operator/design/samples/<2.9/mig/metrics/Active 2*1g.5gb + 2g.10gb.ini similarity index 100% rename from design/samples/<2.9/mig/metrics/Active 2*1g.5gb + 2g.10gb.ini rename to fake-gpu-operator/design/samples/<2.9/mig/metrics/Active 2*1g.5gb + 2g.10gb.ini diff --git a/design/samples/<2.9/mig/metrics/Empty mig disabled.ini b/fake-gpu-operator/design/samples/<2.9/mig/metrics/Empty mig disabled.ini similarity index 100% rename from design/samples/<2.9/mig/metrics/Empty mig disabled.ini rename to fake-gpu-operator/design/samples/<2.9/mig/metrics/Empty mig disabled.ini diff --git a/design/samples/<2.9/mig/metrics/Emtpy MIG enabled.ini b/fake-gpu-operator/design/samples/<2.9/mig/metrics/Emtpy MIG enabled.ini similarity index 100% rename from design/samples/<2.9/mig/metrics/Emtpy MIG enabled.ini rename to fake-gpu-operator/design/samples/<2.9/mig/metrics/Emtpy MIG enabled.ini diff --git a/design/samples/<2.9/mig/metrics/Idle 1g.5gb allocated.ini b/fake-gpu-operator/design/samples/<2.9/mig/metrics/Idle 1g.5gb allocated.ini similarity index 100% rename from design/samples/<2.9/mig/metrics/Idle 1g.5gb allocated.ini rename to fake-gpu-operator/design/samples/<2.9/mig/metrics/Idle 1g.5gb allocated.ini diff --git a/design/samples/<2.9/mig/node/3_instances.yaml b/fake-gpu-operator/design/samples/<2.9/mig/node/3_instances.yaml similarity index 100% rename from design/samples/<2.9/mig/node/3_instances.yaml rename to fake-gpu-operator/design/samples/<2.9/mig/node/3_instances.yaml diff --git a/design/samples/<2.9/mig/node/4_instances.yaml b/fake-gpu-operator/design/samples/<2.9/mig/node/4_instances.yaml similarity index 100% rename from design/samples/<2.9/mig/node/4_instances.yaml rename to fake-gpu-operator/design/samples/<2.9/mig/node/4_instances.yaml diff --git a/design/samples/<2.9/mig/pod/1g-5gb.yaml b/fake-gpu-operator/design/samples/<2.9/mig/pod/1g-5gb.yaml similarity index 100% rename from design/samples/<2.9/mig/pod/1g-5gb.yaml rename to fake-gpu-operator/design/samples/<2.9/mig/pod/1g-5gb.yaml diff --git a/design/samples/>=2.9/mig/node/7g-40gb.yaml b/fake-gpu-operator/design/samples/>=2.9/mig/node/7g-40gb.yaml similarity index 100% rename from design/samples/>=2.9/mig/node/7g-40gb.yaml rename to fake-gpu-operator/design/samples/>=2.9/mig/node/7g-40gb.yaml diff --git a/design/samples/>=2.9/mig/pod/7g-5gb.yaml b/fake-gpu-operator/design/samples/>=2.9/mig/pod/7g-5gb.yaml similarity index 100% rename from design/samples/>=2.9/mig/pod/7g-5gb.yaml rename to fake-gpu-operator/design/samples/>=2.9/mig/pod/7g-5gb.yaml diff --git a/example/deployment.yml b/fake-gpu-operator/example/deployment.yml similarity index 100% rename from example/deployment.yml rename to fake-gpu-operator/example/deployment.yml diff --git a/go.mod b/fake-gpu-operator/go.mod similarity index 100% rename from go.mod rename to fake-gpu-operator/go.mod diff --git a/go.sum b/fake-gpu-operator/go.sum similarity index 100% rename from go.sum rename to fake-gpu-operator/go.sum diff --git a/internal/common/app/app.go b/fake-gpu-operator/internal/common/app/app.go similarity index 100% rename from internal/common/app/app.go rename to fake-gpu-operator/internal/common/app/app.go diff --git a/internal/common/app/apprunner.go b/fake-gpu-operator/internal/common/app/apprunner.go similarity index 100% rename from internal/common/app/apprunner.go rename to fake-gpu-operator/internal/common/app/apprunner.go diff --git a/internal/common/app/apprunner_test.go b/fake-gpu-operator/internal/common/app/apprunner_test.go similarity index 100% rename from internal/common/app/apprunner_test.go rename to fake-gpu-operator/internal/common/app/apprunner_test.go diff --git a/internal/common/config/env.go b/fake-gpu-operator/internal/common/config/env.go similarity index 100% rename from internal/common/config/env.go rename to fake-gpu-operator/internal/common/config/env.go diff --git a/internal/common/constants/constants.go b/fake-gpu-operator/internal/common/constants/constants.go similarity index 100% rename from internal/common/constants/constants.go rename to fake-gpu-operator/internal/common/constants/constants.go diff --git a/internal/common/kubeclient/kubeclient.go b/fake-gpu-operator/internal/common/kubeclient/kubeclient.go similarity index 100% rename from internal/common/kubeclient/kubeclient.go rename to fake-gpu-operator/internal/common/kubeclient/kubeclient.go diff --git a/internal/common/kubeclient/kubeclient_mock.go b/fake-gpu-operator/internal/common/kubeclient/kubeclient_mock.go similarity index 100% rename from internal/common/kubeclient/kubeclient_mock.go rename to fake-gpu-operator/internal/common/kubeclient/kubeclient_mock.go diff --git a/internal/common/topology/const.go b/fake-gpu-operator/internal/common/topology/const.go similarity index 100% rename from internal/common/topology/const.go rename to fake-gpu-operator/internal/common/topology/const.go diff --git a/internal/common/topology/kubernetes.go b/fake-gpu-operator/internal/common/topology/kubernetes.go similarity index 100% rename from internal/common/topology/kubernetes.go rename to fake-gpu-operator/internal/common/topology/kubernetes.go diff --git a/internal/common/topology/podGpuUsageStatusMap.go b/fake-gpu-operator/internal/common/topology/podGpuUsageStatusMap.go similarity index 100% rename from internal/common/topology/podGpuUsageStatusMap.go rename to fake-gpu-operator/internal/common/topology/podGpuUsageStatusMap.go diff --git a/internal/common/topology/range.go b/fake-gpu-operator/internal/common/topology/range.go similarity index 100% rename from internal/common/topology/range.go rename to fake-gpu-operator/internal/common/topology/range.go diff --git a/internal/common/topology/types.go b/fake-gpu-operator/internal/common/topology/types.go similarity index 100% rename from internal/common/topology/types.go rename to fake-gpu-operator/internal/common/topology/types.go diff --git a/internal/deviceplugin/device_plugin.go b/fake-gpu-operator/internal/deviceplugin/device_plugin.go similarity index 100% rename from internal/deviceplugin/device_plugin.go rename to fake-gpu-operator/internal/deviceplugin/device_plugin.go diff --git a/internal/deviceplugin/fake_node.go b/fake-gpu-operator/internal/deviceplugin/fake_node.go similarity index 100% rename from internal/deviceplugin/fake_node.go rename to fake-gpu-operator/internal/deviceplugin/fake_node.go diff --git a/internal/deviceplugin/real_node.go b/fake-gpu-operator/internal/deviceplugin/real_node.go similarity index 100% rename from internal/deviceplugin/real_node.go rename to fake-gpu-operator/internal/deviceplugin/real_node.go diff --git a/internal/migfaker/app.go b/fake-gpu-operator/internal/migfaker/app.go similarity index 100% rename from internal/migfaker/app.go rename to fake-gpu-operator/internal/migfaker/app.go diff --git a/internal/migfaker/migfaker.go b/fake-gpu-operator/internal/migfaker/migfaker.go similarity index 100% rename from internal/migfaker/migfaker.go rename to fake-gpu-operator/internal/migfaker/migfaker.go diff --git a/internal/migfaker/migfaker_test.go b/fake-gpu-operator/internal/migfaker/migfaker_test.go similarity index 100% rename from internal/migfaker/migfaker_test.go rename to fake-gpu-operator/internal/migfaker/migfaker_test.go diff --git a/internal/migfaker/syncconfig.go b/fake-gpu-operator/internal/migfaker/syncconfig.go similarity index 100% rename from internal/migfaker/syncconfig.go rename to fake-gpu-operator/internal/migfaker/syncconfig.go diff --git a/internal/migfaker/types.go b/fake-gpu-operator/internal/migfaker/types.go similarity index 100% rename from internal/migfaker/types.go rename to fake-gpu-operator/internal/migfaker/types.go diff --git a/internal/status-exporter/app.go b/fake-gpu-operator/internal/status-exporter/app.go similarity index 100% rename from internal/status-exporter/app.go rename to fake-gpu-operator/internal/status-exporter/app.go diff --git a/internal/status-exporter/app_test.go b/fake-gpu-operator/internal/status-exporter/app_test.go similarity index 100% rename from internal/status-exporter/app_test.go rename to fake-gpu-operator/internal/status-exporter/app_test.go diff --git a/internal/status-exporter/export/exporter.go b/fake-gpu-operator/internal/status-exporter/export/exporter.go similarity index 100% rename from internal/status-exporter/export/exporter.go rename to fake-gpu-operator/internal/status-exporter/export/exporter.go diff --git a/internal/status-exporter/export/fs/exporter.go b/fake-gpu-operator/internal/status-exporter/export/fs/exporter.go similarity index 100% rename from internal/status-exporter/export/fs/exporter.go rename to fake-gpu-operator/internal/status-exporter/export/fs/exporter.go diff --git a/internal/status-exporter/export/labels/exporter.go b/fake-gpu-operator/internal/status-exporter/export/labels/exporter.go similarity index 100% rename from internal/status-exporter/export/labels/exporter.go rename to fake-gpu-operator/internal/status-exporter/export/labels/exporter.go diff --git a/internal/status-exporter/export/labels/exporter_test.go b/fake-gpu-operator/internal/status-exporter/export/labels/exporter_test.go similarity index 100% rename from internal/status-exporter/export/labels/exporter_test.go rename to fake-gpu-operator/internal/status-exporter/export/labels/exporter_test.go diff --git a/internal/status-exporter/export/metrics/exporter.go b/fake-gpu-operator/internal/status-exporter/export/metrics/exporter.go similarity index 100% rename from internal/status-exporter/export/metrics/exporter.go rename to fake-gpu-operator/internal/status-exporter/export/metrics/exporter.go diff --git a/internal/status-exporter/export/metrics/exporter_test.go b/fake-gpu-operator/internal/status-exporter/export/metrics/exporter_test.go similarity index 100% rename from internal/status-exporter/export/metrics/exporter_test.go rename to fake-gpu-operator/internal/status-exporter/export/metrics/exporter_test.go diff --git a/internal/status-exporter/export/metrics/metrics.go b/fake-gpu-operator/internal/status-exporter/export/metrics/metrics.go similarity index 100% rename from internal/status-exporter/export/metrics/metrics.go rename to fake-gpu-operator/internal/status-exporter/export/metrics/metrics.go diff --git a/internal/status-exporter/watch/kubewatcher.go b/fake-gpu-operator/internal/status-exporter/watch/kubewatcher.go similarity index 100% rename from internal/status-exporter/watch/kubewatcher.go rename to fake-gpu-operator/internal/status-exporter/watch/kubewatcher.go diff --git a/internal/status-exporter/watch/watch.go b/fake-gpu-operator/internal/status-exporter/watch/watch.go similarity index 100% rename from internal/status-exporter/watch/watch.go rename to fake-gpu-operator/internal/status-exporter/watch/watch.go diff --git a/internal/status-updater/app.go b/fake-gpu-operator/internal/status-updater/app.go similarity index 100% rename from internal/status-updater/app.go rename to fake-gpu-operator/internal/status-updater/app.go diff --git a/internal/status-updater/app_test.go b/fake-gpu-operator/internal/status-updater/app_test.go similarity index 100% rename from internal/status-updater/app_test.go rename to fake-gpu-operator/internal/status-updater/app_test.go diff --git a/internal/status-updater/controllers/controller.go b/fake-gpu-operator/internal/status-updater/controllers/controller.go similarity index 100% rename from internal/status-updater/controllers/controller.go rename to fake-gpu-operator/internal/status-updater/controllers/controller.go diff --git a/internal/status-updater/controllers/node/controller.go b/fake-gpu-operator/internal/status-updater/controllers/node/controller.go similarity index 100% rename from internal/status-updater/controllers/node/controller.go rename to fake-gpu-operator/internal/status-updater/controllers/node/controller.go diff --git a/internal/status-updater/controllers/pod/controller.go b/fake-gpu-operator/internal/status-updater/controllers/pod/controller.go similarity index 100% rename from internal/status-updater/controllers/pod/controller.go rename to fake-gpu-operator/internal/status-updater/controllers/pod/controller.go diff --git a/internal/status-updater/controllers/util/util.go b/fake-gpu-operator/internal/status-updater/controllers/util/util.go similarity index 100% rename from internal/status-updater/controllers/util/util.go rename to fake-gpu-operator/internal/status-updater/controllers/util/util.go diff --git a/internal/status-updater/handlers/node/fake_node_deployments.go b/fake-gpu-operator/internal/status-updater/handlers/node/fake_node_deployments.go similarity index 100% rename from internal/status-updater/handlers/node/fake_node_deployments.go rename to fake-gpu-operator/internal/status-updater/handlers/node/fake_node_deployments.go diff --git a/internal/status-updater/handlers/node/handler.go b/fake-gpu-operator/internal/status-updater/handlers/node/handler.go similarity index 100% rename from internal/status-updater/handlers/node/handler.go rename to fake-gpu-operator/internal/status-updater/handlers/node/handler.go diff --git a/internal/status-updater/handlers/node/topology_cm.go b/fake-gpu-operator/internal/status-updater/handlers/node/topology_cm.go similarity index 100% rename from internal/status-updater/handlers/node/topology_cm.go rename to fake-gpu-operator/internal/status-updater/handlers/node/topology_cm.go diff --git a/internal/status-updater/handlers/pod/dedicated_gpu_pod_handler.go b/fake-gpu-operator/internal/status-updater/handlers/pod/dedicated_gpu_pod_handler.go similarity index 100% rename from internal/status-updater/handlers/pod/dedicated_gpu_pod_handler.go rename to fake-gpu-operator/internal/status-updater/handlers/pod/dedicated_gpu_pod_handler.go diff --git a/internal/status-updater/handlers/pod/gpu_reservation_pod_handler.go b/fake-gpu-operator/internal/status-updater/handlers/pod/gpu_reservation_pod_handler.go similarity index 100% rename from internal/status-updater/handlers/pod/gpu_reservation_pod_handler.go rename to fake-gpu-operator/internal/status-updater/handlers/pod/gpu_reservation_pod_handler.go diff --git a/internal/status-updater/handlers/pod/gpu_usage_calculator.go b/fake-gpu-operator/internal/status-updater/handlers/pod/gpu_usage_calculator.go similarity index 100% rename from internal/status-updater/handlers/pod/gpu_usage_calculator.go rename to fake-gpu-operator/internal/status-updater/handlers/pod/gpu_usage_calculator.go diff --git a/internal/status-updater/handlers/pod/gpu_usage_calculator_test.go b/fake-gpu-operator/internal/status-updater/handlers/pod/gpu_usage_calculator_test.go similarity index 100% rename from internal/status-updater/handlers/pod/gpu_usage_calculator_test.go rename to fake-gpu-operator/internal/status-updater/handlers/pod/gpu_usage_calculator_test.go diff --git a/internal/status-updater/handlers/pod/handle_suite_test.go b/fake-gpu-operator/internal/status-updater/handlers/pod/handle_suite_test.go similarity index 100% rename from internal/status-updater/handlers/pod/handle_suite_test.go rename to fake-gpu-operator/internal/status-updater/handlers/pod/handle_suite_test.go diff --git a/internal/status-updater/handlers/pod/handler.go b/fake-gpu-operator/internal/status-updater/handlers/pod/handler.go similarity index 100% rename from internal/status-updater/handlers/pod/handler.go rename to fake-gpu-operator/internal/status-updater/handlers/pod/handler.go diff --git a/internal/status-updater/handlers/pod/shared_gpu_pod_handler.go b/fake-gpu-operator/internal/status-updater/handlers/pod/shared_gpu_pod_handler.go similarity index 100% rename from internal/status-updater/handlers/pod/shared_gpu_pod_handler.go rename to fake-gpu-operator/internal/status-updater/handlers/pod/shared_gpu_pod_handler.go diff --git a/internal/status-updater/util/util.go b/fake-gpu-operator/internal/status-updater/util/util.go similarity index 100% rename from internal/status-updater/util/util.go rename to fake-gpu-operator/internal/status-updater/util/util.go diff --git a/script/uploadChart.sh b/fake-gpu-operator/script/uploadChart.sh similarity index 100% rename from script/uploadChart.sh rename to fake-gpu-operator/script/uploadChart.sh