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.

62 lines
2.2 KiB

  1. apiVersion: extensions/v1beta1
  2. kind: ReplicaSet
  3. metadata:
  4. name: calico-policy-controller
  5. namespace: {{ system_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: {{system_namespace}}
  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. resources:
  29. limits:
  30. cpu: {{ calico_policy_controller_cpu_limit }}
  31. memory: {{ calico_policy_controller_memory_limit }}
  32. requests:
  33. cpu: {{ calico_policy_controller_cpu_requests }}
  34. memory: {{ calico_policy_controller_memory_requests }}
  35. env:
  36. - name: ETCD_ENDPOINTS
  37. value: "{{ etcd_access_endpoint }}"
  38. - name: ETCD_CA_CERT_FILE
  39. value: "{{ calico_cert_dir }}/ca_cert.crt"
  40. - name: ETCD_CERT_FILE
  41. value: "{{ calico_cert_dir }}/cert.crt"
  42. - name: ETCD_KEY_FILE
  43. value: "{{ calico_cert_dir }}/key.pem"
  44. # Location of the Kubernetes API - this shouldn't need to be
  45. # changed so long as it is used in conjunction with
  46. # CONFIGURE_ETC_HOSTS="true".
  47. - name: K8S_API
  48. value: "https://kubernetes.default"
  49. # Configure /etc/hosts within the container to resolve
  50. # the kubernetes.default Service to the correct clusterIP
  51. # using the environment provided by the kubelet.
  52. # This removes the need for KubeDNS to resolve the Service.
  53. - name: CONFIGURE_ETC_HOSTS
  54. value: "true"
  55. volumeMounts:
  56. - mountPath: {{ calico_cert_dir }}
  57. name: etcd-certs
  58. readOnly: true
  59. volumes:
  60. - hostPath:
  61. path: {{ calico_cert_dir }}
  62. name: etcd-certs