apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: emailserver-deployment
spec:
  replicas: 1
  revisionHistoryLimit: 1
  strategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: emailserver
    spec:
      containers:
      - name: emailserver-container
        image: localhost:5000/emailserver:VERSION
        ports:
        - containerPort: 80
        - containerPort: 1000
        livenessProbe:
          httpGet:
            path: /health
            port: 80
        readinessProbe:
          httpGet:
            path: /health
            port: 80
        env:
        - name: DEPLOY
          value: VERSION
        - name: MANDRILL_API_KEY
          value: S3CrEtApIkEy
        - name: ENV
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
