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:
parent
1edd909463
commit
e32bc39425
5 changed files with 35 additions and 0 deletions
|
@ -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 | `""` | |
|
||||
|
|
|
@ -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 -}}
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
{{- range .Values.extraObjects }}
|
||||
---
|
||||
{{ include "external-secrets.render" (dict "value" . "context" $) }}
|
||||
{{- end }}
|
|
@ -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
|
|
@ -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: []
|
||||
|
||||
|
|
Loading…
Reference in a new issue