mirror of
https://github.com/furyhawk/cloudy.git
synced 2026-05-20 23:21:07 +00:00
22 lines
597 B
YAML
22 lines
597 B
YAML
{{- if eq (include "base.controller.kind" . ) "StatefulSet" -}}
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ include "code-server.fullname" . }}-headless
|
|
labels:
|
|
{{- include "code-server.labels" . | nindent 4 }}
|
|
spec:
|
|
clusterIP: None
|
|
ports:
|
|
{{- range $key, $val := .Values.ports }}
|
|
{{- if $val.enabled }}
|
|
- name: {{ $key | quote }}
|
|
port: {{ $val.port }}
|
|
targetPort: {{ $key | quote }}
|
|
protocol: {{ default "TCP" $val.protocol | quote }}
|
|
{{- end }}
|
|
{{- end }}
|
|
selector:
|
|
{{- include "code-server.selectorLabels" . | nindent 4 }}
|
|
{{- end }}
|