apiVersion: apps/v1
kind: Deployment
metadata:
  name: backup-operator
  labels:
    usage: operator
    version: v1beta2.etcd.database.coreos.com
    kind: EtcdBackup
spec:
  replicas: 2
  selector:
    matchLabels:
      usage: operator
      version: v1beta2.etcd.database.coreos.com
      kind: EtcdBackup
  template:
    metadata:
      labels:
        usage: operator
        version: v1beta2.etcd.database.coreos.com
        kind: EtcdBackup
    spec:
      containers:
        - name: operator
          image: quay.io/coreos/etcd-operator:v0.9.2
          command: ["etcd-backup-operator"]
          env:
            - name: MY_POD_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: MY_POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
