apiVersion: apps/v1
kind: Deployment
metadata:
  name: zygo-api
  namespace: zyfra
  labels:
    app: zygo
spec:
  replicas: 2
  selector:
    matchLabels:
      app: zygo
  template:
    metadata:
      labels:
        app: zygo
    spec:
      containers:
      - name: zygo
        image: senthilsweb/zygo:latest
        env:
          - name: NODE_NAME
            valueFrom:
              fieldRef:
                fieldPath: status.podIP
          - name: REDIS_URI
            valueFrom:
              secretKeyRef:
                name: zyfra-secret-config
                key: redis_uri
          - name: SLACK_TOKEN
            valueFrom:
              secretKeyRef:
                name: zyfra-secret-config
                key: slack_token
          - name: SLACK_CHANNEL
            valueFrom:
              secretKeyRef:
                name: zyfra-secret-config
                key: slack_channel
        ports:
        - containerPort: 3000

