19 lines
524 B
YAML
19 lines
524 B
YAML
{{- range $service := .Values.services }}
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ include "exam.fullname" $ }}-{{ $service.name }}
|
|
labels:
|
|
app: {{ $service.name }}
|
|
{{- include "exam.labels" $ | nindent 4 }}
|
|
spec:
|
|
type: {{ default "ClusterIP" $service.type }}
|
|
ports:
|
|
- port: {{ $service.port }}
|
|
targetPort: {{ default $service.port $service.target }}
|
|
selector:
|
|
app: {{ $service.name }}
|
|
tier: {{ $service.tier }}
|
|
{{- include "exam.selectorLabels" $ | nindent 4 }}
|
|
{{- end }} |