Add kyverno chart 3.4.1

This commit is contained in:
wbsong111
2025-05-13 11:54:58 +09:00
parent 459425ba58
commit af45031108
114 changed files with 65061 additions and 0 deletions
@@ -0,0 +1,27 @@
{{/* vim: set filetype=mustache: */}}
{{- define "kyverno.test.labels" -}}
{{- template "kyverno.labels.merge" (list
(include "kyverno.labels.common" .)
(include "kyverno.test.matchLabels" .)
) -}}
{{- end -}}
{{- define "kyverno.test.matchLabels" -}}
{{- template "kyverno.labels.merge" (list
(include "kyverno.matchLabels.common" .)
(include "kyverno.labels.component" "test")
) -}}
{{- end -}}
{{- define "kyverno.test.annotations" -}}
helm.sh/hook: test
{{- end -}}
{{- define "kyverno.test.image" -}}
{{- template "kyverno.image" (dict "image" .Values.test.image "defaultTag" "latest") -}}
{{- end -}}
{{- define "kyverno.test.imagePullPolicy" -}}
{{- default .Values.admissionController.container.image.pullPolicy .Values.test.image.pullPolicy -}}
{{- end -}}
@@ -0,0 +1,33 @@
{{- if .Values.admissionController.enabled -}}
apiVersion: v1
kind: Pod
metadata:
name: {{ template "kyverno.fullname" . }}-admission-controller-liveness
namespace: {{ template "kyverno.namespace" . }}
labels:
{{- include "kyverno.test.labels" . | nindent 4 }}
annotations:
{{- include "kyverno.test.annotations" . | nindent 4 }}
spec:
restartPolicy: Never
{{- with .Values.test.imagePullSecrets | default .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- tpl (toYaml .) $ | nindent 4 }}
{{- end }}
containers:
- name: test
image: {{ template "kyverno.test.image" . }}
imagePullPolicy: {{ template "kyverno.test.imagePullPolicy" . }}
{{- with .Values.test.resources }}
resources:
{{- tpl (toYaml .) $ | nindent 8 }}
{{- end }}
{{- with .Values.test.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
command:
- /bin/sh
- -c
- sleep {{ .Values.test.sleep }} ; wget -O- -S --no-check-certificate https://{{ template "kyverno.admission-controller.serviceName" . }}.{{ template "kyverno.namespace" . }}:{{ .Values.admissionController.service.port }}/health/liveness
{{- end -}}
@@ -0,0 +1,33 @@
{{- if .Values.admissionController.metricsService.create -}}
apiVersion: v1
kind: Pod
metadata:
name: {{ template "kyverno.fullname" . }}-admission-controller-metrics
namespace: {{ template "kyverno.namespace" . }}
labels:
{{- include "kyverno.test.labels" . | nindent 4 }}
annotations:
{{- include "kyverno.test.annotations" . | nindent 4 }}
spec:
restartPolicy: Never
{{- with .Values.test.imagePullSecrets | default .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- tpl (toYaml .) $ | nindent 4 }}
{{- end }}
containers:
- name: test
image: {{ template "kyverno.test.image" . }}
imagePullPolicy: {{ template "kyverno.test.imagePullPolicy" . }}
{{- with .Values.test.resources }}
resources:
{{- tpl (toYaml .) $ | nindent 8 }}
{{- end }}
{{- with .Values.test.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
command:
- /bin/sh
- -c
- sleep {{ .Values.test.sleep }} ; wget -O- -S --no-check-certificate http://{{ template "kyverno.admission-controller.serviceName" . }}-metrics.{{ template "kyverno.namespace" . }}:{{ .Values.admissionController.metricsService.port }}/metrics
{{- end -}}
@@ -0,0 +1,33 @@
{{- if .Values.admissionController.enabled -}}
apiVersion: v1
kind: Pod
metadata:
name: {{ template "kyverno.fullname" . }}-admission-controller-readiness
namespace: {{ template "kyverno.namespace" . }}
labels:
{{- include "kyverno.test.labels" . | nindent 4 }}
annotations:
{{- include "kyverno.test.annotations" . | nindent 4 }}
spec:
restartPolicy: Never
{{- with .Values.test.imagePullSecrets | default .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- tpl (toYaml .) $ | nindent 4 }}
{{- end }}
containers:
- name: test
image: {{ template "kyverno.test.image" . }}
imagePullPolicy: {{ template "kyverno.test.imagePullPolicy" . }}
{{- with .Values.test.resources }}
resources:
{{- tpl (toYaml .) $ | nindent 8 }}
{{- end }}
{{- with .Values.test.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
command:
- /bin/sh
- -c
- sleep {{ .Values.test.sleep }} ; wget -O- -S --no-check-certificate https://{{ template "kyverno.admission-controller.serviceName" . }}.{{ template "kyverno.namespace" . }}:{{ .Values.admissionController.service.port }}/health/readiness
{{- end -}}
@@ -0,0 +1,33 @@
{{- if .Values.cleanupController.enabled -}}
apiVersion: v1
kind: Pod
metadata:
name: {{ template "kyverno.fullname" . }}-cleanup-controller-liveness
namespace: {{ template "kyverno.namespace" . }}
labels:
{{- include "kyverno.test.labels" . | nindent 4 }}
annotations:
{{- include "kyverno.test.annotations" . | nindent 4 }}
spec:
restartPolicy: Never
{{- with .Values.test.imagePullSecrets | default .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- tpl (toYaml .) $ | nindent 4 }}
{{- end }}
containers:
- name: test
image: {{ template "kyverno.test.image" . }}
imagePullPolicy: {{ template "kyverno.test.imagePullPolicy" . }}
{{- with .Values.test.resources }}
resources:
{{- tpl (toYaml .) $ | nindent 8 }}
{{- end }}
{{- with .Values.test.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
command:
- /bin/sh
- -c
- sleep {{ .Values.test.sleep }} ; wget -O- -S --no-check-certificate https://{{ template "kyverno.cleanup-controller.name" . }}.{{ template "kyverno.namespace" . }}:{{ .Values.cleanupController.service.port }}/health/liveness
{{- end -}}
@@ -0,0 +1,33 @@
{{- if and .Values.cleanupController.enabled .Values.cleanupController.metricsService.create -}}
apiVersion: v1
kind: Pod
metadata:
name: {{ template "kyverno.fullname" . }}-cleanup-controller-metrics
namespace: {{ template "kyverno.namespace" . }}
labels:
{{- include "kyverno.test.labels" . | nindent 4 }}
annotations:
{{- include "kyverno.test.annotations" . | nindent 4 }}
spec:
restartPolicy: Never
{{- with .Values.test.imagePullSecrets | default .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- tpl (toYaml .) $ | nindent 4 }}
{{- end }}
containers:
- name: test
image: {{ template "kyverno.test.image" . }}
imagePullPolicy: {{ template "kyverno.test.imagePullPolicy" . }}
{{- with .Values.test.resources }}
resources:
{{- tpl (toYaml .) $ | nindent 8 }}
{{- end }}
{{- with .Values.test.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
command:
- /bin/sh
- -c
- sleep {{ .Values.test.sleep }} ; wget -O- -S --no-check-certificate http://{{ template "kyverno.cleanup-controller.name" . }}-metrics.{{ template "kyverno.namespace" . }}:{{ .Values.cleanupController.metricsService.port }}/metrics
{{- end -}}
@@ -0,0 +1,33 @@
{{- if .Values.cleanupController.enabled -}}
apiVersion: v1
kind: Pod
metadata:
name: {{ template "kyverno.fullname" . }}-cleanup-controller-readiness
namespace: {{ template "kyverno.namespace" . }}
labels:
{{- include "kyverno.test.labels" . | nindent 4 }}
annotations:
{{- include "kyverno.test.annotations" . | nindent 4 }}
spec:
restartPolicy: Never
{{- with .Values.test.imagePullSecrets | default .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- tpl (toYaml .) $ | nindent 4 }}
{{- end }}
containers:
- name: test
image: {{ template "kyverno.test.image" . }}
imagePullPolicy: {{ template "kyverno.test.imagePullPolicy" . }}
{{- with .Values.test.resources }}
resources:
{{- tpl (toYaml .) $ | nindent 8 }}
{{- end }}
{{- with .Values.test.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
command:
- /bin/sh
- -c
- sleep {{ .Values.test.sleep }} ; wget -O- -S --no-check-certificate https://{{ template "kyverno.cleanup-controller.name" . }}.{{ template "kyverno.namespace" . }}:{{ .Values.cleanupController.service.port }}/health/readiness
{{- end -}}
@@ -0,0 +1,33 @@
{{- if and .Values.reportsController.enabled .Values.reportsController.metricsService.create -}}
apiVersion: v1
kind: Pod
metadata:
name: {{ template "kyverno.fullname" . }}-reports-controller-metrics
namespace: {{ template "kyverno.namespace" . }}
labels:
{{- include "kyverno.test.labels" . | nindent 4 }}
annotations:
{{- include "kyverno.test.annotations" . | nindent 4 }}
spec:
restartPolicy: Never
{{- with .Values.test.imagePullSecrets | default .Values.global.imagePullSecrets }}
imagePullSecrets:
{{- tpl (toYaml .) $ | nindent 4 }}
{{- end }}
containers:
- name: test
image: {{ template "kyverno.test.image" . }}
imagePullPolicy: {{ template "kyverno.test.imagePullPolicy" . }}
{{- with .Values.test.resources }}
resources:
{{- tpl (toYaml .) $ | nindent 8 }}
{{- end }}
{{- with .Values.test.securityContext }}
securityContext:
{{- toYaml . | nindent 8 }}
{{- end }}
command:
- /bin/sh
- -c
- sleep {{ .Values.test.sleep }} ; wget -O- -S --no-check-certificate http://{{ template "kyverno.reports-controller.name" . }}-metrics.{{ template "kyverno.namespace" . }}:{{ .Values.reportsController.metricsService.port }}/metrics
{{- end -}}