apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: data
  name: etcd-operator
  labels:
    name: etcd-operator
    namespace: data
spec:
  replicas: 1
  revisionHistoryLimit: 1
  strategy:
    rollingUpdate:
      maxUnavailable: 1
      maxSurge: 1
  selector:
    matchLabels:
      app: etcd-operator
  template:
    metadata:
      labels:
        app: etcd-operator
        name: etcd-operator
        namespace: data
    spec:
      containers:
        - name: etcd-operator
          image: 'quay.io/coreos/etcd-operator:v0.2.1'
          env:
            - name: MY_POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: MY_POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
          resources:
            requests:
              memory: 50Mi
              cpu: 100m
            limits:
              memory: 200Mi
              cpu: 200m
