Fix nested format

This commit is contained in:
Waqar Ahmed 2020-09-29 01:01:27 +05:00
parent ae90a73a52
commit caccef7af1
3 changed files with 17 additions and 18 deletions

View File

@ -6,21 +6,21 @@
type: dict type: dict
required: true required: true
attrs: attrs:
- variable: image.repository - variable: repository
description: "Docker image repository" description: "Docker image repository"
label: "Image repository" label: "Image repository"
group: "Container Images" group: "Container Images"
schema: schema:
type: string type: string
required: true required: true
- variable: image.tag - variable: tag
description: "Tag to use for specified image" description: "Tag to use for specified image"
label: "Image Tag" label: "Image Tag"
group: "Container Images" group: "Container Images"
schema: schema:
type: string type: string
default: "latest" default: "latest"
- variable: image.pull_policy - variable: pull_policy
description: "Docker Image Pull Policy" description: "Docker Image Pull Policy"
label: "Image Pull Policy" label: "Image Pull Policy"
group: "Container Images" group: "Container Images"
@ -33,7 +33,7 @@
- "Never" - "Never"
# Configurable CMD / Entrypoint / Environment Variables # Configurable CMD / Entrypoint / Environment Variables
- variable: container_entrypoint - variable: container_command
description: "Commands to execute inside container overriding image CMD default" description: "Commands to execute inside container overriding image CMD default"
label: "Container CMD" label: "Container CMD"
group: "Container Entrypoint" group: "Container Entrypoint"
@ -45,7 +45,7 @@
label: "Command" label: "Command"
schema: schema:
type: string type: string
- variable: container.args - variable: container_args
description: "Specify arguments for container command" description: "Specify arguments for container command"
label: "Container Args" label: "Container Args"
group: "Container Entrypoint" group: "Container Entrypoint"
@ -57,7 +57,7 @@
label: "Arg" label: "Arg"
schema: schema:
type: string type: string
- variable: container.environment_variables - variable: container_environment_variables
description: "Container Environment Variables" description: "Container Environment Variables"
label: "Container Environment Variables" label: "Container Environment Variables"
group: "Container Entrypoint" group: "Container Entrypoint"

View File

@ -18,22 +18,22 @@ spec:
securityContext: securityContext:
{{- toYaml .Values.securityContext | nindent 12 }} {{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default "latest" }}" image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default "latest" }}"
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pull_policy }}
{{- if .Values.container_entrypoint.command }} {{- if .Values.container_command }}
command: command:
{{- range .Values.container_entrypoint.command }} {{- range .Values.container_command }}
- {{ . | quote}} - {{ . | quote}}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if .Values.container_entrypoint.args }} {{- if .Values.container_args }}
args: args:
{{- range .Values.container_entrypoint.args }} {{- range .Values.container_args }}
- {{ . | quote}} - {{ . | quote}}
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if .Values.container_entrypoint.environment_variables }} {{- if .Values.container_environment_variables }}
env: env:
{{- range .Values.container_entrypoint.environment_variables }} {{- range .Values.container_environment_variables }}
- name: {{ .name | quote }} - name: {{ .name | quote }}
value: {{ .value | quote }} value: {{ .value | quote }}
{{- end }} {{- end }}

View File

@ -2,12 +2,11 @@
image: image:
repository: debian repository: debian
pullPolicy: IfNotPresent pull_policy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion. # Overrides the image tag whose default is the chart appVersion.
tag: "testing" tag: "testing"
# Container CMD / entrypoint # Container CMD / entrypoint
container_entrypoint: container_command: []
command: [] container_args: []
args: [] container_environment_variables: []
environment_variables: []