Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Kyverno policies to portefaix-policies-v0.12.0 #668

Merged
merged 4 commits into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions charts/portefaix-kyverno/Chart.yaml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Copyright (C) Nicolas Lamirault <[email protected]>
#
# 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: [email protected]
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Loading