Skip to content

Commit

Permalink
Merge pull request #61 from jordanopensource/task/add_args_command_ov…
Browse files Browse the repository at this point in the history
…erride_to_base_chart

feat(base): add the ability to override command and args
  • Loading branch information
thread-koder authored Oct 28, 2024
2 parents e122030 + 2f2295b commit 86df259
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/base/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ maintainers:
url: https://github.com/jordanopensource/charts/
sources:
- https://github.com/jordanopensource/charts/tree/main/charts/base
version: 1.0.4
version: 1.1.0
appVersion: 1.0.1
6 changes: 6 additions & 0 deletions charts/base/templates/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ spec:
{{- toYaml .Values.workload.securityContext | nindent 12 }}
image: "{{ .Values.workload.image.repository }}:{{ .Values.workload.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.workload.image.pullPolicy }}
{{- if .Values.workload.command }}
command: {{- include "base.tplvalues.render" (dict "value" .Values.workload.command "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.workload.args }}
args: {{- include "base.tplvalues.render" (dict "value" .Values.workload.args "context" $) | nindent 12 }}
{{- end }}
{{- if .Values.workload.env }}
env: {{- include "base.tplvalues.render" (dict "value" .Values.workload.env "context" $) | nindent 12 }}
{{- end }}
Expand Down
17 changes: 17 additions & 0 deletions charts/base/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,23 @@ workload:
## containerPort: 1234
sideCars: []

## @param workload.args add or override main container arguments as an array
## https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/
## Example
# ["-capacity", "500"]
# Or
# - "-capacity"
# - "500"
args: []

## @param workload.command override main container command
## https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/
## Example
# ["/bin/echo"]
# Or
# - "/bin/echo"
command: []

## @param workload.env define environment variables
## Example
## - name: NODE_ENV
Expand Down

0 comments on commit 86df259

Please sign in to comment.