apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
  name: daffodil-deployment
spec:
  selector:
    matchLabels:
      app: daffodil
  replicas: 3 # tells deployment to run 2 pods matching the template
  template:
    metadata:
      labels:
        app: daffodil
    spec:
      containers:
      - name: daffodil
        image: tpaschalis/daffodil:0.0.5
        ports:
        - containerPort: 8080
        env:
        - name: "DAFFODIL_NODEID_MODE"
          value: "PRIVATEIP"
        resources:
          limits:
            cpu: 500m
            memory: 512Mi
          requests:
            cpu: 20m
            memory: 32Mi
      dnsPolicy: ClusterFirst
      restartPolicy: Always
