From e12e98470314c3fa8104f55daf37d3c3a80cc011 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Rodr=C3=ADguez=20Hern=C3=A1ndez?= Date: Thu, 18 Jul 2019 16:34:59 +0200 Subject: [PATCH] [stable/orangehrm] Implement again "Standardize 'fullname' and 'name' macros" (#15654) This reverts commit 74281ac7ebbf0e57144dd1b2ef12c038032608b1. Implement #15434 bumping a major version after #15608 Signed-off-by: Carlos Rodriguez Hernandez --- stable/orangehrm/Chart.yaml | 2 +- stable/orangehrm/README.md | 2 ++ stable/orangehrm/templates/_helpers.tpl | 8 ++++++++ stable/orangehrm/values.yaml | 8 ++++++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/stable/orangehrm/Chart.yaml b/stable/orangehrm/Chart.yaml index 55a86ede1a..cd92430dba 100644 --- a/stable/orangehrm/Chart.yaml +++ b/stable/orangehrm/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: orangehrm -version: 4.4.6 +version: 5.0.0 appVersion: 4.3.2-0 description: OrangeHRM is a free HR management system that offers a wealth of modules to suit the needs of your business. diff --git a/stable/orangehrm/README.md b/stable/orangehrm/README.md index b1c9d5d49a..a96d9c697d 100644 --- a/stable/orangehrm/README.md +++ b/stable/orangehrm/README.md @@ -56,6 +56,8 @@ The following table lists the configurable parameters of the OrangeHRM chart and | `image.tag` | OrangeHRM 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 orangehrm.fullname template with a string (will prepend the release name) | `nil` | +| `fullnameOverride` | String to fully override orangehrm.fullname template with a string | `nil` | | `orangehrmUsername` | User of the application | `user` | | `orangehrmPassword` | Application password | _random 10 character long alphanumeric string_ | | `smtpHost` | SMTP host | `nil` | diff --git a/stable/orangehrm/templates/_helpers.tpl b/stable/orangehrm/templates/_helpers.tpl index 53374ec7f3..16ac1dcccc 100644 --- a/stable/orangehrm/templates/_helpers.tpl +++ b/stable/orangehrm/templates/_helpers.tpl @@ -11,9 +11,17 @@ 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 "orangehrm.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 chart name and version as used by the chart label. diff --git a/stable/orangehrm/values.yaml b/stable/orangehrm/values.yaml index 394ab20073..eb3f0d5111 100644 --- a/stable/orangehrm/values.yaml +++ b/stable/orangehrm/values.yaml @@ -26,6 +26,14 @@ image: # pullSecrets: # - myRegistryKeySecretName +## String to partially override orangehrm.fullname template (will maintain the release name) +## +# nameOverride: + +## String to fully override orangehrm.fullname template +## +# fullnameOverride: + ## User of the application ## ref: https://github.com/bitnami/bitnami-docker-orangehrm#configuration ##