apiVersion: v1
kind: Pod
metadata:
  name: policy-controller
  namespace: calico-system
  labels:
    version: "latest"
    projectcalico.org/app: "policy-controller"
spec:
  hostNetwork: true
  containers:
    - name: policy-controller
      image: calico/kube-policy-controller:latest
      env:
        - name: ETCD_ENDPOINTS
          value: "${config['template.substitutions']['etcd_endpoints']}"
        - name: K8S_API
          value: "${config['template.substitutions']['kubernetes_url']}"
        - name: LEADER_ELECTION
          value: "true"
    - name: leader-elector
      image: quay.io/calico/leader-elector:v0.1.0
      imagePullPolicy: IfNotPresent
      args:
        - "--election=calico-policy-election"
        - "--election-namespace=calico-system"
        - "--http=127.0.0.1:4040"
