1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-28 02:18:15 +00:00

chore: use gh composite actions (#5885)

This commit is contained in:
Charles-Edouard Brétéché 2023-01-05 12:35:04 +01:00 committed by GitHub
parent c5ab5a0fd3
commit 8f1404154a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 36 additions and 11 deletions

View file

@ -0,0 +1,23 @@
name: Kyverno logs
description: Show kyverno 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
- shell: bash
run: |
kubectl -n kyverno logs deploy/kyverno --all-containers -p || true
kubectl -n kyverno logs deploy/kyverno-cleanup-controller --all-containers -p || true
- shell: bash
run: |
kubectl -n kyverno logs deploy/kyverno --all-containers
kubectl -n kyverno logs deploy/kyverno-cleanup-controller --all-containers

View file

@ -0,0 +1,10 @@
name: Kyverno pods ready
description: Wait kyverno pods are ready
runs:
using: composite
steps:
- shell: bash
run: |
kubectl wait --namespace kyverno --for=condition=ready pod --all --timeout=60s

View file

@ -26,21 +26,15 @@ jobs:
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: ~1.19.4
cache: true
- name: Prepare environment
run: |
export KIND_IMAGE=kindest/node:${{ matrix.k8s-version }}
make kind-create-cluster kind-deploy-kyverno
- name: Wait for Kyverno to start
run: sleep 60
uses: ./.github/actions/kyverno-wait-ready
- name: Test with kuttl
run: make test-kuttl
- name: Debug failure
if: failure()
run: |
kubectl get mutatingwebhookconfigurations,validatingwebhookconfigurations
kubectl -n kyverno get pod
kubectl -n kyverno describe pod | grep -i events -A10
kubectl -n kyverno logs deploy/kyverno --all-containers -p || true
kubectl -n kyverno logs deploy/kyverno --all-containers
kubectl -n kyverno logs deploy/kyverno-cleanup-controller --all-containers -p || true
kubectl -n kyverno logs deploy/kyverno-cleanup-controller --all-containers
uses: ./.github/actions/kyverno-logs

View file

@ -719,8 +719,6 @@ kind-deploy-kyverno: $(HELM) kind-load-all ## Build images, load them in kind cl
--set initImage.repository=$(LOCAL_KYVERNOPRE_IMAGE) \
--set initImage.tag=$(IMAGE_TAG_DEV) \
--values ./scripts/config/$(USE_CONFIG)/kyverno.yaml
@echo Restart kyverno pods... >&2
@kubectl rollout restart deployment -n kyverno
.PHONY: kind-deploy-kyverno-policies
kind-deploy-kyverno-policies: $(HELM) ## Deploy kyverno-policies helm chart