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.

76 lines
2.4 KiB

  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: calico-kube-controllers
  5. namespace: kube-system
  6. labels:
  7. k8s-app: calico-kube-controllers
  8. kubernetes.io/cluster-service: "true"
  9. spec:
  10. replicas: 1
  11. strategy:
  12. type: Recreate
  13. selector:
  14. matchLabels:
  15. kubernetes.io/cluster-service: "true"
  16. k8s-app: calico-kube-controllers
  17. template:
  18. metadata:
  19. name: calico-kube-controllers
  20. namespace: kube-system
  21. labels:
  22. kubernetes.io/cluster-service: "true"
  23. k8s-app: calico-kube-controllers
  24. spec:
  25. nodeSelector:
  26. beta.kubernetes.io/os: linux
  27. hostNetwork: true
  28. serviceAccountName: calico-kube-controllers
  29. tolerations:
  30. - key: CriticalAddonsOnly
  31. operator: Exists
  32. - key: node-role.kubernetes.io/master
  33. effect: NoSchedule
  34. priorityClassName: system-cluster-critical
  35. containers:
  36. - name: calico-kube-controllers
  37. image: {{ calico_policy_image_repo }}:{{ calico_policy_image_tag }}
  38. imagePullPolicy: {{ k8s_image_pull_policy }}
  39. resources:
  40. limits:
  41. cpu: {{ calico_policy_controller_cpu_limit }}
  42. memory: {{ calico_policy_controller_memory_limit }}
  43. requests:
  44. cpu: {{ calico_policy_controller_cpu_requests }}
  45. memory: {{ calico_policy_controller_memory_requests }}
  46. {% if calico_version is version('v3.3.0', '>=') %}
  47. readinessProbe:
  48. exec:
  49. command:
  50. - /usr/bin/check-status
  51. - -r
  52. {% endif %}
  53. env:
  54. {% if calico_datastore == "kdd" and calico_version is version('v3.6.0', '>=') %}
  55. - name: ENABLED_CONTROLLERS
  56. value: node
  57. - name: DATASTORE_TYPE
  58. value: kubernetes
  59. {% else %}
  60. - name: ETCD_ENDPOINTS
  61. value: "{{ etcd_access_addresses }}"
  62. - name: ETCD_CA_CERT_FILE
  63. value: "{{ calico_cert_dir }}/ca_cert.crt"
  64. - name: ETCD_CERT_FILE
  65. value: "{{ calico_cert_dir }}/cert.crt"
  66. - name: ETCD_KEY_FILE
  67. value: "{{ calico_cert_dir }}/key.pem"
  68. volumeMounts:
  69. - mountPath: {{ calico_cert_dir }}
  70. name: etcd-certs
  71. readOnly: true
  72. volumes:
  73. - hostPath:
  74. path: {{ calico_cert_dir }}
  75. name: etcd-certs
  76. {% endif %}