apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    io.kompose.service: cardano-submit-api
  name: cardano-submit-api
spec:
  replicas: 1
  selector:
    matchLabels:
      io.kompose.service: cardano-submit-api
  template:
    metadata:
      labels:
        io.kompose.service: cardano-submit-api
    spec:
      containers:
      - name: cardano-submit-api
        env:
        - name: NETWORK
          value: mainnet
        image: inputoutput/cardano-submit-api:3.1.2
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 8090
        resources: {}
        volumeMounts:
        - mountPath: /node-ipc
          name: node-ipc
      - name: socat-socket-server
        image: alpine/socat
        env:
        - name: CARDANO_NODE_SOCKET_TCP_HOST
          value: "cardano-node-headless"
        - name: CARDANO_NODE_SOCKET_TCP_PORT
          value: "30000"
        command: ["sh", "-c", "rm -f /ipc/node.socket; socat UNIX-LISTEN:/ipc/node.socket,fork TCP:${CARDANO_NODE_SOCKET_TCP_HOST}:${CARDANO_NODE_SOCKET_TCP_PORT},ignoreeof"]
        volumeMounts:
        - mountPath: /ipc
          name: node-ipc
      restartPolicy: Always
      serviceAccountName: ""
      volumes:
      - name: node-ipc
        emptyDir: {}
