{{- if and .Values.devEnv.enabled .Values.devEnv.codeServer.enabled }} {{- $fullname := include "sebastian.fullname" . }} {{- $serviceName := printf "%s-code-server" $fullname | trunc 63 | trimSuffix "-" }} apiVersion: v1 kind: Service metadata: name: {{ $serviceName }} namespace: {{ .Values.devEnv.namespace }} labels: {{- include "sebastian.labels" . | nindent 4 }} app.kubernetes.io/component: code-server spec: type: {{ .Values.devEnv.codeServer.service.type }} ports: - port: {{ .Values.devEnv.codeServer.service.port }} targetPort: http protocol: TCP name: http - port: 3000 targetPort: alga-http protocol: TCP name: alga-http selector: {{- include "sebastian.selectorLabels" . | nindent 4 }} app.kubernetes.io/component: code-server {{- end }}