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.

68 lines
2.4 KiB

  1. apiVersion: apps/v1beta2
  2. kind: Deployment
  3. metadata:
  4. name: calico-kube-controllers
  5. namespace: {{ system_namespace }}
  6. labels:
  7. k8s-app: calico-kube-controllers
  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-kube-controllers
  15. template:
  16. metadata:
  17. name: calico-kube-controllers
  18. namespace: {{ system_namespace }}
  19. labels:
  20. kubernetes.io/cluster-service: "true"
  21. k8s-app: calico-kube-controllers
  22. spec:
  23. hostNetwork: true
  24. {% if rbac_enabled %}
  25. serviceAccountName: calico-kube-controllers
  26. {% endif %}
  27. tolerations:
  28. - effect: NoSchedule
  29. operator: Exists
  30. containers:
  31. - name: calico-kube-controllers
  32. image: {{ calico_policy_image_repo }}:{{ calico_policy_image_tag }}
  33. imagePullPolicy: {{ k8s_image_pull_policy }}
  34. resources:
  35. limits:
  36. cpu: {{ calico_policy_controller_cpu_limit }}
  37. memory: {{ calico_policy_controller_memory_limit }}
  38. requests:
  39. cpu: {{ calico_policy_controller_cpu_requests }}
  40. memory: {{ calico_policy_controller_memory_requests }}
  41. env:
  42. - name: ETCD_ENDPOINTS
  43. value: "{{ etcd_access_addresses }}"
  44. - name: ETCD_CA_CERT_FILE
  45. value: "{{ calico_cert_dir }}/ca_cert.crt"
  46. - name: ETCD_CERT_FILE
  47. value: "{{ calico_cert_dir }}/cert.crt"
  48. - name: ETCD_KEY_FILE
  49. value: "{{ calico_cert_dir }}/key.pem"
  50. # Location of the Kubernetes API - this shouldn't need to be
  51. # changed so long as it is used in conjunction with
  52. # CONFIGURE_ETC_HOSTS="true".
  53. - name: K8S_API
  54. value: "https://kubernetes.default"
  55. # Configure /etc/hosts within the container to resolve
  56. # the kubernetes.default Service to the correct clusterIP
  57. # using the environment provided by the kubelet.
  58. # This removes the need for KubeDNS to resolve the Service.
  59. - name: CONFIGURE_ETC_HOSTS
  60. value: "true"
  61. volumeMounts:
  62. - mountPath: {{ calico_cert_dir }}
  63. name: etcd-certs
  64. readOnly: true
  65. volumes:
  66. - hostPath:
  67. path: {{ calico_cert_dir }}
  68. name: etcd-certs