---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: registry
  labels:
    app: registry
spec:
  selector:
    matchLabels:
      app: registry
  template:
    metadata:
      labels:
        app: registry
        "spiffe.io/spiffe-id": "true"
    spec:
      containers:
        - image: ghcr.io/networkservicemesh/ci/cmd-registry-memory:ab5399e
          env:
            - name: SPIFFE_ENDPOINT_SOCKET
              value: unix:///run/spire/sockets/agent.sock
            - name: REGISTRY_MEMORY_LISTEN_ON
              value: tcp://:5002
            - name: REGISTRY_MEMORY_LOG_LEVEL
              value: TRACE
            - name: REGISTRY_MEMORY_PROXY_REGISTRY_URL
              value: nsmgr-proxy:5004
          imagePullPolicy: IfNotPresent
          name: registry
          ports:
            - containerPort: 5002
              hostPort: 5002
          volumeMounts:
            - name: spire-agent-socket
              mountPath: /run/spire/sockets
          resources:
            requests:
              cpu: 100m
            limits:
              memory: 40Mi
              cpu: 200m
      volumes:
        - name: spire-agent-socket
          hostPath:
            path: /run/spire/sockets
            type: Directory
        - name: nsm-socket
          hostPath:
            path: /var/lib/networkservicemesh
            type: DirectoryOrCreate
