apiVersion: apps/v1
kind: Deployment
metadata:
  name: authms-deploy
  namespace: shoppingportal
spec:
  replicas: 1
  selector:
    matchLabels:
      zone: prod
      app: authms
  minReadySeconds: 10
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxUnavailable: 1
      maxSurge: 1
  template:
    metadata:
      labels:
        version: "1.0.0"
        release: stable
        tier: be
        zone: prod
        managed-by: m2
        app: authms     
    spec:
      containers:
        - name: authms-ctr
          image: metamagicglobal/authservice_k8
          imagePullPolicy: IfNotPresent
          ports:
          - containerPort: 8082          
          env:
          - name: MONO_HOST
            valueFrom:
              secretKeyRef: 
                name: mongosecret
                key: mongohost
          - name: MONO_PORT
            valueFrom:
              secretKeyRef: 
                name: mongosecret
                key: mongoport