Skip to content

Commit f87bd4d

Browse files
rb090zanhsieh
andauthored
[alertmanager] Add support for PVC annotations in StatefulSet (#6066)
Signed-off-by: rb090 <[email protected]> Co-authored-by: MH <[email protected]>
1 parent 14e5c23 commit f87bd4d

File tree

4 files changed

+33
-1
lines changed

4 files changed

+33
-1
lines changed

charts/alertmanager/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ icon: https://raw.githubusercontent.com/prometheus/prometheus.github.io/master/a
66
sources:
77
- https://github.com/prometheus/alertmanager
88
type: application
9-
version: 1.25.0
9+
version: 1.26.0
1010
# renovate: github-releases=prometheus/alertmanager
1111
appVersion: v0.28.1
1212
kubeVersion: ">=1.25.0-0"

charts/alertmanager/templates/statefulset.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,14 @@ spec:
248248
volumeClaimTemplates:
249249
- metadata:
250250
name: storage
251+
{{- with .Values.persistence.annotations }}
252+
annotations:
253+
{{ toYaml . | nindent 14 }}
254+
{{- end }}
255+
{{- with .Values.persistence.labels }}
256+
labels:
257+
{{ toYaml . | nindent 14 }}
258+
{{- end }}
251259
spec:
252260
accessModes:
253261
{{- toYaml .Values.persistence.accessModes | nindent 10 }}

charts/alertmanager/values.schema.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -814,6 +814,22 @@
814814
},
815815
"size": {
816816
"type": "string"
817+
},
818+
"annotations": {
819+
"type": "object",
820+
"description": "Custom annotations to apply to the PersistentVolumeClaim created by the Alertmanager StatefulSet.",
821+
"additionalProperties": {
822+
"type": "string"
823+
},
824+
"default": {}
825+
},
826+
"labels": {
827+
"type": "object",
828+
"description": "Custom labels to apply to the PersistentVolumeClaim created by the Alertmanager StatefulSet.",
829+
"additionalProperties": {
830+
"type": "string"
831+
},
832+
"default": {}
817833
}
818834
}
819835
},

charts/alertmanager/values.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,14 @@ persistence:
276276
##
277277
enabled: true
278278

279+
## Custom annotations for the PVC created by the alertmanager StatefulSet.
280+
## Useful for configuring storage provider options such as disk type, KMS encryption keys, or custom volume name prefixes.
281+
annotations: {}
282+
283+
## Custom labels for the PVC created by the alertmanager StatefulSet.
284+
## Useful for selecting, grouping, and organizing so that they can be queried or targeted in deployments, policies, etc.
285+
labels: {}
286+
279287
## Persistent Volume Storage Class
280288
## If defined, storageClassName: <storageClass>
281289
## If set to "-", storageClassName: "", which disables dynamic provisioning

0 commit comments

Comments
 (0)