# https://github.com/pytorch/serve/blob/master/kubernetes/Helm/templates/torchserve.yaml

kind: Service
apiVersion: v1
metadata:
  name: torchserve-service
  namespace: hm-cnn
  labels:
    app: torchserve
  annotations:
    prometheus.io/scrape: 'true'
    prometheus.io/port: '8082'
spec:
  type: ClusterIP
  selector:
    app: torchserve
  ports:
    - name: inference
      protocol: TCP
      targetPort: inference
      port: 8080
    - name: inference-grpc
      protocol: TCP
      targetPort: inference-grpc
      port: 7070
    - name: management
      protocol: TCP
      targetPort: management
      port: 8081
    - name: management-grpc
      protocol: TCP
      targetPort: management-grpc
      port: 7071
    - name: metrics
      protocol: TCP
      targetPort: metrics
      port: 8082
