---
apiVersion: apps/v1
kind: Deployment
spec:
  selector:
    matchLabels:
      app: connect
  replicas: 1
  template:
    metadata:
      labels:
        app: connect
    spec:
      containers:
        - image: docker.io/sbezverk/connect:0.0.0
          name: connect
          imagePullPolicy: Always
          args:
            - --svc-id
            - "service-1_1"
          resources:
            limits:
              dedi.io/service-1_1: 1
          env:
            - name: POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
          volumeMounts:
            - name: socket
              mountPath: /var/lib/dispatch
      volumes:
        - hostPath:
            path: /var/lib/dispatch
            type: DirectoryOrCreate
          name: socket
metadata:
  name: connect
  namespace: default
