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

[stable/rabbitmq] Update to the recommended pvc patterns. #464

Merged
merged 6 commits into from
Jan 31, 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/rabbitmq/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: rabbitmq
version: 0.4.0
version: 0.4.1
description: Open source message broker software that implements the Advanced Message Queuing Protocol (AMQP)
keywords:
- rabbitmq
Expand Down
2 changes: 1 addition & 1 deletion stable/rabbitmq/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The following tables lists the configurable parameters of the RabbitMQ chart and
| `rabbitmqVhost` | RabbitMQ application vhost | `/` |
| `rabbitmqManagerPort` | RabbitMQ Manager port | `15672` |
| `persistence.enabled` | Use a PVC to persist data | `true` |
| `persistence.storageClass` | Storage class of backing PVC | `generic` |
| `persistence.storageClass` | Storage class of backing PVC | `nil` (uses alpha storage class annotation) |
| `persistence.accessMode` | Use volume as ReadOnly or ReadWrite | `ReadWriteOnce` |
| `persistence.size` | Size of data volume | `8Gi` |

Expand Down
4 changes: 2 additions & 2 deletions stable/rabbitmq/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
The RabbitMQ AMQP port {{ default "5672" .Values.rabbitmqNodePort }} can be accessed on the following DNS name from within your cluster: {{ template "fullname" . }}.{{ .Release.Namespace }}.svc.cluster.local

echo Username : {{ .Values.rabbitmqUsername }}
echo Password : $(printf $(printf '\%o' `kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.rabbitmq-password[*]}"`))
echo ErLang Cookie : $(printf $(printf '\%o' `kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.rabbitmq-erlang-cookie[*]}"`))
echo Password : $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.rabbitmq-password}" | base64 --decode)
echo ErLang Cookie : $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.rabbitmq-erlang-cookie}" | base64 --decode)

To Access the RabbitMQ Management interface:

Expand Down
6 changes: 3 additions & 3 deletions stable/rabbitmq/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/rabbitmq/templates/pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ apiVersion: v1
metadata:
name: {{ template "fullname" . }}
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:
- {{ .Values.persistence.accessMode | quote }}
Expand Down
5 changes: 4 additions & 1 deletion stable/rabbitmq/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ rabbitmqManagerPort: 15672

persistence:
enabled: true
storageClass: generic
## If defined, volume.beta.kubernetes.io/storage-class: <storageClass>
## Default: volume.alpha.kubernetes.io/storage-class: default
##
# storageClass:
accessMode: ReadWriteOnce
size: 8Gi

Expand Down