1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-15 17:51:20 +00:00

added additional init and sidecar container config (#4283)

Signed-off-by: Tobias Trabelsi <Lerentis@users.noreply.github.com>
This commit is contained in:
Tobias Trabelsi 2022-08-01 15:29:27 +02:00 committed by GitHub
parent b03e461f25
commit ba32121acb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 33 additions and 2 deletions

View file

@ -26,5 +26,5 @@ annotations:
url: https://kyverno.io/docs
# valid kinds are: added, changed, deprecated, removed, fixed and security
artifacthub.io/changes: |
- kind: changed
description: Exclude Kyverno namespace by default
- kind: added
description: Added possibility to define additional init and sidecar container

View file

@ -97,6 +97,8 @@ The command removes all the Kubernetes components associated with the chart and
| envVarsInit | object | `{}` | Env variables for initContainers. |
| envVars | object | `{}` | Env variables for containers. |
| extraArgs | list | `["--autogenInternals=false"]` | Extra arguments to give to the binary. |
| extraInitContainers | list | `[]` | Array of extra init containers |
| extraContainers | list | `[]` | Array of extra containers to run alongside kyverno |
| imagePullSecrets | object | `{}` | Image pull secrets for image verify and imageData policies. This will define the `--imagePullSecrets` Kyverno argument. |
| resources.limits | object | `{"memory":"384Mi"}` | Pod resource limits |
| resources.requests | object | `{"cpu":"100m","memory":"128Mi"}` | Pod resource requests |

View file

@ -0,0 +1,9 @@
extraContainers:
- name: myapp-container
image: busybox
command: ['sh', '-c', 'echo Hello && sleep 3600']
extraInitContainers:
- name: init-container
image: busybox
command: ['sh', '-c', 'echo Hello']

View file

@ -65,6 +65,9 @@ spec:
dnsPolicy: {{ .Values.dnsPolicy }}
{{- end }}
initContainers:
{{- if .Values.extraInitContainers }}
{{- toYaml .Values.extraInitContainers | nindent 8 }}
{{- end }}
- name: kyverno-pre
image: {{ .Values.initImage.repository }}:{{ default .Chart.AppVersion (default .Values.image.tag .Values.initImage.tag) }}
imagePullPolicy: {{ default .Values.image.pullPolicy .Values.initImage.pullPolicy }}
@ -87,6 +90,9 @@ spec:
{{- toYaml . | nindent 10 }}
{{- end }}
containers:
{{- if .Values.extraContainers }}
{{- toYaml .Values.extraContainers | nindent 8 }}
{{- end }}
- name: kyverno
image: {{ .Values.image.repository }}:{{ default .Chart.AppVersion .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}

View file

@ -143,6 +143,20 @@ envVars: {}
extraArgs:
- --autogenInternals=false
# -- Array of extra init containers
extraInitContainers: []
# Example:
# - name: init-container
# image: busybox
# command: ['sh', '-c', 'echo Hello']
# -- Array of extra containers to run alongside kyverno
extraContainers: []
# Example:
# - name: myapp-container
# image: busybox
# command: ['sh', '-c', 'echo Hello && sleep 3600']
# -- Image pull secrets for image verify and imageData policies.
# This will define the `--imagePullSecrets` Kyverno argument.
imagePullSecrets: {}