Skip to content

Commit

Permalink
Merge pull request #22 from colearendt/add-generic-probes
Browse files Browse the repository at this point in the history
Add generic probes
  • Loading branch information
colearendt authored Jan 19, 2022
2 parents 1aff38a + b7fd90a commit 536dd73
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 5 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.1.4
version: 0.1.5
appVersion: latest
maintainers:
- name: colearendt
Expand Down
6 changes: 6 additions & 0 deletions charts/generic/NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 0.1.5

- Add values for `readinessProbe`, `livenessProbe` and `startupProbe`
- This allows customization of probes
- Previously, `readinessProbe` was hardcoded

# 0.1.4

- Add `extraObjects` for arbitrary deployment possibilities!
Expand Down
5 changes: 4 additions & 1 deletion charts/generic/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# generic

![Version: 0.1.4](https://img.shields.io/badge/Version-0.1.4-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.1.5](https://img.shields.io/badge/Version-0.1.5-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 Down Expand Up @@ -30,12 +30,14 @@ A generic Helm chart for Kubernetes
| ingress.hosts[0].host | string | `"chart-example.local"` | |
| ingress.hosts[0].paths | list | `[]` | |
| ingress.tls | list | `[]` | |
| livenessProbe | object | `{}` | customize the primary container's livenessProbe. Default none |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| pod.env | list | `[]` | |
| pod.port | int | `80` | |
| podAnnotations | object | `{}` | |
| podSecurityContext | object | `{}` | |
| readinessProbe | object | `{"httpGet":{"path":"/","port":"http"}}` | customize the primary container's readinessProbe. Default is httpGet on the default `http` port |
| replicaCount | int | `1` | |
| resources | object | `{}` | |
| securityContext | object | `{}` | |
Expand All @@ -44,6 +46,7 @@ A generic Helm chart for Kubernetes
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created |
| serviceAccount.name | string | `""` | The name of the service account to use. -- If not set and create is true, a name is generated using the fullname template |
| startupProbe | object | `{}` | customize the primary container's startupProbe. Default none |
| storage.accessModes[0] | string | `"ReadWriteOnce"` | |
| storage.create | bool | `false` | |
| storage.name | string | `""` | |
Expand Down
10 changes: 10 additions & 0 deletions charts/generic/ci/all-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,13 @@ extraObjects:
name: "templating"
data:
something: {{ printf "special" }}
readinessProbe: null
livenessProbe:
httpGet:
path: /
port: http
startupProbe:
httpGet:
path: /
port: http
14 changes: 11 additions & 3 deletions charts/generic/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,18 @@ spec:
- name: http
containerPort: {{ .Values.pod.port }}
protocol: TCP
{{- with .Values.readinessProbe }}
readinessProbe:
httpGet:
path: /
port: http
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.livenessProbe }}
livenessProbe:
{{- toYaml . | nindent 12}}
{{- end }}
{{- with .Values.startupProbe }}
startupProbe:
{{- toYaml . | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
Expand Down
11 changes: 11 additions & 0 deletions charts/generic/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,14 @@ affinity: {}

# -- Extra kubernetes objects to deploy (value evaluted as a template)
extraObjects: []

# -- customize the primary container's readinessProbe. Default is httpGet on the default `http` port
readinessProbe:
httpGet:
path: /
port: http

# -- customize the primary container's livenessProbe. Default none
livenessProbe: {}
# -- customize the primary container's startupProbe. Default none
startupProbe: {}

0 comments on commit 536dd73

Please sign in to comment.