Create separate service for streaming and input
LB cannot be created for a service with multiple protocols.
Change-Id: I7e10c9af20e87fda6eed1aa00ba632bb6d33391d
diff --git a/apps/person-detection-app/templates/service.yaml b/apps/person-detection-app/templates/service.yaml
index caba73e..3b37784 100644
--- a/apps/person-detection-app/templates/service.yaml
+++ b/apps/person-detection-app/templates/service.yaml
@@ -7,17 +7,27 @@
apiVersion: v1
kind: Service
metadata:
- name: {{ include "person-detection-app.fullname" . }}
+ name: {{ include "person-detection-app.fullname" . }}-streaming
labels:
{{- include "person-detection-app.labels" . | nindent 4 }}
spec:
- type: {{ .Values.service.type }}
+ type: {{ .Values.service.streaming.type }}
ports:
- - port: {{ .Values.service.port }}
- targetPort: http
+ - port: {{ .Values.service.streaming.port }}
protocol: TCP
- name: http
- - port: {{ .Values.service.port }}
+ selector:
+ {{- include "person-detection-app.selectorLabels" . | nindent 4 }}
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: {{ include "person-detection-app.fullname" . }}-input
+ labels:
+ {{- include "person-detection-app.labels" . | nindent 4 }}
+spec:
+ type: {{ .Values.service.input.type }}
+ ports:
+ - port: {{ .Values.service.input.port }}
protocol: UDP
selector:
{{- include "person-detection-app.selectorLabels" . | nindent 4 }}