Update helm/chart-testing-action action to v2.7.0 (#276) #1190
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: Test E2E | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| test-build: | |
| name: test-e2e | |
| runs-on: ubuntu-latest | |
| env: | |
| IMG: controller:kind | |
| CLUSTER: kind | |
| CERT_MANAGER: v1.16.2 | |
| steps: | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: ^1.25 | |
| - uses: actions/checkout@v5 | |
| - name: Create kind cluster | |
| run: make setup-e2e | |
| - name: Build and push | |
| run: make docker-build | |
| - name: Push the image to Kind cluster | |
| run: make kind-load | |
| - name: Install CRDs | |
| run: make install | |
| - name: Install manifests | |
| run: make deploy | |
| - name: Wait for cert-manager to be ready | |
| run: | | |
| kubectl wait --for=condition=available --timeout=300s deployment/cert-manager -n cert-manager | |
| kubectl wait --for=condition=available --timeout=300s deployment/cert-manager-webhook -n cert-manager | |
| kubectl wait --for=condition=available --timeout=300s deployment/cert-manager-cainjector -n cert-manager | |
| - name: Wait for controller to be ready | |
| run: | | |
| count=0 | |
| until [ '1' == "$( kubectl get deploy aws-auth-manager-controller-manager -n aws-auth-manager-system -o json | jq 'try .status.readyReplicas' )" ]; do | |
| echo -n '.' | |
| sleep 5 | |
| count=$((count + 1)) | |
| if [[ ${count} -eq 12 ]]; then | |
| echo ' No more retries left!' | |
| exit 1 | |
| fi | |
| done | |
| echo ' done' | |
| - name: Wait for webhook service to be ready | |
| run: | | |
| echo "Waiting for webhook certificates to be issued and webhook server to be ready..." | |
| sleep 60 | |
| - name: Deploy example AWSAuthItem | |
| run: kubectl apply -f config/samples/mixed.yaml | |
| - name: Test AWSAuthItem | |
| run: | | |
| echo -n ">>> Waiting for expected conditions" | |
| count=0 | |
| until [ 'true' == "$( kubectl get awsauthitems.aws.maruina.k8s mixed -o json | jq 'try .status.conditions | map( { (.type): .status } ) | add | .Ready=="True"' )" ]; do | |
| echo -n '.' | |
| sleep 5 | |
| count=$((count + 1)) | |
| if [[ ${count} -eq 6 ]]; then | |
| echo ' No more retries left!' | |
| exit 1 | |
| fi | |
| done | |
| echo ' done' | |
| - name: Test ARN validation webhook | |
| run: | | |
| output=$(kubectl apply -f config/samples/invalid.yaml || true) | |
| substring="The AWSAuthItem \"invalid\" is invalid" | |
| if [ -z "${output##*$reqsubstr*}" ]; then | |
| echo 'Invalid AWSAuthItem failed validation' | |
| exit 0 | |
| else | |
| echo 'Validation Webhook not working as expected' | |
| exit 1 | |
| fi |