Skip to content

Commit

Permalink
Allow configure probes in values
Browse files Browse the repository at this point in the history
  • Loading branch information
BWibo committed Jan 17, 2023
1 parent b56bb9f commit 7338399
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 16 deletions.
2 changes: 1 addition & 1 deletion helm/charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ maintainers:
name: Bruno Willenborg
url: https://www.asg.ed.tum.de/en/gis/our-team/staff/bruno-willenborg/

version: 0.7.2
version: 0.7.3
appVersion: "0.0.1"

dependencies:
Expand Down
2 changes: 1 addition & 1 deletion helm/charts/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# tum-gis-iot-stack-k8s

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

Helm Chart for the TUM-GI IoT stack.

Expand Down
2 changes: 1 addition & 1 deletion helm/charts/charts/caddy/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: caddy
description: Caddy webserver
type: application
version: 0.2.0
version: 0.3.0
appVersion: "2.6.2-alpine"
13 changes: 10 additions & 3 deletions helm/charts/charts/caddy/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# caddy

![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: 2.6.2-alpine](https://img.shields.io/badge/AppVersion-2.6.2--alpine-informational?style=flat-square)
![Version: 0.3.0](https://img.shields.io/badge/Version-0.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.6.2-alpine](https://img.shields.io/badge/AppVersion-2.6.2--alpine-informational?style=flat-square)

Caddy webserver

Expand Down Expand Up @@ -30,7 +30,9 @@ Caddy webserver
| ingress.domains | list | `[]` | List of [FQDNs](https://de.wikipedia.org/wiki/Fully-Qualified_Host_Name) for this Ingress. Note: All FQDNs will be used for Ingress hosts and TLS certificate. |
| ingress.enabled | bool | `true` | Enable/disable ingress |
| ingress.subpath | string | `nil` | Make Caddy available at a subpath. By default Caddy will be available from [DOMAIN]/ Don't append or prepend :// or / |
| livenessProbe | object | `{"failureThreshold":5,"httpGet":{"path":"/","port":"http","scheme":"HTTP"},"initialDelaySeconds":10,"periodSeconds":5,"successThreshold":1,"timeoutSeconds":1}` | [Liveness probe](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#Probe) for details. |
| livenessProbe | object | `{"enabled":false,"failureThreshold":5,"initialDelaySeconds":10,"periodSeconds":5,"probe":{"httpGet":{"path":"/","port":"http","scheme":"HTTP"}},"successThreshold":1,"terminationGracePeriodSeconds":null,"timeoutSeconds":1}` | [Liveness probe](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#Probe) for details. |
| livenessProbe.enabled | bool | `false` | Enable/disable liveness probe |
| livenessProbe.probe | object | `{"httpGet":{"path":"/","port":"http","scheme":"HTTP"}}` | Configure [startup probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) |
| nameOverride | string | `nil` | Override name |
| nodeSelector | object | `{}` | |
| persistence.data.accessModes | list | `["ReadOnlyMany"]` | Storage [access modes](https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes) |
Expand All @@ -40,7 +42,9 @@ Caddy webserver
| persistence.storageClassName | string | `nil` | StorageClass to use, leave empty to use default StorageClass. |
| podAnnotations | object | `{}` | Additional pod annotations |
| podSecurityContext | object | `{}` | |
| readinessProbe | object | `{"failureThreshold":5,"httpGet":{"path":"/","port":"http","scheme":"HTTP"},"initialDelaySeconds":10,"periodSeconds":5,"successThreshold":1,"timeoutSeconds":1}` | [Readiness probe](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#Probe) for details. |
| readinessProbe | object | `{"enabled":false,"failureThreshold":5,"initialDelaySeconds":10,"periodSeconds":5,"probe":{"httpGet":{"path":"/","port":"http","scheme":"HTTP"}},"successThreshold":1,"terminationGracePeriodSeconds":null,"timeoutSeconds":1}` | [Readiness probe](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#Probe) for details. |
| readinessProbe.enabled | bool | `false` | Enable/disable readiness |
| readinessProbe.probe | object | `{"httpGet":{"path":"/","port":"http","scheme":"HTTP"}}` | Configure [startup probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) |
| replicaCount | int | `1` | Number of replicas. Only used if autoscaling.enabled = false |
| resources.limits.cpu | string | `"500m"` | |
| resources.limits.memory | string | `"500Mi"` | |
Expand All @@ -52,6 +56,9 @@ Caddy webserver
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
| serviceAccount.create | bool | `false` | 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 | `{"enabled":false,"failureThreshold":5,"initialDelaySeconds":10,"periodSeconds":5,"probe":{"httpGet":{"path":"/","port":"http","scheme":"HTTP"}},"successThreshold":1,"terminationGracePeriodSeconds":null,"timeoutSeconds":1}` | [Startup probe](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes) See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#Probe) for details. |
| startupProbe.enabled | bool | `false` | Enable/disable startup probe |
| startupProbe.probe | object | `{"httpGet":{"path":"/","port":"http","scheme":"HTTP"}}` | Configure [startup probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/) |
| tolerations | list | `[]` | |

----------------------------------------------
Expand Down
33 changes: 31 additions & 2 deletions helm/charts/charts/caddy/templates/caddy-depl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,43 @@ spec:
mountPath: "/etc/caddy"
readOnly: true

{{- with .Values.livenessProbe }}
{{- if .Values.startupProbe.enabled }}
startupProbe:
initialDelaySeconds: {{ .Values.startupProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.startupProbe.periodSeconds }}
timeoutSeconds: {{ .Values.startupProbe.timeoutSeconds }}
successThreshold: {{ .Values.startupProbe.successThreshold }}
failureThreshold: {{ .Values.startupProbe.failureThreshold }}
terminationGracePeriodSeconds: {{ .Values.startupProbe.terminationGracePeriodSeconds }}
{{- with .Values.startupProbe.probe }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}

{{- if .Values.livenessProbe.enabled }}
livenessProbe:
initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.livenessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }}
successThreshold: {{ .Values.livenessProbe.successThreshold }}
failureThreshold: {{ .Values.livenessProbe.failureThreshold }}
terminationGracePeriodSeconds: {{ .Values.livenessProbe.terminationGracePeriodSeconds }}
{{- with .Values.livenessProbe.probe }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}

{{- with .Values.readinessProbe }}
{{- if .Values.readinessProbe.enabled }}
readinessProbe:
initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }}
periodSeconds: {{ .Values.readinessProbe.periodSeconds }}
timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }}
successThreshold: {{ .Values.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
terminationGracePeriodSeconds: {{ .Values.readinessProbe.terminationGracePeriodSeconds }}
{{- with .Values.readinessProbe.probe }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- end }}

resources:
Expand Down
44 changes: 36 additions & 8 deletions helm/charts/charts/caddy/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,31 +103,59 @@ caddyfile: |-
file_server
}
# -- [Startup probe](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes)
# See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#Probe) for details.
startupProbe:
# -- Enable/disable startup probe
enabled: false
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 5
terminationGracePeriodSeconds:
# -- Configure [startup probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)
probe:
httpGet:
path: /
port: http
scheme: HTTP

# -- [Liveness probe](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes)
# See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#Probe) for details.
livenessProbe:
# -- Enable/disable liveness probe
enabled: false
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 5
httpGet:
path: /
port: http
scheme: HTTP
terminationGracePeriodSeconds:
# -- Configure [startup probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)
probe:
httpGet:
path: /
port: http
scheme: HTTP

# -- [Readiness probe](https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes)
# See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#Probe) for details.
readinessProbe:
# -- Enable/disable readiness
enabled: false
initialDelaySeconds: 10
periodSeconds: 5
timeoutSeconds: 1
successThreshold: 1
failureThreshold: 5
httpGet:
path: /
port: http
scheme: HTTP
terminationGracePeriodSeconds:
# -- Configure [startup probe](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)
probe:
httpGet:
path: /
port: http
scheme: HTTP

resources:
limits:
Expand Down

0 comments on commit 7338399

Please sign in to comment.