26 lines
759 B
Smarty
26 lines
759 B
Smarty
{{- define "lib.service" }}
|
|
---
|
|
# ---------------------------------------------------------------------
|
|
# This service is created as a part of softplayer helm library
|
|
# please see /lib/tempaltes/service/_service.tpl
|
|
# ---------------------------------------------------------------------
|
|
apiVersion: v1
|
|
kind: Service
|
|
{{- include "lib.metadata" (dict "Context" . "customName" "")}}
|
|
spec:
|
|
{{- if (.Values.service).type }}
|
|
type: {{ .Values.service.type }}
|
|
{{- else }}
|
|
type: ClusterIP
|
|
{{- end }}
|
|
selector:
|
|
{{ include "metadata.selectorLabels" . | indent 4}}
|
|
ports:
|
|
{{- range $k,$v := .Values.service.ports }}
|
|
- name: {{ $k }}
|
|
port: {{ $v.port }}
|
|
targetPort: {{ $v.targetPort}}
|
|
protocol: {{ $v.protocol}}
|
|
{{- end }}
|
|
{{- end }}
|