From 84bca187441cbf3f54a871e5135d0d854e283ac4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20J=2E=20Salmer=C3=B3n-Garc=C3=ADa?= Date: Tue, 20 Nov 2018 17:37:33 +0100 Subject: [PATCH] [stable/dokuwiki] Add service.port in values.yaml (#9394) * [stable/dokuwiki] Add service.port in values.yaml Signed-off-by: Javier J. Salmeron Garcia * Update readme Signed-off-by: Javier J. Salmeron Garcia * Fix readme Signed-off-by: Javier J. Salmeron Garcia * Remove - in template Signed-off-by: Javier J. Salmeron Garcia --- stable/dokuwiki/Chart.yaml | 2 +- stable/dokuwiki/README.md | 5 ++++- stable/dokuwiki/templates/NOTES.txt | 6 ++++-- stable/dokuwiki/templates/svc.yaml | 4 ++-- stable/dokuwiki/values.yaml | 4 ++++ 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/stable/dokuwiki/Chart.yaml b/stable/dokuwiki/Chart.yaml index fdca1b2d5c..fba2585aa1 100644 --- a/stable/dokuwiki/Chart.yaml +++ b/stable/dokuwiki/Chart.yaml @@ -1,5 +1,5 @@ name: dokuwiki -version: 3.3.1 +version: 4.0.0 appVersion: 0.20180422.201805030840 description: DokuWiki is a standards-compliant, simple to use wiki optimized for creating documentation. It is targeted at developer teams, workgroups, and small companies. diff --git a/stable/dokuwiki/README.md b/stable/dokuwiki/README.md index 5bdfa164c0..1a5587f157 100644 --- a/stable/dokuwiki/README.md +++ b/stable/dokuwiki/README.md @@ -58,7 +58,10 @@ The following table lists the configurable parameters of the DokuWiki chart and | `dokuwikiPassword` | Application password | _random 10 character alphanumeric string_ | | `dokuwikiEmail` | User email | `user@example.com` | | `dokuwikiWikiName` | Wiki name | `My Wiki` | -| `service.loadBalancer` | Kubernetes LoadBalancerIP to request | `nil` | +| `service.type` | Kubernetes Service type | `LoadBalancer` | +| `service.port` | Service HTTP port | `80` | +| `service.httpsPort` | Service HTTPS port | `443` | +| `service.loadBalancerIP` | Kubernetes LoadBalancerIP to request | `nil` | | `service.externalTrafficPolicy` | Enable client source IP preservation | `Cluster` | | `service.nodePorts.http` | Kubernetes http node port | `""` | | `service.nodePorts.https` | Kubernetes https node port | `""` | diff --git a/stable/dokuwiki/templates/NOTES.txt b/stable/dokuwiki/templates/NOTES.txt index 6b41468fe7..24b8e605b5 100644 --- a/stable/dokuwiki/templates/NOTES.txt +++ b/stable/dokuwiki/templates/NOTES.txt @@ -26,12 +26,14 @@ ** Watch the status using: kubectl get svc --namespace {{ .Release.Namespace }} -w {{ template "dokuwiki.fullname" . }} ** export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "dokuwiki.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") - echo "URL: http://$SERVICE_IP/" + +{{- $port:=.Values.service.port | toString }} + echo "URL: http://$SERVICE_IP{{- if ne $port "80" }}:{{ .Values.service.port }}{{ end }}/" {{- else if contains "ClusterIP" .Values.service.type }} echo "URL: http://127.0.0.1:8080/" - kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "dokuwiki.fullname" . }} 8080:80 + kubectl port-forward --namespace {{ .Release.Namespace }} svc/{{ template "dokuwiki.fullname" . }} 8080:{{ .Values.service.port }} {{- end }} {{- end }} diff --git a/stable/dokuwiki/templates/svc.yaml b/stable/dokuwiki/templates/svc.yaml index b50c263645..bfad4323d4 100644 --- a/stable/dokuwiki/templates/svc.yaml +++ b/stable/dokuwiki/templates/svc.yaml @@ -17,13 +17,13 @@ spec: {{- end }} ports: - name: http - port: 80 + 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: 443 + port: {{ .Values.service.httpsPort }} targetPort: https {{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePorts.https)))}} nodePort: {{ .Values.service.nodePorts.https }} diff --git a/stable/dokuwiki/values.yaml b/stable/dokuwiki/values.yaml index 6bca1e2169..c1ce46d56c 100644 --- a/stable/dokuwiki/values.yaml +++ b/stable/dokuwiki/values.yaml @@ -59,6 +59,10 @@ service: ## otherwise leave blank ## # loadBalancerIP: + # HTTP Port + port: 80 + # HTTPS Port + httpsPort: 443 ## Use nodePorts to requets some specific ports when usin NodePort ## nodePorts: ## http: