[stable/redmine] Add service.port to values.yaml (#9437)

Signed-off-by: Javier J. Salmeron Garcia <jsalmeron@bitnami.com>
This commit is contained in:
Javier J. Salmerón-García
2018-11-21 04:03:25 -08:00
committed by k8s-ci-robot
parent 742742a01f
commit bec2c38901
5 changed files with 48 additions and 20 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
name: redmine
version: 6.0.2
version: 7.0.0
appVersion: 3.4.6
description: A flexible project management web application.
keywords:
+6 -2
View File
@@ -77,8 +77,12 @@ The following table lists the configurable parameters of the Redmine chart and t
| `databaseType.mariadb` | Select mariadb database | `true` |
| `mariadb.rootUser.password` | MariaDB admin password | `nil` |
| `postgresql.postgresqlPassword` | PostgreSQL admin password | `nil` |
| `serviceType` | Kubernetes Service type | `LoadBalancer` |
| `serviceLoadBalancerSourceRanges` | An array of load balancer sources | `0.0.0.0/0` |
| `service.type` | Kubernetes Service type | `LoadBalancer` |
| `service.port` | Service HTTP port | `80` |
| `service.nodePorts.http` | Kubernetes http node port | `""` |
| `service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` |
| `service.loadBalancerIP` | LoadBalancer service IP address | `""` |
| `service.loadBalancerSourceRanges` | An array of load balancer sources | `0.0.0.0/0` |
| `ingress.enabled` | Enable or disable the ingress | `false` |
| `ingress.hosts[0].name` | Hostname to your Redmine installation | `redmine.local ` |
| `ingress.hosts[0].path` | Path within the url structure | `/` |
+8 -6
View File
@@ -1,19 +1,21 @@
1. Get the Redmine URL:
{{- 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 "redmine.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo "Redmine 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 "redmine.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "redmine.fullname" . }} --template "{{ "{{ range (index .status.loadBalancer.ingress 0) }}{{ . }}{{ end }}" }}")
echo "Redmine URL: http://$SERVICE_IP/"
{{- $port:=.Values.service.port | toString }}
echo "Redmine URL: http://$SERVICE_IP{{- if ne $port "80" }}:{{ .Values.service.port }}{{ end }}/"
{{- else if .Values.ingress.enabled }}
@@ -21,10 +23,10 @@
echo "Redmine URL: http://{{ .name }}/"
{{- end }}
{{- else if contains "ClusterIP" .Values.serviceType }}
{{- else if contains "ClusterIP" .Values.service.type }}
echo "Redmine URL: http://127.0.0.1:3000/"
kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "redmine.fullname" . }} 3000:3000
echo "Redmine URL: http://127.0.0.1:{{ .Values.service.port }}/"
kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "redmine.fullname" . }} 3000:{{ .Values.service.port }}
{{- end }}
+16 -7
View File
@@ -8,13 +8,22 @@ 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 eq .Values.service.type "LoadBalancer" }}
loadBalancerSourceRanges: {{ .Values.service.loadBalancerSourceRanges }}
{{ 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: 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 }}
selector:
app: {{ template "redmine.fullname" . }}
{{ if eq .Values.serviceType "LoadBalancer" }}
loadBalancerSourceRanges: {{ .Values.serviceLoadBalancerSourceRanges }}
{{ end }}
+17 -4
View File
@@ -148,10 +148,23 @@ postgresql:
## ingress: ClusterIP
## elsewhere: LoadBalancer
##
serviceType: LoadBalancer
## Control hosts connecting to "LoadBalancer" only
serviceLoadBalancerSourceRanges:
- 0.0.0.0/0
service:
type: LoadBalancer
# HTTP Port
port: 80
## loadBalancerIP:
## Control hosts connecting to "LoadBalancer" only
loadBalancerSourceRanges:
- 0.0.0.0/0
##
## nodePorts:
## http: <to set explicitly, choose port between 30000-32767>
nodePorts:
http: ""
## 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
## Configure the ingress resource that allows you to access the
## Redmine installation. Set up the URL