apiVersion: apps/v1
kind: Deployment
metadata:
  name: chat-gateway
  labels:
    app: chat-gateway
spec:
  replicas: 1
  selector:
    matchLabels:
      app: chat-gateway
  template:
    metadata:
      labels:
        app: chat-gateway
    spec:
      containers:
        - name: chat-gateway-container
          image: mikiapp.azurecr.io/node-chat-gateway:$(tag)
          resources:
            limits:
              memory: "128Mi"
              cpu: "500m"
          ports:
            - containerPort: 1234
          volumeMounts:
            - name: secret
              mountPath: "/app/config"
              readOnly: true
      volumes:
        - name: secret
          secret:
            secretName: chat-gateway-secret
            defaultMode: 0400
      imagePullSecrets:
        - name: mikiapp
