apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: k8s-snapshots
  namespace: kube-system
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: k8s-snapshots
    spec:
      containers:
      - name: k8s-snapshots
        image: elsdoerfer/k8s-snapshots:dev  # v2.0 has a breaking bug in AWS support
        env:
        - name: USE_CLAIM_NAME
          value: "true"
      # k8s-snapshots need EBS and S3 permissions to take and save snapshots.
      # Under the kops IAM Role scheme, only Masters have these permissions.
      # The easiest solution was to run k8s-snapshots on Masters. See
      # https://issues.gpii.net/browse/GPII-2545?focusedCommentId=28509&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-28509
      #
      # To run on a Master, we need to:
      # * overcome a Taint -- see
      # https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
      #
      # * specify that we require a Master -- see
      # https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
      tolerations:
      - key: "node-role.kubernetes.io/master"
        operator: "Equal"
        value: ""
        effect: "NoSchedule"
      nodeSelector:
        kubernetes.io/role: master

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: k8s-snapshots
  namespace: kube-system
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: k8s-snapshots
    spec:
      containers:
      - name: k8s-snapshots
        # Temporarily using mrtyler version of this image due to
        # https://github.com/miracle2k/k8s-snapshots/issues/53
        image: mrtyler/k8s-snapshots:dev  # Use :dev because :v2.0 has a breaking bug in AWS support
        env:
        - name: USE_CLAIM_NAME
          value: "true"
      # k8s-snapshots need EBS and S3 permissions to take and save snapshots.
      # Under the kops IAM Role scheme, only Masters have these permissions.
      # The easiest solution was to run k8s-snapshots on Masters. See
      # https://issues.gpii.net/browse/GPII-2545?focusedCommentId=28509&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-28509
      #
      # To run on a Master, we need to:
      # * overcome a Taint -- see
      # https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/
      #
      # * specify that we require a Master -- see
      # https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
      tolerations:
      - key: "node-role.kubernetes.io/master"
        operator: "Equal"
        value: ""
        effect: "NoSchedule"
      nodeSelector:
        kubernetes.io/role: master

Use mrtyler version of k8s-snapshots.
Use mrtyler version of k8s-snapshots.

Due to https://github.com/miracle2k/k8s-snapshots/issues/53
