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.

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