Merge pull request #2867 from jiangytcn/helm

fix: k8s templates update for helm
This commit is contained in:
Lauri Ojansivu 2020-01-02 14:02:43 +02:00 committed by GitHub
commit ac43b4c1e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -1,5 +1,5 @@
dependencies: dependencies:
- name: mongodb-replicaset - name: mongodb-replicaset
version: 3.6.x version: 3.11.x
repository: "https://kubernetes-charts.storage.googleapis.com/" repository: "https://kubernetes-charts.storage.googleapis.com/"
condition: mongodb-replicaset.enabled condition: mongodb-replicaset.enabled

View file

@ -75,7 +75,7 @@ else use user-provided URL.
{{- if (index .Values "mongodb-replicaset" "enabled") -}} {{- if (index .Values "mongodb-replicaset" "enabled") -}}
{{- $count := (int (index .Values "mongodb-replicaset" "replicas")) -}} {{- $count := (int (index .Values "mongodb-replicaset" "replicas")) -}}
{{- $release := .Release.Name -}} {{- $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 -}} {{- else -}}
{{- index .Values "mongodb-replicaset" "url" -}} {{- index .Values "mongodb-replicaset" "url" -}}
{{- end -}} {{- end -}}

View file

@ -35,6 +35,6 @@ spec:
- path: {{ $ingressPath }} - path: {{ $ingressPath }}
backend: backend:
serviceName: {{ $fullName }} serviceName: {{ $fullName }}
servicePort: http servicePort: 80
{{- end }} {{- end }}
{{- end }} {{- end }}