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

[stable/minecraft] Update to the recommended pvc patterns. #454

Merged
merged 4 commits into from
Jan 30, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion stable/minecraft/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: minecraft
version: 0.1.1
version: 0.1.2
description: Minecraft server
keywords:
- game
Expand Down
6 changes: 3 additions & 3 deletions stable/minecraft/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
Expand the name of the chart.
*/}}
{{- define "name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 24 -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified app name.
We truncate at 24 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "fullname" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- printf "%s-%s" .Release.Name $name | trunc 24 -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
6 changes: 5 additions & 1 deletion stable/minecraft/templates/datadir-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ metadata:
release: "{{ .Release.Name }}"
heritage: "{{ .Release.Service }}"
annotations:
volume.alpha.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }}
{{- if .Values.persistence.storageClass }}
volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }}
{{- else }}
volume.alpha.kubernetes.io/storage-class: default
{{- end }}
spec:
accessModes:
- ReadWriteOnce
Expand Down
5 changes: 4 additions & 1 deletion stable/minecraft/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ minecraftServer:
serviceType: LoadBalancer

persistence:
storageClass: generic
## If defined, volume.beta.kubernetes.io/storage-class: <storageClass>
## Default: volume.alpha.kubernetes.io/storage-class: default
##
# storageClass:
dataDir:
# Set this to false if you don't care to persist state between restarts.
enabled: true
Expand Down