{{- if and .Values.devEnv.enabled .Values.devEnv.aiAutomation.enabled }} {{- $fullname := include "sebastian.fullname" . }} {{- $aiApiService := printf "%s-ai-api" $fullname | trunc 63 | trimSuffix "-" }} {{- $aiWebService := printf "%s-ai-web" $fullname | trunc 63 | trimSuffix "-" }} --- apiVersion: v1 kind: Service metadata: name: {{ $aiApiService }} namespace: {{ .Values.devEnv.namespace }} labels: {{- include "sebastian.labels" . | nindent 4 }} app.kubernetes.io/component: ai-automation-api spec: type: {{ .Values.devEnv.aiAutomation.api.service.type }} ports: - port: {{ .Values.devEnv.aiAutomation.api.service.port }} targetPort: http protocol: TCP name: http - port: 5900 targetPort: 5900 protocol: TCP name: vnc selector: {{- include "sebastian.selectorLabels" . | nindent 4 }} app.kubernetes.io/component: ai-automation-api --- apiVersion: v1 kind: Service metadata: name: {{ $aiWebService }} namespace: {{ .Values.devEnv.namespace }} labels: {{- include "sebastian.labels" . | nindent 4 }} app.kubernetes.io/component: ai-automation-web spec: type: {{ .Values.devEnv.aiAutomation.web.service.type }} ports: - port: {{ .Values.devEnv.aiAutomation.web.service.port }} targetPort: http protocol: TCP name: http selector: {{- include "sebastian.selectorLabels" . | nindent 4 }} app.kubernetes.io/component: ai-automation-web {{- end }}