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.

77 lines
2.1 KiB

  1. apiVersion: v1
  2. data:
  3. cloud-provider.yaml: {{ controller_manager_config_base64 }}
  4. kind: Secret
  5. metadata:
  6. name: oci-cloud-controller-manager
  7. namespace: kube-system
  8. type: Opaque
  9. ---
  10. apiVersion: apps/v1
  11. kind: DaemonSet
  12. metadata:
  13. name: oci-cloud-controller-manager
  14. namespace: kube-system
  15. labels:
  16. k8s-app: oci-cloud-controller-manager
  17. spec:
  18. selector:
  19. matchLabels:
  20. component: oci-cloud-controller-manager
  21. tier: control-plane
  22. updateStrategy:
  23. type: RollingUpdate
  24. template:
  25. metadata:
  26. labels:
  27. component: oci-cloud-controller-manager
  28. tier: control-plane
  29. spec:
  30. {% if oci_cloud_controller_pull_secret is defined %}
  31. imagePullSecrets:
  32. - name: {{oci_cloud_controller_pull_secret}}
  33. {% endif %}
  34. serviceAccountName: cloud-controller-manager
  35. hostNetwork: true
  36. dnsPolicy: ClusterFirstWithHostNet
  37. nodeSelector:
  38. {% if kube_version is version('v1.20.0', '<') %}
  39. node-role.kubernetes.io/master: ""
  40. {% else %}
  41. node-role.kubernetes.io/control-plane: ""
  42. {% endif %}
  43. tolerations:
  44. - key: node.cloudprovider.kubernetes.io/uninitialized
  45. value: "true"
  46. effect: NoSchedule
  47. - key: node-role.kubernetes.io/master
  48. operator: Exists
  49. effect: NoSchedule
  50. - key: node-role.kubernetes.io/control-plane
  51. operator: Exists
  52. effect: NoSchedule
  53. volumes:
  54. - name: cfg
  55. secret:
  56. secretName: oci-cloud-controller-manager
  57. - name: kubernetes
  58. hostPath:
  59. path: /etc/kubernetes
  60. containers:
  61. - name: oci-cloud-controller-manager
  62. image: {{oci_cloud_controller_pull_source}}:{{oci_cloud_controller_version}}
  63. command: ["/usr/local/bin/oci-cloud-controller-manager"]
  64. args:
  65. - --cloud-config=/etc/oci/cloud-provider.yaml
  66. - --cloud-provider=oci
  67. - --leader-elect-resource-lock=configmaps
  68. - -v=2
  69. volumeMounts:
  70. - name: cfg
  71. mountPath: /etc/oci
  72. readOnly: true
  73. - name: kubernetes
  74. mountPath: /etc/kubernetes
  75. readOnly: true