Skip to content

Commit

Permalink
dry run using Kyverno before actual deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
sqr authored Feb 26, 2024
1 parent 6636099 commit a74e5a5
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,19 @@ jobs:
- name: Apply image attestation policy
run: |
kubectl apply -f ./k3s/policy-check-image-keyless.yaml
- name: (optional) Install Kyverno CLI
if: always()
uses: kyverno/[email protected]
with:
release: 'v1.9.5'

- name: (optional) Dry run policy using Kyverno CLI
if: always()
run: |
kyverno version
# kyverno apply ./k3s/policy-check-image-keyless.yaml --cluster -v 10
kubectl get clusterpolicies -o yaml | kyverno apply - --resource ./k3s/pod.yaml
- name: Deploy pod to k3s
run: |
Expand All @@ -88,15 +101,5 @@ jobs:
# kubectl -n app describe pod cg
# kubectl get polr -o wide
- name: (optional) Install Kyverno CLI
if: always()
uses: kyverno/[email protected]
with:
release: 'v1.9.5'

- name: (optional) Verify policy using Kyverno CLI
if: always()
run: |
kyverno version
kyverno apply ./k3s/policy-check-image-keyless.yaml --cluster -v 10

0 comments on commit a74e5a5

Please sign in to comment.