Build arm64 images and setup cluster role aggregate labels (#36) #84
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 Chart | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| test-e2e: | |
| name: Run on Ubuntu | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Clone the code | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| cache-dependency-path: go.sum | |
| - name: Set up Helm | |
| uses: azure/setup-helm@v4 | |
| with: | |
| version: v4.1.1 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.11 | |
| - name: Set up chart-testing | |
| uses: helm/chart-testing-action@v2.8.0 | |
| - name: Create kind cluster | |
| uses: helm/kind-action@v1 | |
| with: | |
| version: v0.31.0 | |
| cluster_name: kind | |
| config: test/e2e/kind.yaml | |
| - name: Prepare keycloak-cr-operator | |
| run: | | |
| make docker-build IMG=quay.io/ohiosupercomputercenter/keycloak-cr-operator:latest | |
| kind load docker-image quay.io/ohiosupercomputercenter/keycloak-cr-operator:latest | |
| - name: Run chart-testing (lint) | |
| run: ct lint --target-branch=main --check-version-increment=false | |
| - name: Lint Helm Chart | |
| run: | | |
| helm lint ./charts/keycloak-cr-operator | |
| - name: Verify Helm Resources | |
| run: | | |
| make verify-helm-crds | |
| make verify-helm-role | |
| - name: Install cert-manager via Helm (wait for readiness) | |
| run: | | |
| make install-cert-manager | |
| - name: Install Keycloak via Helm (wait for readiness) | |
| run: | | |
| make install-keycloak | |
| - name: Deploy manager via Helm | |
| run: | | |
| make helm-deploy \ | |
| IMG=quay.io/ohiosupercomputercenter/keycloak-cr-operator:latest \ | |
| HELM_EXTRA_ARGS="-f charts/keycloak-cr-operator/ci/test-values.yaml --cleanup-on-fail=false" | |
| - name: Check Helm release status | |
| run: | | |
| make helm-status | |
| - name: Test KeycloakClient resource | |
| run: | | |
| kubectl apply -f config/samples/keycloak_v1alpha1_keycloakclient.yaml | |
| kubectl wait --for=condition=Available keycloakclient keycloakclient-test --timeout=20s | |
| - name: Get operator logs | |
| if: always() | |
| run: | | |
| kubectl logs -n keycloak-cr-operator -l app.kubernetes.io/name=keycloak-cr-operator --tail=200 | |
| - name: Debugging | |
| if: always() | |
| run: | | |
| set +e | |
| kubectl describe pod -n keycloak | |
| kubectl logs -n keycloak -l app.kubernetes.io/instance=keycloak --tail=200 | |
| kubectl describe pod -n keycloak-cr-operator | |
| kubectl describe keycloakclient keycloakclient-test |