mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/testlink] Allow use of external database (#4191)
* [stable/testlink] Allow use of external database * Update image tag * Define testlink.mariadb.fullname in _helpers.tpl
This commit is contained in:
committed by
k8s-ci-robot
parent
448d5b6cc5
commit
e6088669c2
@@ -1,5 +1,5 @@
|
||||
name: testlink
|
||||
version: 0.4.19
|
||||
version: 0.5.0
|
||||
appVersion: 1.9.16
|
||||
description: Web-based test management system that facilitates software quality assurance.
|
||||
icon: https://bitnami.com/assets/stacks/testlink/img/testlink-stack-220x234.png
|
||||
|
||||
@@ -58,6 +58,16 @@ The following tables lists the configurable parameters of the TestLink chart and
|
||||
| `smtpUser` | SMTP user | `nil` |
|
||||
| `smtpPassword` | SMTP password | `nil` |
|
||||
| `smtpConnectionMode` | SMTP connection mode [`ssl`, `tls`] | `nil` |
|
||||
| `allowEmptyPassword` | Allow DB blank passwords | `yes` |
|
||||
| `externalDatabase.host` | Host of the external database | `nil` |
|
||||
| `externalDatabase.port` | Port of the external database | `3306` |
|
||||
| `externalDatabase.user` | Existing username in the external db | `bn_testlink` |
|
||||
| `externalDatabase.password` | Password for the above username | `nil` |
|
||||
| `externalDatabase.database` | Name of the existing databse | `bitnami_testlink` |
|
||||
| `mariadb.enabled` | Wheter to use or not the mariadb chart | `true` |
|
||||
| `mariadb.mariadbDatabase` | Database name to create | `bitnami_testlink` |
|
||||
| `mariadb.mariadbUser` | Database user to create | `bn_testlink` |
|
||||
| `mariadb.mariadbPassword` | Password for the database | `nil` |
|
||||
| `mariadb.mariadbRootPassword` | MariaDB admin password | `nil` |
|
||||
| `serviceType` | Kubernetes Service type | `LoadBalancer` |
|
||||
| `persistence.enabled` | Enable persistence using PVC | `true` |
|
||||
|
||||
@@ -2,5 +2,5 @@ dependencies:
|
||||
- name: mariadb
|
||||
repository: https://kubernetes-charts.storage.googleapis.com/
|
||||
version: 0.7.0
|
||||
digest: sha256:e1af13ac4ac21f67582006f12d2b4eb78a1a2a59b34338fac850f2bec0b08b41
|
||||
generated: 2017-08-09T22:53:01.772059997-04:00
|
||||
digest: sha256:f59f68030aa5c50b9e776b813804875fac911f91c2aa384e991f37a795c5ae34
|
||||
generated: 2018-03-15T17:53:44.694131+01:00
|
||||
|
||||
@@ -2,3 +2,4 @@ dependencies:
|
||||
- name: mariadb
|
||||
version: 0.7.0
|
||||
repository: https://kubernetes-charts.storage.googleapis.com/
|
||||
condition: mariadb.enabled
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
{{- if or .Values.mariadb.enabled .Values.externalDatabase.host -}}
|
||||
1. Get the TestLink URL by running:
|
||||
|
||||
{{- if contains "NodePort" .Values.serviceType }}
|
||||
@@ -25,3 +25,19 @@
|
||||
|
||||
echo Username: {{ .Values.testlinkUsername }}
|
||||
echo Password: $(kubectl get secret --namespace {{ .Release.Namespace }} {{ template "fullname" . }} -o jsonpath="{.data.testlink-password}" | base64 --decode)
|
||||
|
||||
{{- else -}}
|
||||
|
||||
########################################################################################
|
||||
### ERROR: You did not provide an external database host in your 'helm install' call ###
|
||||
########################################################################################
|
||||
|
||||
This deployment will be incomplete until you configure TestLink with a resolvable database
|
||||
host. To configure TestLink to use and external database host:
|
||||
|
||||
|
||||
1. Complete your TestLink deployment by running:
|
||||
|
||||
helm upgrade {{ .Release.Name }} --set serviceType={{ .Values.serviceType }},mariadb.enabled=false,externalDatabase.host=YOUR_EXTERNAL_DATABASE_HOST stable/testlink
|
||||
|
||||
{{- end }}
|
||||
@@ -19,6 +19,6 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
|
||||
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 "mariadb.fullname" -}}
|
||||
{{- define "testlink.mariadb.fullname" -}}
|
||||
{{- printf "%s-%s" .Release.Name "mariadb" | trunc 63 | trimSuffix "-" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -19,15 +19,37 @@ spec:
|
||||
image: "{{ .Values.image }}"
|
||||
imagePullPolicy: {{ default "" .Values.imagePullPolicy | quote }}
|
||||
env:
|
||||
- name: ALLOW_EMPTY_PASSWORD
|
||||
value: {{ .Values.allowEmptyPassword | quote }}
|
||||
{{- if .Values.mariadb.enabled }}
|
||||
- name: MARIADB_HOST
|
||||
value: {{ template "mariadb.fullname" . }}
|
||||
value: {{ template "testlink.mariadb.fullname" . }}
|
||||
- name: MARIADB_PORT_NUMBER
|
||||
value: "3306"
|
||||
- name: MARIADB_PASSWORD
|
||||
- name: TESTLINK_DATABASE_NAME
|
||||
value: {{ .Values.mariadb.mariadbDatabase | quote }}
|
||||
- name: TESTLINK_DATABASE_USER
|
||||
value: {{ .Values.mariadb.mariadbUser | quote }}
|
||||
- name: TESTLINK_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ template "mariadb.fullname" . }}
|
||||
key: mariadb-root-password
|
||||
name: {{ template "testlink.mariadb.fullname" . }}
|
||||
key: mariadb-password
|
||||
{{- else }}
|
||||
- name: MARIADB_HOST
|
||||
value: {{ .Values.externalDatabase.host | quote }}
|
||||
- name: MARIADB_PORT_NUMBER
|
||||
value: {{ .Values.externalDatabase.port | quote }}
|
||||
- name: TESTLINK_DATABASE_NAME
|
||||
value: {{ .Values.externalDatabase.database | quote }}
|
||||
- name: TESTLINK_DATABASE_USER
|
||||
value: {{ .Values.externalDatabase.user | quote }}
|
||||
- name: TESTLINK_DATABASE_PASSWORD
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: {{ printf "%s-%s" .Release.Name "externaldb" }}
|
||||
key: db-password
|
||||
{{- end }}
|
||||
- name: TESTLINK_USERNAME
|
||||
value: {{ default "" .Values.testlinkUsername | quote }}
|
||||
- name: TESTLINK_PASSWORD
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{{- if not .Values.mariadb.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ printf "%s-%s" .Release.Name "externaldb" }}
|
||||
labels:
|
||||
app: {{ printf "%s-%s" .Release.Name "externaldb" }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
type: Opaque
|
||||
data:
|
||||
db-password: {{ default "" .Values.externalDatabase.password | b64enc | quote }}
|
||||
{{- end }}
|
||||
@@ -1,7 +1,7 @@
|
||||
## Bitnami TestLink image version
|
||||
## ref: https://hub.docker.com/r/bitnami/testlink/tags/
|
||||
##
|
||||
image: bitnami/testlink:1.9.16-r10
|
||||
image: bitnami/testlink:1.9.16-r11
|
||||
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
@@ -30,6 +30,29 @@ testlinkEmail: user@example.com
|
||||
##
|
||||
testlinkLanguage: en_US
|
||||
|
||||
## Set to `yes` to allow the container to be started with blank passwords
|
||||
## ref: https://github.com/bitnami/bitnami-docker-testlink#environment-variables
|
||||
allowEmptyPassword: "yes"
|
||||
|
||||
##
|
||||
## External database configuration
|
||||
##
|
||||
externalDatabase:
|
||||
## Database host
|
||||
host:
|
||||
|
||||
## Database host
|
||||
port: 3306
|
||||
|
||||
## Database user
|
||||
user: bn_testlink
|
||||
|
||||
## Database password
|
||||
password:
|
||||
|
||||
## Database name
|
||||
database: bitnami_testlink
|
||||
|
||||
## SMTP mail delivery configuration
|
||||
## ref: https://github.com/bitnami/bitnami-docker-testlink#smtp-configuration
|
||||
##
|
||||
@@ -44,6 +67,24 @@ smtpConnectionMode:
|
||||
## MariaDB chart configuration
|
||||
##
|
||||
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
|
||||
|
||||
## Create a database
|
||||
## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#creating-a-database-on-first-run
|
||||
##
|
||||
mariadbDatabase: bitnami_testlink
|
||||
|
||||
## Create a database user
|
||||
## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#creating-a-database-user-on-first-run
|
||||
##
|
||||
mariadbUser: bn_testlink
|
||||
|
||||
## Password for mariadbUser
|
||||
## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#creating-a-database-user-on-first-run
|
||||
##
|
||||
# mariadbPassword:
|
||||
|
||||
## MariaDB admin password
|
||||
## ref: https://github.com/bitnami/bitnami-docker-mariadb/blob/master/README.md#setting-the-root-password-on-first-run
|
||||
##
|
||||
|
||||
Reference in New Issue
Block a user