|
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 |
|
84 | 83 | ENTERPRISE_LICENSE_LOCATION: ${{ secrets.ENTERPRISE_LICENSE_LOCATION }} |
85 | 84 | CLUSTER_WIDE: "true" |
86 | 85 | DEPLOYMENT_TYPE: "" |
| 86 | + TEST_CLUSTER_NAME: eks-integration-test-cluster-${{ matrix.test }}-$GITHUB_RUN_ID |
87 | 87 | 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 | 88 | - name: Checkcout code |
98 | 89 | uses: actions/checkout@v2 |
99 | 90 | - name: Dotenv Action |
@@ -158,10 +149,14 @@ jobs: |
158 | 149 | run: | |
159 | 150 | docker tag ${{ env.SPLUNK_ENTERPRISE_IMAGE }} ${{ secrets.ECR_REPOSITORY }}/${{ env.SPLUNK_ENTERPRISE_IMAGE }} |
160 | 151 | 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 |
| 152 | + - name: Login to test cluster |
| 153 | + run: | |
| 154 | + echo "Retrieving kubeconfig for ${TEST_CLUSTER_NAME}" |
| 155 | + eksctl utils write-kubeconfig --cluster=${TEST_CLUSTER_NAME} |
| 156 | + - name: Install vCluster CLI |
| 157 | + uses: loft-sh/setup-vcluster@main |
| 158 | + - name: Create Virtual Cluster |
| 159 | + run: vcluster create ${TEST_CLUSTER_NAME} --project default |
165 | 160 | - name: install metric server |
166 | 161 | run: | |
167 | 162 | kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml |
@@ -192,10 +187,8 @@ jobs: |
192 | 187 | run: | |
193 | 188 | make cleanup |
194 | 189 | make clean |
195 | | - - name: Cleanup up EKS cluster |
196 | | - if: ${{ always() }} |
197 | | - run: | |
198 | | - make cluster-down |
| 190 | + - name: Delete Virtual Cluster |
| 191 | + run: vcluster delete ${TEST_CLUSTER_NAME} --project default |
199 | 192 | #- name: Test Report |
200 | 193 | # uses: dorny/test-reporter@v1 |
201 | 194 | # if: success() || failure() # run this step even if previous step failed |
|
0 commit comments