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.

70 lines
2.4 KiB

  1. apiVersion: v1
  2. kind: Pod
  3. metadata:
  4. name: kube-controller-manager
  5. namespace: {{system_namespace}}
  6. labels:
  7. k8s-app: kube-controller
  8. spec:
  9. hostNetwork: true
  10. containers:
  11. - name: kube-controller-manager
  12. image: {{ hyperkube_image_repo }}:{{ hyperkube_image_tag }}
  13. imagePullPolicy: {{ k8s_image_pull_policy }}
  14. resources:
  15. limits:
  16. cpu: {{ kube_controller_cpu_limit }}
  17. memory: {{ kube_controller_memory_limit }}
  18. requests:
  19. cpu: {{ kube_controller_cpu_requests }}
  20. memory: {{ kube_controller_memory_requests }}
  21. command:
  22. - /hyperkube
  23. - controller-manager
  24. - --master={{ kube_apiserver_endpoint }}
  25. - --leader-elect=true
  26. - --service-account-private-key-file={{ kube_cert_dir }}/apiserver-key.pem
  27. - --root-ca-file={{ kube_cert_dir }}/ca.pem
  28. - --cluster-signing-cert-file={{ kube_cert_dir }}/ca.pem
  29. - --cluster-signing-key-file={{ kube_cert_dir }}/ca-key.pem
  30. - --enable-hostpath-provisioner={{ kube_hostpath_dynamic_provisioner }}
  31. - --node-monitor-grace-period={{ kube_controller_node_monitor_grace_period }}
  32. - --node-monitor-period={{ kube_controller_node_monitor_period }}
  33. - --pod-eviction-timeout={{ kube_controller_pod_eviction_timeout }}
  34. - --v={{ kube_log_level }}
  35. {% if cloud_provider is defined and cloud_provider in ["openstack", "azure"] %}
  36. - --cloud-provider={{cloud_provider}}
  37. - --cloud-config={{ kube_config_dir }}/cloud_config
  38. {% elif cloud_provider is defined and cloud_provider == "aws" %}
  39. - --cloud-provider={{cloud_provider}}
  40. {% endif %}
  41. {% if kube_network_plugin is defined and kube_network_plugin == 'cloud' %}
  42. - --allocate-node-cidrs=true
  43. - --configure-cloud-routes=true
  44. - --cluster-cidr={{ kube_pods_subnet }}
  45. {% endif %}
  46. livenessProbe:
  47. httpGet:
  48. host: 127.0.0.1
  49. path: /healthz
  50. port: 10252
  51. initialDelaySeconds: 30
  52. timeoutSeconds: 10
  53. volumeMounts:
  54. - mountPath: {{ kube_cert_dir }}
  55. name: ssl-certs-kubernetes
  56. readOnly: true
  57. {% if cloud_provider is defined and cloud_provider in ["openstack", "azure"] %}
  58. - mountPath: {{ kube_config_dir }}/cloud_config
  59. name: cloudconfig
  60. readOnly: true
  61. {% endif %}
  62. volumes:
  63. - hostPath:
  64. path: {{ kube_cert_dir }}
  65. name: ssl-certs-kubernetes
  66. {% if cloud_provider is defined and cloud_provider in ["openstack", "azure"] %}
  67. - hostPath:
  68. path: {{ kube_config_dir }}/cloud_config
  69. name: cloudconfig
  70. {% endif %}