Skip to content

Commit

Permalink
feat: Introduce startupProbe
Browse files Browse the repository at this point in the history
  • Loading branch information
mkilchhofer committed Apr 9, 2024
1 parent 700ce6f commit 5a319bc
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
8 changes: 6 additions & 2 deletions charts/unifi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ ingress:
| jvmMaxHeapSize | string | `"1024M"` | Java Virtual Machine (JVM) maximum heap size For larger installations a larger value is recommended. For memory constrained system this value can be lowered. |
| livenessProbe.enabled | bool | `true` | Enable liveness [probe] |
| livenessProbe.failureThreshold | int | `3` | Minimum consecutive failures for the [probe] to be considered failed after having succeeded. |
| livenessProbe.initialDelaySeconds | int | `30` | Number of seconds after the container has started before probes are initiated. |
| livenessProbe.initialDelaySeconds | int | `0` | Number of seconds after the container has started before probes are initiated. |
| livenessProbe.periodSeconds | int | `10` | How often (in seconds) to perform the [probe]. |
| livenessProbe.successThreshold | int | `1` | Minimum consecutive successes for the [probe] to be considered successful after having failed. |
| livenessProbe.timeoutSeconds | int | `1` | Number of seconds after which the [probe] times out. |
Expand All @@ -190,7 +190,7 @@ ingress:
| podSecurityContext | object | `{}` | Set pod-level security context |
| readinessProbe.enabled | bool | `true` | Enable readiness [probe] |
| readinessProbe.failureThreshold | int | `3` | Minimum consecutive failures for the [probe] to be considered failed after having succeeded. |
| readinessProbe.initialDelaySeconds | int | `15` | Number of seconds after the container has started before probes are initiated. |
| readinessProbe.initialDelaySeconds | int | `0` | Number of seconds after the container has started before probes are initiated. |
| readinessProbe.periodSeconds | int | `10` | How often (in seconds) to perform the [probe]. |
| readinessProbe.successThreshold | int | `1` | Minimum consecutive successes for the [probe] to be considered successful after having failed. |
| readinessProbe.timeoutSeconds | int | `1` | Number of seconds after which the [probe] times out. |
Expand All @@ -205,6 +205,10 @@ ingress:
| speedtestService.loadBalancerSourceRanges | list | `[]` | If specified and supported by the platform, this will restrict traffic through the load-balancer to the specified client IPs. |
| speedtestService.port | int | `6789` | Kubernetes port where the service is exposed |
| speedtestService.type | string | `"ClusterIP"` | Kubernetes service type |
| startupProbe.enabled | bool | `true` | Enable startup [probe]. **Set `readinessProbe.initialDelaySeconds` to at least `30` if you decide to disable the startupProbe!** Max startup delay is `failureThreshold * periodSeconds`. |
| startupProbe.failureThreshold | int | `60` | Minimum consecutive failures for the [probe] to be considered failed after having succeeded. |
| startupProbe.periodSeconds | int | `5` | How often (in seconds) to perform the [probe]. |
| startupProbe.timeoutSeconds | int | `1` | Number of seconds after which the [probe] times out. |
| strategyType | string | `"Recreate"` | upgrade strategy type (e.g. Recreate or RollingUpdate) |
| stunService.annotations | object | `{}` | Provide any additional annotations which may be required. This can be used to set the LoadBalancer service type to internal only. ref: https://kubernetes.io/docs/concepts/services-networking/service/#internal-load-balancer |
| stunService.enabled | bool | `true` | Enable service the STUN feature |
Expand Down
10 changes: 10 additions & 0 deletions charts/unifi/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,16 @@ spec:
successThreshold: {{ .Values.readinessProbe.successThreshold }}
failureThreshold: {{ .Values.readinessProbe.failureThreshold }}
{{- end }}
{{- if .Values.startupProbe.enabled }}
startupProbe:
httpGet:
path: /status
port: https-gui
scheme: HTTPS
periodSeconds: {{ .Values.startupProbe.periodSeconds }}
timeoutSeconds: {{ .Values.startupProbe.timeoutSeconds }}
failureThreshold: {{ .Values.startupProbe.failureThreshold }}
{{- end }}
env:
- name: UNIFI_HTTP_PORT
value: "{{ .Values.controllerService.port }}"
Expand Down
16 changes: 14 additions & 2 deletions charts/unifi/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ livenessProbe:
# -- Enable liveness [probe]
enabled: true
# -- Number of seconds after the container has started before probes are initiated.
initialDelaySeconds: 30
initialDelaySeconds: 0
# -- How often (in seconds) to perform the [probe].
periodSeconds: 10
# -- Number of seconds after which the [probe] times out.
Expand All @@ -425,7 +425,7 @@ readinessProbe:
# -- Enable readiness [probe]
enabled: true
# -- Number of seconds after the container has started before probes are initiated.
initialDelaySeconds: 15
initialDelaySeconds: 0
# -- How often (in seconds) to perform the [probe].
periodSeconds: 10
# -- Number of seconds after which the [probe] times out.
Expand All @@ -435,6 +435,18 @@ readinessProbe:
# -- Minimum consecutive successes for the [probe] to be considered successful after having failed.
successThreshold: 1

# Startup probe values
# Ref: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#container-probes
startupProbe:
# -- Enable startup [probe]. **Set `readinessProbe.initialDelaySeconds` to at least `30` if you decide to disable the startupProbe!** Max startup delay is `failureThreshold * periodSeconds`.
enabled: true
# -- How often (in seconds) to perform the [probe].
periodSeconds: 5
# -- Number of seconds after which the [probe] times out.
timeoutSeconds: 1
# -- Minimum consecutive failures for the [probe] to be considered failed after having succeeded.
failureThreshold: 60

# -- [Node selector] for pod assignment
nodeSelector: {}

Expand Down

0 comments on commit 5a319bc

Please sign in to comment.