apiVersion: apps/v1
kind: Deployment
metadata:
  name: users-deployment
  namespace: kube-green
  labels:
    app: users
    purpose: kube-green-containers
  annotations:
    version: 'latest'
spec:
  selector:
    matchLabels:
      app: users
  template:
    spec:
      containers:
        - volumeMounts:
            - mountPath: /opt/mw/mount
              name: users
          name: users
          ports:
            - containerPort: 8080
              protocol: TCP
              name: kube-port
          imagePullPolicy: IfNotPresent
          image: navikco/users:latest
          resources:
            requests:
              memory: "150Mi"
              cpu: "250m"
            limits:
              memory: "500Mi"
              cpu: "1"
          args: ["green", "users", "10.70.245.142", "30333"]
          volumeMounts:
            - mountPath: "/opt/mw/mount"
              name: kube-mount
      volumes:
        - name: kube-mount
          persistentVolumeClaim:
            claimName: kube-green-nfs
      dnsConfig:
        nameservers:
          - "172.1.1.22"
          - "10.1.1.22"
        searches:
          - "lab.kubeland.net"
      restartPolicy: Always
    metadata:
      labels:
        app: users
  replicas: 1