diff --git a/stable/testlink/Chart.yaml b/stable/testlink/Chart.yaml index 65dda538b3..6da6397da4 100644 --- a/stable/testlink/Chart.yaml +++ b/stable/testlink/Chart.yaml @@ -1,5 +1,5 @@ name: testlink -version: 3.0.3 +version: 3.1.0 appVersion: 1.9.17 description: Web-based test management system that facilitates software quality assurance. icon: https://bitnami.com/assets/stacks/testlink/img/testlink-stack-220x234.png diff --git a/stable/testlink/README.md b/stable/testlink/README.md index e2de7bb084..0c0491fd8f 100644 --- a/stable/testlink/README.md +++ b/stable/testlink/README.md @@ -49,6 +49,7 @@ The following table lists the configurable parameters of the TestLink chart and | Parameter | Description | Default | |-------------------------------------|-----------------------------------------|---------------------------------------------------------| +| `global.imageRegistry` | Global Docker image registry | `nil` | | `image.registry` | TestLink image registry | `docker.io` | | `image.repository` | TestLink image name | `bitnami/testlink` | | `image.tag` | TestLink image tag | `{VERSION}` | diff --git a/stable/testlink/requirements.lock b/stable/testlink/requirements.lock index 3ef50c173b..3c1cfb14ff 100644 --- a/stable/testlink/requirements.lock +++ b/stable/testlink/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: mariadb repository: https://kubernetes-charts.storage.googleapis.com/ - version: 5.0.4 + version: 5.2.0 digest: sha256:0593b73b2163fbbbae061de1aa2b8280d43f8a423a91e1c7375c0b6c86784b1c -generated: 2018-09-25T11:58:55.304406377+02:00 +generated: 2018-10-16T08:50:59.206637+02:00 diff --git a/stable/testlink/templates/_helpers.tpl b/stable/testlink/templates/_helpers.tpl index 078f1bf70d..a452535927 100644 --- a/stable/testlink/templates/_helpers.tpl +++ b/stable/testlink/templates/_helpers.tpl @@ -21,4 +21,27 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this */}} {{- define "testlink.mariadb.fullname" -}} {{- printf "%s-%s" .Release.Name "mariadb" | trunc 63 | trimSuffix "-" -}} -{{- end -}} \ No newline at end of file +{{- end -}} + +{{/* +Return the proper Testlink image name +*/}} +{{- define "testlink.image" -}} +{{- $registryName := .Values.image.registry -}} +{{- $repositoryName := .Values.image.repository -}} +{{- $tag := .Values.image.tag | toString -}} +{{/* +Helm 2.11 supports the assignment of a value to a variable defined in a different scope, +but Helm 2.9 and 2.10 doesn't support it, so we need to implement this if-else logic. +Also, we can't use a single if because lazy evaluation is not an option +*/}} +{{- if .Values.global }} + {{- if .Values.global.imageRegistry }} + {{- printf "%s/%s:%s" .Values.global.imageRegistry $repositoryName $tag -}} + {{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} + {{- end -}} +{{- else -}} + {{- printf "%s/%s:%s" $registryName $repositoryName $tag -}} +{{- end -}} +{{- end -}} diff --git a/stable/testlink/templates/deployment.yaml b/stable/testlink/templates/deployment.yaml index d8646ec6d6..f99c04406f 100644 --- a/stable/testlink/templates/deployment.yaml +++ b/stable/testlink/templates/deployment.yaml @@ -32,7 +32,7 @@ spec: {{- end }} containers: - name: {{ template "fullname" . }} - image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}" + image: {{ template "testlink.image" . }} imagePullPolicy: {{ .Values.image.pullPolicy | quote }} env: - name: ALLOW_EMPTY_PASSWORD diff --git a/stable/testlink/values.yaml b/stable/testlink/values.yaml index 350ea40018..44050daa3f 100644 --- a/stable/testlink/values.yaml +++ b/stable/testlink/values.yaml @@ -1,3 +1,9 @@ +## Global Docker image registry +## Please, note that this will override the image registry for all the images, including dependencies, configured to use the global value +## +# global: +# imageRegistry: + ## Bitnami TestLink image version ## ref: https://hub.docker.com/r/bitnami/testlink/tags/ ## @@ -82,6 +88,8 @@ smtpConnectionMode: ## ## MariaDB chart configuration ## +## https://github.com/helm/charts/blob/master/stable/mariadb/values.yaml +## mariadb: ## Whether to deploy a mariadb server to satisfy the applications database requirements. To use an external database set this to false and configure the externalDatabase parameters enabled: true