|
5 | 5 | - develop |
6 | 6 | - main |
7 | 7 | - feature** |
| 8 | + - CSPL-3776-vcluster-enablement |
8 | 9 | jobs: |
9 | 10 | build-operator-image: |
10 | 11 | runs-on: ubuntu-latest |
|
65 | 66 | runs-on: ubuntu-latest |
66 | 67 | needs: build-operator-image |
67 | 68 | env: |
68 | | - CLUSTER_NODES: 1 |
69 | | - CLUSTER_WORKERS: 3 |
70 | 69 | SPLUNK_ENTERPRISE_IMAGE: ${{ secrets.SPLUNK_ENTERPRISE_IMAGE }} |
71 | 70 | SPLUNK_OPERATOR_IMAGE_NAME: splunk/splunk-operator |
72 | 71 | SPLUNK_OPERATOR_IMAGE_FILENAME: splunk-operator |
|
85 | 84 | CLUSTER_WIDE: "true" |
86 | 85 | DEPLOYMENT_TYPE: "" |
87 | 86 | steps: |
88 | | - - name: Set Test Cluster Name |
89 | | - run: | |
90 | | - echo "TEST_CLUSTER_NAME=eks-integration-test-cluster-${{ matrix.test }}-$GITHUB_RUN_ID" >> $GITHUB_ENV |
91 | | - - name: Set Test Cluster Nodes and Parallel Runs |
92 | | - run: >- |
93 | | - if grep -q "appframework" <<< "${{ matrix.test }}"; then |
94 | | - echo "CLUSTER_WORKERS=5" >> $GITHUB_ENV |
95 | | - echo "CLUSTER_NODES=2" >> $GITHUB_ENV |
96 | | - fi |
97 | 87 | - name: Checkcout code |
98 | 88 | uses: actions/checkout@v2 |
99 | 89 | - name: Dotenv Action |
@@ -158,10 +148,16 @@ jobs: |
158 | 148 | run: | |
159 | 149 | docker tag ${{ env.SPLUNK_ENTERPRISE_IMAGE }} ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_ENTERPRISE_IMAGE }} |
160 | 150 | docker push ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_ENTERPRISE_IMAGE }} |
161 | | - - name: Create EKS cluster |
162 | | - run: | |
163 | | - export EKS_CLUSTER_K8_VERSION=${{ steps.dotenv.outputs.EKS_CLUSTER_K8_VERSION }} |
164 | | - make cluster-up |
| 151 | + - name: Login to test cluster |
| 152 | + run: | |
| 153 | + echo "Retrieving kubeconfig for ${TEST_CLUSTER_NAME}" |
| 154 | + eksctl utils write-kubeconfig --cluster=${TEST_CLUSTER_NAME} |
| 155 | + - name: Install vCluster CLI |
| 156 | + uses: loft-sh/setup-vcluster@main |
| 157 | + - name: Create Virtual Cluster |
| 158 | + env: |
| 159 | + NAME: eks-integration-test-cluster-${{ matrix.test }}-$GITHUB_RUN_ID |
| 160 | + run: vcluster create $NAME --project default |
165 | 161 | - name: install metric server |
166 | 162 | run: | |
167 | 163 | kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml |
@@ -192,10 +188,10 @@ jobs: |
192 | 188 | run: | |
193 | 189 | make cleanup |
194 | 190 | make clean |
195 | | - - name: Cleanup up EKS cluster |
196 | | - if: ${{ always() }} |
197 | | - run: | |
198 | | - make cluster-down |
| 191 | + - name: Delete Virtual Cluster |
| 192 | + env: |
| 193 | + NAME: eks-integration-test-cluster-${{ matrix.test }}-$GITHUB_RUN_ID |
| 194 | + run: vcluster delete $NAME --project default |
199 | 195 | #- name: Test Report |
200 | 196 | # uses: dorny/test-reporter@v1 |
201 | 197 | # if: success() || failure() # run this step even if previous step failed |
|
0 commit comments