apiVersion: apps/v1
kind: Deployment
metadata:
  name: captureorder
spec:
  selector:
    matchLabels:
      app: captureorder
  template:
    metadata:
      labels:
        app: captureorder
    spec:
      containers:
      - name: captureorder
        image: azch/captureorder
        resources:
          limits:
            memory: "256Mi"
            cpu: "250m"
        readinessProbe:
            httpGet:
                port: 8080
                path: /healthz
        livenessProbe:
            httpGet:
                port: 8080
                path: /healthz        
        env:
            - name: MONGOHOST
              valueFrom:
                secretKeyRef:
                    name: mongodb
                    key: mongoHost
            - name: MONGOUSER
              valueFrom:
                secretKeyRef:
                    name: mongodb
                    key: mongoUser
            - name: MONGOPASSWORD
              valueFrom:
                secretKeyRef:
                    name: mongodb
                    key: mongoPassword
        ports:
        - containerPort: 8080
