apiVersion: apps/v1
kind: Deployment
metadata:
  name: controller101
  namespace: kube-system
spec:
  replicas: 1
  selector:
    matchLabels:
      k8s-app: controller101
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        k8s-app: controller101
    spec:
      priorityClassName: system-cluster-critical
      tolerations:
      - key: CriticalAddonsOnly
        operator: Exists
      - effect: NoSchedule
        key: node-role.kubernetes.io/master
      serviceAccountName: controller101
      containers:
      - name: controller
        image: kairen/controller101:v0.1.0
        env:
        - name: DOCKER_HOST
          value: "tcp://192.168.99.158:2376"
        - name: DOCKER_TLS_VERIFY
          value: "1"
        - name: DOCKER_CERT_PATH
          value: "/etc/docker-certs"
        args:
        - --v=2
        - --logtostderr=true
        - --vm-driver=docker
        - --leader-elect=false
        volumeMounts:
        - name: docker-certs
          mountPath: "/etc/docker-certs"
          readOnly: true
      volumes:
      - name: docker-certs
        secret:
          secretName: docker-certs
