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

add extra manifests support (#3421)

Signed-off-by: upodroid <upodroid@users.noreply.github.com>
Co-authored-by: upodroid <upodroid@users.noreply.github.com>
This commit is contained in:
Mahamed Ali 2024-04-28 21:00:07 +01:00 committed by GitHub
parent 1edd909463
commit e32bc39425
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 35 additions and 0 deletions

View file

@ -95,6 +95,7 @@ The command removes all the Kubernetes components associated with the chart and
| extraArgs | object | `{}` | |
| extraContainers | list | `[]` | |
| extraEnv | list | `[]` | |
| extraObjects | list | `[]` | Extra Kubernetes manifests to deploy with the chart |
| extraVolumeMounts | list | `[]` | |
| extraVolumes | list | `[]` | |
| fullnameOverride | string | `""` | |

View file

@ -154,3 +154,15 @@ Determine the image to use, including if using a flavour.
{{ printf "%s:%s" .image.repository (.image.tag | default .chartAppVersion) }}
{{- end }}
{{- end }}
{{/*
Renders a complete tree, even values that contains template.
*/}}
{{- define "external-secrets.render" -}}
{{- if typeIs "string" .value }}
{{- tpl .value .context }}
{{ else }}
{{- tpl (.value | toYaml) .context }}
{{- end }}
{{- end -}}

View file

@ -0,0 +1,4 @@
{{- range .Values.extraObjects }}
---
{{ include "external-secrets.render" (dict "value" . "context" $) }}
{{- end }}

View file

@ -0,0 +1,15 @@
suite: test adding extra kubernetes objects
templates:
- extra-manifests.yaml
tests:
- it: should load extra manifests
set:
extraObjects:
- apiVersion: v1
kind: ServiceAccount
metadata:
name: random
asserts:
- equal:
path: kind
value: ServiceAccount

View file

@ -114,6 +114,9 @@ extraArgs: {}
## -- Extra volumes to pass to pod.
extraVolumes: []
## -- Extra Kubernetes objects to deploy with the helm chart
extraObjects: []
## -- Extra volumes to mount to the container.
extraVolumeMounts: []