You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.9 KiB

  1. apiVersion: extensions/v1beta1
  2. kind: ReplicaSet
  3. metadata:
  4. name: calico-policy-controller
  5. namespace: {{ kube_namespace }}
  6. labels:
  7. k8s-app: calico-policy
  8. kubernetes.io/cluster-service: "true"
  9. spec:
  10. replicas: 1
  11. selector:
  12. matchLabels:
  13. kubernetes.io/cluster-service: "true"
  14. k8s-app: calico-policy
  15. template:
  16. metadata:
  17. name: calico-policy-controller
  18. namespace: kube-system
  19. labels:
  20. kubernetes.io/cluster-service: "true"
  21. k8s-app: calico-policy
  22. spec:
  23. hostNetwork: true
  24. containers:
  25. - name: calico-policy-controller
  26. image: {{ calico_policy_image_repo }}:{{ calico_policy_image_tag }}
  27. imagePullPolicy: {{ k8s_image_pull_policy }}
  28. env:
  29. - name: ETCD_ENDPOINTS
  30. value: "{{ etcd_access_endpoint }}"
  31. - name: ETCD_CA_CERT_FILE
  32. value: "{{ etcd_cert_dir }}/ca.pem"
  33. - name: ETCD_CERT_FILE
  34. value: "{{ etcd_cert_dir }}/node.pem"
  35. - name: ETCD_KEY_FILE
  36. value: "{{ etcd_cert_dir }}/node-key.pem"
  37. # Location of the Kubernetes API - this shouldn't need to be
  38. # changed so long as it is used in conjunction with
  39. # CONFIGURE_ETC_HOSTS="true".
  40. - name: K8S_API
  41. value: "https://kubernetes.default:443"
  42. # Configure /etc/hosts within the container to resolve
  43. # the kubernetes.default Service to the correct clusterIP
  44. # using the environment provided by the kubelet.
  45. # This removes the need for KubeDNS to resolve the Service.
  46. - name: CONFIGURE_ETC_HOSTS
  47. value: "true"
  48. volumeMounts:
  49. - mountPath: {{ etcd_cert_dir }}
  50. name: etcd-certs
  51. readOnly: true
  52. volumes:
  53. - hostPath:
  54. path: {{ etcd_cert_dir }}
  55. name: etcd-certs