apiVersion: v1
kind: Pod
metadata:
  name: kube-controller-manager
  namespace: kube-system
  labels:
    k8s-app: kube-controller-manager
spec:
  hostNetwork: true
  containers:
  - name: kube-controller-manager
    image: quay.io/coreos/hyperkube:{{ kubernetes.version }}_coreos.0
    command:
    - /hyperkube
    - controller-manager
    - --allocate-node-cidrs=true
    - --cloud-provider=aws
    - --cluster-cidr={{ kubernetes.pods_network }}
    - --configure-cloud-routes=false
    - --leader-elect=true
    - --master=http://localhost:8080
    - --root-ca-file=/run/ssl/master/ca.pem
    - --service-account-private-key-file=/etc/kubernetes/service-account.pem
    - --service-cluster-ip-range={{ kubernetes.services_network }}
    livenessProbe:
      httpGet:
        host: 127.0.0.1
        path: /healthz
        port: 10252
      initialDelaySeconds: 15
      timeoutSeconds: 15
    volumeMounts:
    - name: run-ssl-master
      mountPath: /run/ssl/master
      readOnly: true
    - name: ssl-certs-host
      mountPath: /etc/ssl/certs
      readOnly: true
    - name: etc-kubernetes
      mountPath: /etc/kubernetes
      readOnly: true
  volumes:
  - name: run-ssl-master
    hostPath:
      path: /run/ssl/master
  - name: ssl-certs-host
    hostPath:
      path: /usr/share/ca-certificates
  - name: etc-kubernetes
    hostPath:
      path: /etc/kubernetes
  dnsPolicy: Default # Don't use cluster DNS.
