apiVersion: v1
kind: Service
metadata:
  name: {{ template "distributed-tensorflow.fullname" . }}-worker
  labels:
    app: {{ template "distributed-tensorflow.name" . }}
    chart: {{ template "distributed-tensorflow.chart" . }}
    release: {{ .Release.Name }}
    heritage: {{ .Release.Service }}
spec:
  clusterIP: None
  ports:
  - port: {{ .Values.worker.port }}
    targetPort: {{ .Values.worker.port }}
    protocol: TCP
    name: worker
  selector:
    app: {{ template "distributed-tensorflow.name" . }}
    release: {{ .Release.Name }}
    role: worker
