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.

60 lines
2.0 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. command:
  15. - /hyperkube
  16. - controller-manager
  17. - --master={{ kube_apiserver_endpoint }}
  18. - --leader-elect=true
  19. - --service-account-private-key-file={{ kube_cert_dir }}/apiserver-key.pem
  20. - --root-ca-file={{ kube_cert_dir }}/ca.pem
  21. - --cluster-signing-cert-file={{ kube_cert_dir }}/ca.pem
  22. - --cluster-signing-key-file={{ kube_cert_dir }}/ca-key.pem
  23. - --enable-hostpath-provisioner={{ kube_hostpath_dynamic_provisioner }}
  24. - --v={{ kube_log_level }}
  25. {% if cloud_provider is defined and cloud_provider in ["openstack", "azure"] %}
  26. - --cloud-provider={{cloud_provider}}
  27. - --cloud-config={{ kube_config_dir }}/cloud_config
  28. {% elif cloud_provider is defined and cloud_provider == "aws" %}
  29. - --cloud-provider={{cloud_provider}}
  30. {% endif %}
  31. {% if kube_network_plugin is defined and kube_network_plugin == 'cloud' %}
  32. - --allocate-node-cidrs=true
  33. - --configure-cloud-routes=true
  34. - --cluster-cidr={{ kube_pods_subnet }}
  35. {% endif %}
  36. livenessProbe:
  37. httpGet:
  38. host: 127.0.0.1
  39. path: /healthz
  40. port: 10252
  41. initialDelaySeconds: 30
  42. timeoutSeconds: 10
  43. volumeMounts:
  44. - mountPath: {{ kube_cert_dir }}
  45. name: ssl-certs-kubernetes
  46. readOnly: true
  47. {% if cloud_provider is defined and cloud_provider in ["openstack", "azure"] %}
  48. - mountPath: {{ kube_config_dir }}/cloud_config
  49. name: cloudconfig
  50. readOnly: true
  51. {% endif %}
  52. volumes:
  53. - hostPath:
  54. path: {{ kube_cert_dir }}
  55. name: ssl-certs-kubernetes
  56. {% if cloud_provider is defined and cloud_provider in ["openstack", "azure"] %}
  57. - hostPath:
  58. path: {{ kube_config_dir }}/cloud_config
  59. name: cloudconfig
  60. {% endif %}