This adds the ability to specify custom resource dependencies
Change-Id: If4166749085522ee0f10fa673d9fa36094091baa
This commit is contained in:
parent
9771b16e87
commit
22dcebb93d
@ -41,6 +41,13 @@ values: |
|
|||||||
services:
|
services:
|
||||||
- endpoint: internal
|
- endpoint: internal
|
||||||
service: etcd
|
service: etcd
|
||||||
|
custom_resources:
|
||||||
|
- apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Workflow
|
||||||
|
name: wf-example
|
||||||
|
fields:
|
||||||
|
- key: "status.phase"
|
||||||
|
value: "Succeeded"
|
||||||
endpoints:
|
endpoints:
|
||||||
local_image_registry:
|
local_image_registry:
|
||||||
namespace: docker-registry
|
namespace: docker-registry
|
||||||
@ -103,6 +110,8 @@ return: |
|
|||||||
value: ""
|
value: ""
|
||||||
- name: DEPENDENCY_POD_JSON
|
- name: DEPENDENCY_POD_JSON
|
||||||
value: ""
|
value: ""
|
||||||
|
- name: DEPENDENCY_CUSTOM_RESOURCE
|
||||||
|
value: "[{\"apiVersion\":\"argoproj.io/v1alpha1\",\"kind\":\"Workflow\",\"namespace\":\"default\",\"name\":\"wf-example\",\"fields\":[{\"key\":\"status.phase\",\"value\":\"Succeeded\"}]}]"
|
||||||
- name: COMMAND
|
- name: COMMAND
|
||||||
value: "echo done"
|
value: "echo done"
|
||||||
command:
|
command:
|
||||||
@ -144,6 +153,9 @@ Values:
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $deps := $envAll.Values.__kubernetes_entrypoint_init_container.deps }}
|
{{- $deps := $envAll.Values.__kubernetes_entrypoint_init_container.deps }}
|
||||||
|
{{- range $deps.custom_resources }}
|
||||||
|
{{- $_ := set . "namespace" $envAll.Release.Namespace -}}
|
||||||
|
{{- end -}}
|
||||||
{{- $default_security_context := include "helm-toolkit.snippets.kubernetes_entrypoint_init_container._default_security_context" . | fromYaml }}
|
{{- $default_security_context := include "helm-toolkit.snippets.kubernetes_entrypoint_init_container._default_security_context" . | fromYaml }}
|
||||||
{{- $patchedEnvAll := mergeOverwrite $default_security_context $envAll }}
|
{{- $patchedEnvAll := mergeOverwrite $default_security_context $envAll }}
|
||||||
- name: init
|
- name: init
|
||||||
@ -181,6 +193,8 @@ Values:
|
|||||||
value: "{{ include "helm-toolkit.utils.joinListWithComma" $deps.container }}"
|
value: "{{ include "helm-toolkit.utils.joinListWithComma" $deps.container }}"
|
||||||
- name: DEPENDENCY_POD_JSON
|
- name: DEPENDENCY_POD_JSON
|
||||||
value: {{ if $deps.pod }}{{ toJson $deps.pod | quote }}{{ else }}""{{ end }}
|
value: {{ if $deps.pod }}{{ toJson $deps.pod | quote }}{{ else }}""{{ end }}
|
||||||
|
- name: DEPENDENCY_CUSTOM_RESOURCE
|
||||||
|
value: {{ if $deps.custom_resources }}{{ toJson $deps.custom_resources | quote }}{{ else }}""{{ end }}
|
||||||
- name: COMMAND
|
- name: COMMAND
|
||||||
value: "echo done"
|
value: "echo done"
|
||||||
command:
|
command:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user