mirror of
https://github.com/helm/charts.git
synced 2026-08-23 22:37:45 +00:00
[stable/testlink] Add service.type to values.yaml (#9441)
* [stable/testlink] Add service.type to values.yaml Signed-off-by: Javier J. Salmeron Garcia <jsalmeron@bitnami.com> * Fix LoadBalancerIP Signed-off-by: Javier J. Salmeron Garcia <jsalmeron@bitnami.com>
This commit is contained in:
committed by
k8s-ci-robot
parent
0c0c3104de
commit
742742a01f
@@ -1,5 +1,5 @@
|
||||
name: testlink
|
||||
version: 3.2.0
|
||||
version: 4.0.0
|
||||
appVersion: 1.9.18
|
||||
description: Web-based test management system that facilitates software quality assurance.
|
||||
icon: https://bitnami.com/assets/stacks/testlink/img/testlink-stack-220x234.png
|
||||
|
||||
@@ -75,7 +75,13 @@ The following table lists the configurable parameters of the TestLink chart and
|
||||
| `mariadb.db.user` | Database user to create | `bn_testlink` |
|
||||
| `mariadb.db.password` | Password for the database | `nil` |
|
||||
| `mariadb.rootUser.password` | MariaDB admin password | `nil` |
|
||||
| `serviceType` | Kubernetes Service type | `LoadBalancer` |
|
||||
| `service.type` | Kubernetes Service type | `LoadBalancer` |
|
||||
| `service.port` | Service HTTP port | `80` |
|
||||
| `service.httpsPort` | Service HTTPS port | `443` |
|
||||
| `service.nodePorts.http` | Kubernetes http node port | `""` |
|
||||
| `service.nodePorts.https` | Kubernetes https node port | `""` |
|
||||
| `service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` |
|
||||
| `service.loadBalancerIP` | LoadBalancer service IP address | `""` |
|
||||
| `persistence.enabled` | Enable persistence using PVC | `true` |
|
||||
| `persistence.apache.storageClass` | PVC Storage Class for Apache volume | `nil` (uses alpha storage class annotation) |
|
||||
| `persistence.apache.accessMode` | PVC Access Mode for Apache volume | `ReadWriteOnce` |
|
||||
|
||||
@@ -1,24 +1,25 @@
|
||||
{{- if or .Values.mariadb.enabled .Values.externalDatabase.host -}}
|
||||
1. Get the TestLink URL by running:
|
||||
|
||||
{{- if contains "NodePort" .Values.serviceType }}
|
||||
{{- if contains "NodePort" .Values.service.type }}
|
||||
|
||||
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "fullname" . }})
|
||||
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||
echo "TestLink URL: http://$NODE_IP:$NODE_PORT/"
|
||||
|
||||
{{- else if contains "LoadBalancer" .Values.serviceType }}
|
||||
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||
|
||||
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||
Watch the status with: 'kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "fullname" . }}'
|
||||
|
||||
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||
echo "TestLink URL: http://$SERVICE_IP/"
|
||||
{{- $port:=.Values.service.port | toString }}
|
||||
echo "TestLink URL: http://$SERVICE_IP{{- if ne $port "80" }}:{{ .Values.service.port }}{{ end }}/"
|
||||
|
||||
{{- else if contains "ClusterIP" .Values.serviceType }}
|
||||
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||
|
||||
echo "TestLink URL: http://127.0.0.1:8080/"
|
||||
kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "fullname" . }} 8080:80
|
||||
kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "fullname" . }} 8080:{{ .Values.service.port }}
|
||||
|
||||
{{- end }}
|
||||
|
||||
@@ -39,6 +40,6 @@ 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
|
||||
helm upgrade {{ .Release.Name }} --set service.type={{ .Values.service.type }},mariadb.enabled=false,externalDatabase.host=YOUR_EXTERNAL_DATABASE_HOST stable/testlink
|
||||
|
||||
{{- end }}
|
||||
|
||||
@@ -8,13 +8,25 @@ metadata:
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
spec:
|
||||
type: {{ .Values.serviceType }}
|
||||
type: {{ .Values.service.type }}
|
||||
{{- if (or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort")) }}
|
||||
externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }}
|
||||
{{- end }}
|
||||
{{- if (and (eq .Values.service.type "LoadBalancer") (not (empty .Values.service.loadBalancerIP))) }}
|
||||
loadBalancerIP: {{ .Values.service.loadBalancerIP }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
targetPort: http
|
||||
- name: https
|
||||
port: 443
|
||||
targetPort: https
|
||||
- name: http
|
||||
port: {{ .Values.service.port }}
|
||||
targetPort: http
|
||||
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePorts.http)))}}
|
||||
nodePort: {{ .Values.service.nodePorts.http }}
|
||||
{{- end }}
|
||||
- name: https
|
||||
port: {{ .Values.service.httpsPort }}
|
||||
targetPort: https
|
||||
{{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePorts.https)))}}
|
||||
nodePort: {{ .Values.service.nodePorts.https }}
|
||||
{{- end }}
|
||||
selector:
|
||||
app: {{ template "fullname" . }}
|
||||
|
||||
@@ -133,7 +133,24 @@ mariadb:
|
||||
## Kubernetes configuration
|
||||
## For minikube, set this to NodePort, elsewhere use LoadBalancer
|
||||
##
|
||||
serviceType: LoadBalancer
|
||||
service:
|
||||
type: LoadBalancer
|
||||
# HTTP Port
|
||||
port: 80
|
||||
# HTTPS Port
|
||||
httpsPort: 443
|
||||
##
|
||||
## loadBalancerIP:
|
||||
## nodePorts:
|
||||
## http: <to set explicitly, choose port between 30000-32767>
|
||||
## https: <to set explicitly, choose port between 30000-32767>
|
||||
nodePorts:
|
||||
http: ""
|
||||
https: ""
|
||||
## Enable client source IP preservation
|
||||
## ref http://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/#preserving-the-client-source-ip
|
||||
##
|
||||
externalTrafficPolicy: Cluster
|
||||
|
||||
## Enable persistence using Persistent Volume Claims
|
||||
## ref: http://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||
|
||||
Reference in New Issue
Block a user