Skip to content

Commit

Permalink
Merge pull request #24 from colearendt/improve-generic-values
Browse files Browse the repository at this point in the history
allow customizing command and args for the generic chart
  • Loading branch information
colearendt authored Jan 19, 2022
2 parents fa7adbd + 37b8133 commit 5a1677b
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/generic/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: generic
description: A generic Helm chart for Kubernetes

type: application
version: 0.2.0
version: 0.2.1
appVersion: latest
maintainers:
- name: colearendt
Expand Down
4 changes: 4 additions & 0 deletions charts/generic/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.2.1

- Add customization for `command` and `args`

# 0.2.0

- BREAKING: move `podAnnotations` into `pod.annotations`
Expand Down
4 changes: 3 additions & 1 deletion charts/generic/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# generic

![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)
![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: latest](https://img.shields.io/badge/AppVersion-latest-informational?style=flat-square)

A generic Helm chart for Kubernetes

Expand All @@ -15,10 +15,12 @@ A generic Helm chart for Kubernetes
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| args | list | `[]` | args for the pod's primary container. Default is the container's default "command" |
| autoscaling.enabled | bool | `false` | |
| autoscaling.maxReplicas | int | `100` | |
| autoscaling.minReplicas | int | `1` | |
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| command | list | `[]` | command for the pod's primary container. Default is the container's default entrypoint |
| extraObjects | list | `[]` | Extra kubernetes objects to deploy (value evaluted as a template) |
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
Expand Down
6 changes: 6 additions & 0 deletions charts/generic/ci/all-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ pod:
securityContext: {}
# fsGroup: 2000

command:
- "sh"
- "-c"
args:
- "'echo hi'"

serviceAccount:
# -- Specifies whether a service account should be created
create: true
Expand Down
8 changes: 8 additions & 0 deletions charts/generic/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ spec:
- name: http
containerPort: {{ .Values.pod.port }}
protocol: TCP
{{- with .Values.command }}
command:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.args }}
args:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.readinessProbe }}
readinessProbe:
{{- toYaml . | nindent 12 }}
Expand Down
5 changes: 5 additions & 0 deletions charts/generic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ pod:
securityContext: {}
# fsGroup: 2000

# -- command for the pod's primary container. Default is the container's default entrypoint
command: []
# -- args for the pod's primary container. Default is the container's default "command"
args: []

storage:
name: ''
create: false
Expand Down

0 comments on commit 5a1677b

Please sign in to comment.