From bde3fda4fdb91962bfa14764ee19039be89fdda9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Rodr=C3=ADguez=20Hern=C3=A1ndez?= Date: Wed, 17 Jul 2019 18:53:02 +0200 Subject: [PATCH] Implement again "[stable/osclass] Standardize 'fullname' and 'name' macros (#15433)" (#15618)" (#15622) This reverts commit ab477db2468878a21fffd1cc2d7bc37525cfe32f. Signed-off-by: Carlos Rodriguez Hernandez --- stable/osclass/Chart.yaml | 2 +- stable/osclass/README.md | 2 ++ stable/osclass/templates/_helpers.tpl | 9 +++++++++ stable/osclass/values.yaml | 8 ++++++++ 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/stable/osclass/Chart.yaml b/stable/osclass/Chart.yaml index f48ae89ef3..823fb8d56c 100644 --- a/stable/osclass/Chart.yaml +++ b/stable/osclass/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: osclass -version: 4.4.5 +version: 5.0.0 appVersion: 3.7.4 description: Osclass is a php script that allows you to quickly create and manage your own free classifieds site. diff --git a/stable/osclass/README.md b/stable/osclass/README.md index f277b0508a..6d3dae87c7 100644 --- a/stable/osclass/README.md +++ b/stable/osclass/README.md @@ -56,6 +56,8 @@ The following table lists the configurable parameters of the Osclass chart and t | `image.tag` | Osclass 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 osclass.fullname template with a string (will prepend the release name) | `nil` | +| `fullnameOverride` | String to fully override osclass.fullname template with a string | `nil` | | `osclassHost` | Osclass host to create application URLs | `nil` | | `osclassLoadBalancerIP` | `loadBalancerIP` for the Osclass Service | `nil` | | `osclassUsername` | User of the application | `user` | diff --git a/stable/osclass/templates/_helpers.tpl b/stable/osclass/templates/_helpers.tpl index a60c101e06..a9ca080f84 100644 --- a/stable/osclass/templates/_helpers.tpl +++ b/stable/osclass/templates/_helpers.tpl @@ -11,9 +11,18 @@ 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 "osclass.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. diff --git a/stable/osclass/values.yaml b/stable/osclass/values.yaml index 7a29fa6d65..2efc51f616 100644 --- a/stable/osclass/values.yaml +++ b/stable/osclass/values.yaml @@ -26,6 +26,14 @@ image: # pullSecrets: # - myRegistryKeySecretName +## String to partially override osclass.fullname template (will maintain the release name) +## +# nameOverride: + +## String to fully override osclass.fullname template +## +# fullnameOverride: + ## Osclass host to create application URLs ## ref: https://github.com/bitnami/bitnami-docker-osclass#configuration ##