Skip to content

Commit

Permalink
Update Kyverno policies to portefaix-policies-v0.12.0 (#668)
Browse files Browse the repository at this point in the history
* Update: portefaix-policies set to v0.12.0 for Portefaix Kyverno

Signed-off-by: Nicolas Lamirault <nlamirault@users.noreply.github.com>
Signed-off-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
Co-authored-by: Nicolas Lamirault <nlamirault@users.noreply.github.com>
Co-authored-by: Nicolas Lamirault <nicolas.lamirault@gmail.com>
  • Loading branch information
3 people committed Jan 15, 2024
1 parent 501a842 commit e5cce0b
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 8 deletions.
9 changes: 3 additions & 6 deletions charts/portefaix-kyverno/Chart.yaml
Expand Up @@ -28,8 +28,8 @@ keywords:
- kyverno
- policies
- portefaix
version: 1.1.0
appVersion: 0.11.0
version: 1.2.0
appVersion: v0.12.0

maintainers:
- name: nlamirault
Expand All @@ -51,7 +51,4 @@ annotations:
url: https://keybase.io/nlamirault/pgp_keys.asc
artifacthub.io/changes: |
- kind: changed
description: Bump Portefaix Kyverno policies to v0.11.0
links:
- name: Github release
url: https://github.com/portefaix/portefaix-policies/releases/tag/v0.11.0
description: Bump Portefaix policies to v0.12.0
70 changes: 70 additions & 0 deletions charts/portefaix-kyverno/templates/policy-C0009.yaml
@@ -0,0 +1,70 @@
# Copyright (C) Nicolas Lamirault <nicolas.lamirault@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: portefaix-c0009
annotations:
policies.kyverno.io/title: Docker images used by control plane pods are correctly signed
policies.kyverno.io/category: Security
policies.kyverno.io/severity: medium
policies.kyverno.io/subject: Container
policies.kyverno.io/description: >-
The ':latest' tag is mutable and can lead to unexpected errors if the
image changes. A best practice is to use an immutable tag that maps to
a specific version of an application pod.
{{ include "portefaix-kyverno.annotations" . | indent 4 }}
labels:
{{ include "portefaix-kyverno.labels" . | indent 4 }}
spec:
validationFailureAction: {{ .Values.validationFailureAction }}
background: true
rules:
- name: verify-k8s-images
match:
any:
- resources:
kinds:
- Pod
verifyImages:
# verify kube-* and coredns/* images
- imageReferences:
- registry.k8s.io/kube-*
- registry.k8s.io/coredns/*
verifyDigest: false
required: false
mutateDigest: false
attestors:
- entries:
- keyless:
issuer: https://accounts.google.com
subject: krel-trust@k8s-releng-prod.iam.gserviceaccount.com
rekor:
url: https://rekor.sigstore.dev
# verify etcd:* images
- imageReferences:
- registry.k8s.io/etcd:*
verifyDigest: false
required: false
mutateDigest: false
attestors:
- entries:
- keyless:
issuer: https://accounts.google.com
subject: k8s-infra-gcr-promoter@k8s-artifacts-prod.iam.gserviceaccount.com
rekor:
url: https://rekor.sigstore.dev
6 changes: 6 additions & 0 deletions charts/portefaix-kyverno/templates/policy-p0010.yaml
Expand Up @@ -28,6 +28,12 @@ metadata:
The Kubernetes cluster autoscaler does not evict pods that
use hostPath or emptyDir volumes. To allow eviction of these pods, the annotation
cluster-autoscaler.kubernetes.io/safe-to-evict=true must be added to the pods.
a8r.io/description: Kyverno policies for Portefaix
a8r.io/owner: portefaix
a8r.io/bugs: https://github.com/portefaix/portefaix/issues
a8r.io/documentation: https://github.com/portefaix/portefaix
a8r.io/repository: https://github.com/portefaix/portefaix
a8r.io/support: https://github.com/portefaix/portefaix/issues
{{ include "portefaix-kyverno.annotations" . | indent 4 }}
labels:
{{ include "portefaix-kyverno.labels" . | indent 4 }}
Expand Down
4 changes: 2 additions & 2 deletions charts/portefaix-kyverno/values.yaml
Expand Up @@ -28,6 +28,6 @@ customLabels: {}
# -- Additional annotations to add to the Prometheus rules
customAnnotations: {}

# -- Supported values- `audit`, `enforce`
# -- Supported values- `Audit`, `Enforce`
# For more info- https://kyverno.io/docs/writing-policies/validate/
validationFailureAction: audit
validationFailureAction: Audit

0 comments on commit e5cce0b

Please sign in to comment.