diff --git a/.github/actions/failure-logs/action.yaml b/.github/actions/failure-logs/action.yaml new file mode 100644 index 0000000..b5b0b8b --- /dev/null +++ b/.github/actions/failure-logs/action.yaml @@ -0,0 +1,18 @@ +name: Logs + +description: Show pods logs + +runs: + using: composite + steps: + - shell: bash + run: | + kubectl get apiservices v1alpha2.wgpolicyk8s.io v1.reports.kyverno.io + kubectl -n reports-server get pod + kubectl -n reports-server describe pod | grep -i events -A10 + - shell: bash + run: | + kubectl -n reports-server logs deploy/reports-server --all-containers -p || true + - shell: bash + run: | + kubectl -n reports-server logs deploy/reports-server --all-containers diff --git a/.github/actions/logs/action.yaml b/.github/actions/logs/action.yaml deleted file mode 100644 index c476244..0000000 --- a/.github/actions/logs/action.yaml +++ /dev/null @@ -1,31 +0,0 @@ -name: Logs - -description: Show pods logs - -runs: - using: composite - steps: - - shell: bash - run: | - kubectl get mutatingwebhookconfigurations - kubectl get validatingwebhookconfigurations - - shell: bash - run: | - kubectl -n kyverno get pod - kubectl -n kyverno describe pod | grep -i events -A10 - kubectl -n reports-server get pod - kubectl -n reports-server describe pod | grep -i events -A10 - - shell: bash - run: | - kubectl -n kyverno logs deploy/kyverno-admission-controller --all-containers -p || true - kubectl -n kyverno logs deploy/kyverno-reports-controller --all-containers -p || true - kubectl -n kyverno logs deploy/kyverno-cleanup-controller --all-containers -p || true - kubectl -n kyverno logs deploy/kyverno-background-controller --all-containers -p || true - kubectl -n reports-server logs deploy/reports-server --all-containers -p || true - - shell: bash - run: | - kubectl -n kyverno logs deploy/kyverno-admission-controller --all-containers - kubectl -n kyverno logs deploy/kyverno-reports-controller --all-containers - kubectl -n kyverno logs deploy/kyverno-cleanup-controller --all-containers - kubectl -n kyverno logs deploy/kyverno-background-controller --all-containers - kubectl -n reports-server logs deploy/reports-server --all-containers diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 2a4d27e..39e6403 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -18,35 +18,16 @@ jobs: fail-fast: false matrix: k8s-version: - - name: v1.25 - version: v1.25.11 - name: v1.26 version: v1.26.6 - name: v1.27 version: v1.27.3 - name: v1.28 version: v1.28.0 + - name: v1.29 + version: v1.29.0 tests: - # - ^autogen$ - # - ^background-only$ - # - ^cleanup$ - # - ^deferred$ - # - ^events$ - # - ^exceptions$ - # - ^filter$ - # - ^generate$/^clusterpolicy$ - # - ^generate$/^policy$ - # - ^generate$/^validation$ - # - ^globalcontext$ - # - ^mutate$ - # - ^policy-validation$ - # - ^rangeoperators$ - # - ^rbac$ - ^reports$ - # - ^validate$ - # - ^verify-manifests$ - # - ^verifyImages$ - # - ^webhooks$ runs-on: ubuntu-latest name: ${{ matrix.k8s-version.name }} - ${{ matrix.tests }} steps: @@ -97,6 +78,10 @@ jobs: run: | set -e kubectl wait --namespace kyverno --for=condition=ready pod --selector '!job-name' --timeout=60s + - name: API Service status + run: | + set -e + kubectl get apiservices v1alpha2.wgpolicyk8s.io v1.reports.kyverno.io - name: Install Chainsaw uses: kyverno/action-install-chainsaw@56be3cb4ec65a987b6ef4d7ab3a55ee17760a57c # v0.1.2 with: @@ -109,4 +94,11 @@ jobs: cd ./kyverno/test/conformance/chainsaw && chainsaw test --config ./../../../../.chainsaw.yaml --include-test-regex '^chainsaw$/${{ matrix.tests }}' --no-color=false - name: Debug failure if: failure() - uses: ./.github/actions/logs + uses: ./.github/actions/failure-logs + + required: + needs: + - chainsaw + runs-on: ubuntu-latest + steps: + - run: echo "Conformance tests passed!"