[stable/moodle] Standardize 'fullname' and 'name' macros (#15440)

* [stable/moodle] Standardize 'fullname' and 'name' macros

Signed-off-by: juan131 <juan@bitnami.com>

* Fix PVC name

Signed-off-by: juan131 <juan@bitnami.com>
This commit is contained in:
Juan Ariza Toledano
2019-07-12 03:51:05 -07:00
committed by Kubernetes Prow Robot
parent a3eb44f8e8
commit 4d1ca2afa6
5 changed files with 28 additions and 9 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
apiVersion: v1
name: moodle
version: 4.2.8
version: 4.2.9
appVersion: 3.7.1
description: Moodle is a learning platform designed to provide educators, administrators and learners with a single robust, secure and integrated system to create personalised learning environments
keywords:
+2
View File
@@ -56,6 +56,8 @@ The following table lists the configurable parameters of the Moodle chart and th
| `image.tag` | Moodle Image tag | `{TAG_NAME}` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `image.pullSecrets` | Specify docker-registry secret names as an array | `[]` (does not add image pull secrets to deployed pods) |
| `nameOverride` | String to partially override moodle.fullname template with a string (will prepend the release name) | `nil` |
| `fullnameOverride` | String to fully override moodle.fullname template with a string | `nil` |
| `moodleUsername` | User of the application | `user` |
| `moodlePassword` | Application password | _random 10 character alphanumeric string_ |
| `moodleEmail` | Admin email | `user@example.com` |
+16 -7
View File
@@ -11,24 +11,33 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "moodle.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "moodle.mariadb.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- printf "%s-%s" .Values.fullnameOverride "mariadb" | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- printf "%s-%s" .Release.Name "mariadb" | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s-%s" .Release.Name $name "mariadb" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
*/}}
{{- define "moodle.moodle.fullname" -}}
{{- printf "%s-%s" .Release.Name "moodle" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{/*
+1 -1
View File
@@ -154,7 +154,7 @@ spec:
- name: moodle-data
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ .Values.persistence.existingClaim | default (include "moodle.moodle.fullname" . ) }}
claimName: {{ .Values.persistence.existingClaim | default (include "moodle.fullname" . ) }}
{{- else }}
emptyDir: {}
{{- end }}
+8
View File
@@ -26,6 +26,14 @@ image:
# pullSecrets:
# - myRegistryKeySecretName
## String to partially override moodle.fullname template (will maintain the release name)
##
# nameOverride:
## String to fully override moodle.fullname template
##
# fullnameOverride:
## User of the application
## ref: https://github.com/bitnami/bitnami-docker-moodle#configuration
##