apiVersion: apps/v1
kind: Deployment
metadata:
  name: cell-gateway-deployment
  labels:
    app: cell-gateway
spec:
  replicas: 1
  selector:
    matchLabels:
      app: cell-gateway
  template:
    metadata:
      labels:
        app: cell-gateway
    spec:
      containers:
      - name: cell-gateway
        image: nipunaprashan/microgateway
        volumeMounts:
        - name: targetdir
          mountPath: /target
      initContainers:
      - name: initialize-cell-gateway
        image: nipunaprashan/microgateway_init
        args: ["cell", "cell", "admin", "admin", "https://apim-service/", "lib/platform/bre/security/ballerinaTruststore.p12", "ballerina"]
        volumeMounts:
        - name: targetdir
          mountPath: "/target"
      volumes:
      - name: targetdir
        emptyDir: {}  
