Skip to content

Commit

Permalink
Add support for user defined annotations on StatefulSet (#95)
Browse files Browse the repository at this point in the history
* Add support for user defined annotations on StatefulSet

* Add default statefulSetAnnotations value

* Update README.md with statefulSetAnnotations
  • Loading branch information
AfonsoFGarcia authored Jan 7, 2025
1 parent d163928 commit 01a1eee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions charts/home-assistant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ This document provides detailed configuration options for the Home Assistant Hel
| `serviceAccount.create` | Specifies whether a service account should be created | `true` |
| `serviceAccount.annotations` | Annotations to add to the service account | `{}` |
| `serviceAccount.name` | The name of the service account to use | `""` |
| `statefulSetAnnotations` | Annotations to add to the StatefulSet | `{}` |
| `podAnnotations` | Annotations to add to the pod | `{}` |
| `podSecurityContext` | Pod security context settings | `{}` |
| `env` | Environment variables | `[]` |
Expand Down
4 changes: 4 additions & 0 deletions charts/home-assistant/templates/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ metadata:
name: {{ include "home-assistant.fullname" . }}
labels:
{{- include "home-assistant.labels" . | nindent 4 }}
{{- if .Values.statefulSetAnnotations }}
annotations:
{{- toYaml .Values.statefulSetAnnotations | nindent 4 }}
{{- end }}
spec:
serviceName: {{ include "home-assistant.fullname" . }}
replicas: {{ .Values.replicaCount }}
Expand Down
3 changes: 3 additions & 0 deletions charts/home-assistant/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -387,3 +387,6 @@ addons:
additionalMounts: []
# - mountPath: /home/coder/.ssh/id_rsa
# name: id-rsa

# Annotations to add to the stateful set
statefulSetAnnotations: {}

0 comments on commit 01a1eee

Please sign in to comment.