Skip to content

Commit

Permalink
feat: make command + probe livenessProbe user configurable (#18)
Browse files Browse the repository at this point in the history
Pre-requisite for #17
  • Loading branch information
tamcore authored Nov 2, 2024
1 parent 92a77b7 commit 405f3e4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
2 changes: 2 additions & 0 deletions charts/zigbee2mqtt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ Kubernetes: `>=1.26.0-0`
| service.annotations | object | `{}` | annotations for the service created |
| service.port | int | `8080` | port in which the service will be listening |
| service.type | string | `"LoadBalancer"` | type of Service to be created |
| statefulset.command | object | `{}` | Overrides the entrypoint of the container |
| statefulset.dnsPolicy | string | `"ClusterFirst"` | pod dns policy |
| statefulset.livenessProbe | object | `{"failureThreshold":5,"httpGet":{"path":"/","port":"web"},"initialDelaySeconds":60,"periodSeconds":30,"timeoutSeconds":10}` | Configures Container liveness probe |
| statefulset.nodeSelector | object | `{}` | Select specific kube node, this will allow enforcing zigbee2mqtt running only on the node with the USB adapter connected |
| statefulset.podSecurityContext | object | `{"seccompProfile":{"type":"RuntimeDefault"}}` | Configure Pods Security Context |
| statefulset.resources | object | `{"limits":{"cpu":"200m","memory":"600Mi"},"requests":{"cpu":"200m","memory":"600Mi"}}` | CPU/Memory configuration for the pods |
Expand Down
14 changes: 7 additions & 7 deletions charts/zigbee2mqtt/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ spec:
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.statefulset.command }}
command:
{{- toYaml . | nindent 12 }}
{{- end }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: TZ
Expand All @@ -55,14 +59,10 @@ spec:
- containerPort: {{ .Values.zigbee2mqtt.frontend.port }}
name: web
protocol: TCP
{{- with .Values.statefulset.livenessProbe }}
livenessProbe:
failureThreshold: 5
httpGet:
path: /
port: web
initialDelaySeconds: 60
timeoutSeconds: 10
periodSeconds: 30
{{- toYaml . | nindent 12 }}
{{- end }}
volumeMounts:
- mountPath: /app/data/configuration.yaml
name: config-volume
Expand Down
13 changes: 12 additions & 1 deletion charts/zigbee2mqtt/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ statefulset:
limits:
memory: 600Mi
cpu: 200m
# -- Overrides the entrypoint of the container
command: {}
# -- Node taint tolerations for the pods
tolerations: {}
# -- Select specific kube node, this will allow enforcing zigbee2mqtt running
Expand All @@ -58,6 +60,15 @@ statefulset:
privileged: true
capabilities:
add: ["SYS_ADMIN"]
# -- Configures Container liveness probe
livenessProbe:
failureThreshold: 5
httpGet:
path: /
port: web
initialDelaySeconds: 60
timeoutSeconds: 10
periodSeconds: 30
zigbee2mqtt:
homeassistant:
enabled: true
Expand Down Expand Up @@ -204,7 +215,7 @@ ingress:
# -- Ingress implementation specific (potentially) for most use cases Prefix should be ok
pathType: Prefix
# Additional annotations for the ingress. ExternalDNS, and CertManager are tipically integrated here
annotations: { }
annotations: {}
# -- list of hosts that should be allowed for the zigbee2mqtt service
hosts:
- host: chart-example.local
Expand Down

0 comments on commit 405f3e4

Please sign in to comment.