feat(namespace): add APPLICATIONS_NAMESPACE env var support to GetNamespace() #1134
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Tier 2 - Smoke test | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - incubation | |
| - stable | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| env: | |
| PR_NUMBER: ${{ github.event.pull_request.number || 'default-pr-number' }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build and push operator container image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| load: true | |
| tags: smoke/operator:pr-${{ github.event.pull_request.number || env.PR_NUMBER }} | |
| - name: Create k8s Kind Cluster | |
| uses: helm/kind-action@v1 | |
| with: | |
| node_image: kindest/node:v1.24.17 | |
| cluster_name: kind | |
| - name: Load the operator image into Kind | |
| run: | | |
| kind load docker-image smoke/operator:pr-${{ github.event.pull_request.number || env.PR_NUMBER }} | |
| - name: Install kustomize | |
| run: | | |
| curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash -s -- 5.7.0 | |
| sudo mv kustomize /usr/local/bin/ | |
| - name: Apply external CRDs | |
| run: | | |
| kubectl apply -f tests/crds/monitoring.coreos.com_servicemonitors.yaml | |
| kubectl apply -f tests/crds/route_crd.yaml | |
| kubectl apply -f tests/crds/serving.kserve.io_inferenceservices.yaml | |
| - name: Update params.env file | |
| run: | | |
| sed -i 's|trustyaiOperatorImage=quay.io/trustyai/trustyai-service-operator:latest|trustyaiOperatorImage=smoke/operator:pr-${{ github.event.pull_request.number || env.PR_NUMBER }}|' config/base/params.env | |
| - name: Deploy the operator with testing overlay | |
| run: | | |
| kubectl create namespace system | |
| openssl req -x509 -nodes -newkey rsa:2048 \ | |
| -keyout /tmp/tls.key -out /tmp/tls.crt -days 1 \ | |
| -subj '/CN=trustyai-service-operator-webhook-service.system.svc' | |
| kubectl create secret tls webhook-server-cert \ | |
| --cert=/tmp/tls.crt --key=/tmp/tls.key -n system | |
| kustomize build config/overlays/testing | sed 's/imagePullPolicy: Always/imagePullPolicy: IfNotPresent/g' | kubectl apply -n system -f - | |
| - name: Run smoke tests | |
| run: ./tests/smoke/test_smoke.sh | |
| env: | |
| PR_NUMBER: "default-pr-number" | |
| KUBECONFIG: "${HOME}/.kube/config" |