1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-14 11:57:48 +00:00

fix(chart/kyverno): handle multiple extraArgs in init container (#5846)

The lack of the nindent was causing rendering to fail:

```
Error: YAML parse error on kyverno/templates/deployment.yaml: error converting YAML to JSON: yaml: line 75: did not find expected key
helm.go:81: [debug] error converting YAML to JSON: yaml: line 75: did not find expected key
YAML parse error on kyverno/templates/deployment.yaml
helm.sh/helm/v3/pkg/releaseutil.(*manifestFile).sort
```

Reproducible by having the following values:

```
initContainer:
  extraArgs:
    - "--loggingFormat=json"
    - "-v=-1"
```

Signed-off-by: Adrien Fillon <adrien.fillon@manomano.com>

Signed-off-by: Adrien Fillon <adrien.fillon@manomano.com>
This commit is contained in:
Adrien F 2023-01-03 15:34:11 +01:00 committed by GitHub
parent aaab55a036
commit b23965cd76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 33 deletions

View file

@ -28,35 +28,5 @@ annotations:
artifacthub.io/changes: |
- kind: changed
description: Syntax change for webhooksCleanup switch to match with the rest of the file
- kind: added
description: Added possibility to define additional init and sidecar container.
- kind: added
description: Added ability to remove namespaces from default resourceFilters list.
- kind: added
description: Prevent installing Kyverno in namespace kube-system.
- kind: fixed
description: Docs for generatecontrollerExtraResources.
- kind: changed
description: Enable autogen internals by default.
- kind: fixed
description: Self signed certificates not using SANs.
- kind: added
description: Extra args support for init container.
- kind: added
description: Allow overriding of test security context and resource block.
- kind: added
description: Added possibility to define custom image registries
- kind: added
description: Enable adding optional annotations to configmaps
- kind: added
description: Add startup probes support
- kind: added
description: Support extra CRD annotations
- kind: added
description: Grafana dashboard.
- kind: added
description: Cleanup controller.
- kind: changed
description: CRD labels are in sync with other labels generated by the helm.
- kind: added
description: Support existing imagePullSecrets for image verify
description: Handle multiple extraArgs in init container

View file

@ -79,7 +79,7 @@ spec:
imagePullPolicy: {{ default .Values.image.pullPolicy .Values.initImage.pullPolicy }}
{{- if .Values.initContainer.extraArgs }}
args:
{{ tpl (toYaml .Values.initContainer.extraArgs) . }}
{{- tpl (toYaml .Values.initContainer.extraArgs) . | nindent 12 }}
{{- end }}
{{- with .Values.initResources }}
resources: {{ tpl (toYaml .) $ | nindent 12 }}

View file

@ -32106,7 +32106,7 @@ spec:
image: "ghcr.io/kyverno/kyvernopre:latest"
imagePullPolicy: IfNotPresent
args:
- --loggingFormat=text
- --loggingFormat=text
resources:
limits:
cpu: 100m