apiVersion: apps/v1
kind: Deployment
metadata:
  name: container-snapshot
spec:
  replicas: 1
  selector:
    matchLabels:
      name: container-snapshot
  template:
    metadata:
      labels:
        name: container-snapshot
    spec:
      serviceAccountName: container-snapshot
      containers:
        - name: container-snapshot
          image: supremind/container-snapshot-operator:latest
          command:
          - container-snapshot
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "container-snapshot"
            - name: WORKER_IMAGE
              value: supremind/container-snapshot-worker:latest
            # uncomment following lines and set a secret name
            # if you are using an alternative worker image
            # - name: WORKER_IMAGE_PULL_SECRET
            #   value: ""
          resources:
            limits:
              cpu: 200m
              memory: 128Mi
