Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Prometheus: default to alpha dynamic PV annotation #235

Merged
merged 2 commits into from
Nov 21, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions stable/prometheus/templates/alertmanager-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
{{- if .Values.alertmanager.persistentVolume.storageClass -}}
volume.beta.kubernetes.io/storage-class: {{ .Values.alertmanager.persistentVolume.storageClass }}
{{ else }}
volume.alpha.kubernetes.io/storage-class: ''
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to http://kubernetes.io/docs/user-guide/persistent-volumes/#writing-portable-configuration we should set it to default (although I don't think it actually makes a difference)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me add that real quick.

{{- end }}
{{- range $key, $value := .Values.alertmanager.persistentVolume.annotations }}
{{ $key }}: {{ $value }}
{{- end }}
Expand Down
5 changes: 5 additions & 0 deletions stable/prometheus/templates/server-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ apiVersion: v1
kind: PersistentVolumeClaim
metadata:
annotations:
{{- if .Values.server.persistentVolume.storageClass -}}
volume.beta.kubernetes.io/storage-class: {{ .Values.server.persistentVolume.storageClass }}
{{ else }}
volume.alpha.kubernetes.io/storage-class: ''
{{- end }}
{{- range $key, $value := .Values.server.persistentVolume.annotations }}
{{ $key }}: {{ $value }}
{{- end }}
Expand Down
14 changes: 10 additions & 4 deletions stable/prometheus/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,16 @@ alertmanager:

## AlertManager data Persistent Volume annotations
##
annotations:
volume.beta.kubernetes.io/storage-class: standard
# annotations:

## AlertManager data Persistent Volume size
##
size: 2Gi

## AlertManager data Persistent Volume Storage Class
##
# storageClass:

## Alertmanager resource requests and limits
## Ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
Expand Down Expand Up @@ -168,13 +171,16 @@ server:

## Server data Persistent Volume annotations
##
annotations:
volume.beta.kubernetes.io/storage-class: standard
# annotations:

## Server data Persistent Volume size
##
size: 8Gi

## AlertManager data Persistent Volume Storage Class
##
# storageClass:

## Server resource requests and limits
## Ref: http://kubernetes.io/docs/user-guide/compute-resources/
##
Expand Down