softplayer-helm-lib/charts/testing/templates/service/_service.tpl
2024-05-05 18:51:37 +02:00

26 lines
763 B
Smarty

{{- define "lib.service" }}
---
# ---------------------------------------------------------------------
# This service is created as a part of badhouseplants 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 }}