Merge commit 'fe564d72279f4ab061b961dd528623f0ed272667' as 'cluster-config'

This commit is contained in:
2025-03-30 15:46:16 -05:00
346 changed files with 11754 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
apiVersion: kyverno.io/v1
kind: ClusterPolicy
metadata:
name: disallow-jenkins-pipeline-strategy
annotations:
policies.kyverno.io/title: Disallow OpenShift Jenkins Pipeline Build Strategy
policies.kyverno.io/category: OpenShift
policies.kyverno.io/severity: medium
kyverno.io/kyverno-version: 1.6.0
policies.kyverno.io/minversion: 1.6.0
kyverno.io/kubernetes-version: "1.20"
policies.kyverno.io/subject: BuildConfig
policies.kyverno.io/description: >-
The Jenkins Pipeline Build Strategy has been deprecated. This policy prevents its use. Use OpenShift Pipelines instead.
spec:
validationFailureAction: enforce
failurePolicy: Ignore
background: false
rules:
- name: check-build-strategy
match:
any:
- resources:
kinds:
- build.openshift.io/v1/BuildConfig
validate:
message: >-
Jenkins Pipeline Build Strategy has been deprecated and is not allowed
deny:
conditions:
all:
- key: "{{ keys(request.object.spec.strategy) | contains(@, 'jenkinsPipelineStrategy') }}"
operator: Equals
value: true