Fix image schema

This commit is contained in:
Waqar Ahmed 2020-09-28 23:42:06 +05:00
parent 5be3018798
commit ae90a73a52
3 changed files with 37 additions and 36 deletions

View File

@ -1,32 +1,39 @@
# Image related
- variable: image.repository
description: "Docker image repository"
label: "Image repository"
- variable: image
description: "Docker Image Details"
group: "Container Images"
schema:
type: string
type: dict
required: true
- variable: image.tag
description: "Tag to use for specified image"
label: "Image Tag"
group: "Container Images"
schema:
type: string
default: "latest"
- variable: image.pull_policy
description: "Docker Image Pull Policy"
label: "Image Pull Policy"
group: "Container Images"
schema:
type: string
default: "IfNotPresent"
enum:
- "IfNotPresent"
- "Always"
- "Never"
attrs:
- variable: image.repository
description: "Docker image repository"
label: "Image repository"
group: "Container Images"
schema:
type: string
required: true
- variable: image.tag
description: "Tag to use for specified image"
label: "Image Tag"
group: "Container Images"
schema:
type: string
default: "latest"
- variable: image.pull_policy
description: "Docker Image Pull Policy"
label: "Image Pull Policy"
group: "Container Images"
schema:
type: string
default: "IfNotPresent"
enum:
- "IfNotPresent"
- "Always"
- "Never"
# Configurable CMD / Entrypoint / Environment Variables
- variable: container.command
- variable: container_entrypoint
description: "Commands to execute inside container overriding image CMD default"
label: "Container CMD"
group: "Container Entrypoint"

View File

@ -19,21 +19,21 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default "latest" }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.container.command }}
{{- if .Values.container_entrypoint.command }}
command:
{{- range .Values.container.command }}
{{- range .Values.container_entrypoint.command }}
- {{ . | quote}}
{{- end }}
{{- end }}
{{- if .Values.container.args }}
{{- if .Values.container_entrypoint.args }}
args:
{{- range .Values.container.args }}
{{- range .Values.container_entrypoint.args }}
- {{ . | quote}}
{{- end }}
{{- end }}
{{- if .Values.container.environment_variables }}
{{- if .Values.container_entrypoint.environment_variables }}
env:
{{- range .Values.container.environment_variables }}
{{- range .Values.container_entrypoint.environment_variables }}
- name: {{ .name | quote }}
value: {{ .value | quote }}
{{- end }}

View File

@ -1,19 +1,13 @@
# Default values for ix-chart.
replicaCount: 1
image:
repository: debian
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "testing"
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
# Container CMD / entrypoint
container:
container_entrypoint:
command: []
args: []
environment_variables: []