From 5aeb88ee6cd2244d093ab42428d75940381132e9 Mon Sep 17 00:00:00 2001 From: Jiang Yitao Date: Tue, 31 Dec 2019 13:17:14 +0800 Subject: fix: k8s templates update for helm Why: This change addresses the need by: 1. upgrade mongo replica version 2. access mongo via service url 3. change the expose servicePort to numeric Signed-off-by: Jiang Yitao --- helm/wekan/requirements.yaml | 2 +- helm/wekan/templates/_helpers.tpl | 2 +- helm/wekan/templates/ingress.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'helm') diff --git a/helm/wekan/requirements.yaml b/helm/wekan/requirements.yaml index e2492a91..d19fc638 100644 --- a/helm/wekan/requirements.yaml +++ b/helm/wekan/requirements.yaml @@ -1,5 +1,5 @@ dependencies: - name: mongodb-replicaset - version: 3.6.x + version: 3.11.x repository: "https://kubernetes-charts.storage.googleapis.com/" condition: mongodb-replicaset.enabled diff --git a/helm/wekan/templates/_helpers.tpl b/helm/wekan/templates/_helpers.tpl index 68f71ef7..7f333301 100644 --- a/helm/wekan/templates/_helpers.tpl +++ b/helm/wekan/templates/_helpers.tpl @@ -75,7 +75,7 @@ else use user-provided URL. {{- if (index .Values "mongodb-replicaset" "enabled") -}} {{- $count := (int (index .Values "mongodb-replicaset" "replicas")) -}} {{- $release := .Release.Name -}} -mongodb://{{- range $v := until $count }}{{ $release }}-mongodb-replicaset-{{ $v }}.{{ $release }}-mongodb-replicaset:27017{{ if ne $v (sub $count 1) }},{{- end -}}{{- end -}}?replicaSet={{ index .Values "mongodb-replicaset" "replicaSetName" }} +mongodb://{{ $release }}-mongodb-replicaset:27017/admin?replicaSet={{ index .Values "mongodb-replicaset" "replicaSetName" }} {{- else -}} {{- index .Values "mongodb-replicaset" "url" -}} {{- end -}} diff --git a/helm/wekan/templates/ingress.yaml b/helm/wekan/templates/ingress.yaml index d63c21c3..dd85ef55 100644 --- a/helm/wekan/templates/ingress.yaml +++ b/helm/wekan/templates/ingress.yaml @@ -35,6 +35,6 @@ spec: - path: {{ $ingressPath }} backend: serviceName: {{ $fullName }} - servicePort: http + servicePort: 80 {{- end }} {{- end }} -- cgit v1.2.3-1-g7c22