You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.1 KiB

  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4. name: {{ template "wiki.fullname" . }}
  5. labels:
  6. app: {{ template "wiki.name" . }}
  7. chart: {{ template "wiki.chart" . }}
  8. release: {{ .Release.Name | quote }}
  9. heritage: {{ .Release.Service | quote }}
  10. spec:
  11. type: {{ .Values.service.type }}
  12. {{- if .Values.service.loadBalancerIP }}
  13. loadBalancerIP: {{ .Values.service.loadBalancerIP }}
  14. {{- end }}
  15. {{- if (or (eq .Values.service.type "LoadBalancer") (eq .Values.service.type "NodePort")) }}
  16. externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy | quote }}
  17. {{- end }}
  18. ports:
  19. - name: http
  20. port: {{ .Values.service.port }}
  21. targetPort: http
  22. {{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePorts.http)))}}
  23. nodePort: {{ .Values.service.nodePorts.http }}
  24. {{- end }}
  25. - name: https
  26. port: {{ .Values.service.httpsPort }}
  27. targetPort: https
  28. {{- if (and (eq .Values.service.type "NodePort") (not (empty .Values.service.nodePorts.https)))}}
  29. nodePort: {{ .Values.service.nodePorts.https }}
  30. {{- end }}
  31. selector:
  32. app: {{ template "wiki.name" . }}