Add basic support for configurable cmd

This commit is contained in:
Waqar Ahmed 2020-09-28 19:13:58 +05:00
parent f97ab47329
commit 1059fec24d
3 changed files with 61 additions and 63 deletions

View File

@ -16,6 +16,7 @@
- variable: image.pull_policy
description: "Docker Image Pull Policy"
label: "Image Pull Policy"
group: "Container Images"
schema:
type: string
default: "IfNotPresent"
@ -23,3 +24,54 @@
- "IfNotPresent"
- "Always"
- "Never"
# Configurable CMD / Entrypoint / Environment Variables
- variable: container.command
description: "Commands to execute inside container overriding image CMD default"
label: "Container CMD"
group: "Container Entrypoint"
schema:
type: list
items:
- variable: command
description: "Container Command"
label: "Command"
schema:
type: string
- variable: container.args
description: "Specify arguments for container command"
label: "Container Args"
group: "Container Entrypoint"
schema:
type: list
items:
- variable: arg
description: "Container Arg"
label: "Arg"
schema:
type: string
- variable: container.environment_variables
description: "Container Environment Variables"
label: "Container Environment Variables"
group: "Container Entrypoint"
schema:
type: list
items:
- variable: environment_variable
description: "Container Environment Variable"
label: "Container Environment Variable"
schema:
type: dict
attrs:
- variable: name
description: "Environment Variable Name"
label: "Environment Variable Name"
schema:
type: string
required: true
- variable: value
description: "Environment Variable Value"
label: "Environment Variable Value"
schema:
type: string
required: true

View File

@ -19,3 +19,9 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default "latest" }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.container.command }}
command:
{{- range .Values.container.command }}
- {{ . | quote}}
{{- end }}
{{- end }}

View File

@ -14,66 +14,6 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
podAnnotations: {}
podSecurityContext: {}
# fsGroup: 2000
securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
service:
type: ClusterIP
port: 8000
ingress:
enabled: false
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths: []
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80
nodeSelector: {}
tolerations: []
affinity: {}
# Container CMD / entrypoint
container:
command: []