Skip to content

Commit

Permalink
feat(infra): add check image signature kyverno cluster policy
Browse files Browse the repository at this point in the history
Signed-off-by: iverly <[email protected]>
  • Loading branch information
iverly committed Apr 18, 2024
1 parent 6b55205 commit 633852e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions infrastructure/configurations/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ namespace: flux-system

resources:
- cert-manager-issuer/cluster-issuer.yaml
- kyverno-policies/check-image-signature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: check-image-signature
spec:
validationFailureAction: Enforce
background: false
webhookTimeoutSeconds: 30
failurePolicy: Fail
rules:
- name: check-image-signature
match:
any:
- resources:
kinds:
- Pod
verifyImages:
- imageReferences:
- "ghcr.io/do4-2022/openstack-k0s-apko*"
attestors:
- count: 1
entries:
- keyless:
subject: "https://github.com/do4-2022/openstack-k0s-apko/.github/workflows/ci.yaml@refs/heads/main"
issuer: "https://token.actions.githubusercontent.com"
rekor:
url: https://rekor.sigstore.dev

0 comments on commit 633852e

Please sign in to comment.