# Source: https://github.com/kubernetes/cloud-provider-vsphere/blob/master/releases/v1.19/vsphere-cloud-controller-manager.yaml apiVersion: apps/v1 kind: DaemonSet metadata: annotations: scheduler.alpha.kubernetes.io/critical-pod: "" labels: component: {{ .Chart.Name }}-cloud-controller-manager tier: control-plane k8s-app: {{ .Chart.Name }}-cloud-controller-manager name: {{ .Chart.Name }}-cloud-controller-manager namespace: {{ .Release.Namespace }} spec: selector: matchLabels: k8s-app: {{ .Chart.Name }}-cloud-controller-manager updateStrategy: type: RollingUpdate template: metadata: labels: k8s-app: {{ .Chart.Name }}-cloud-controller-manager spec: {{- if .Values.cloudControllerManager.nodeSelector }} nodeSelector: {{- with .Values.cloudControllerManager.nodeSelector }} {{- toYaml . | nindent 8 }} {{- end }} {{- else }} affinity: nodeAffinity: requiredDuringSchedulingIgnoredDuringExecution: nodeSelectorTerms: - matchExpressions: # RKE node selector label - key: node-role.kubernetes.io/controlplane operator: In values: - "true" - matchExpressions: # RKE2 node selector label - key: node-role.kubernetes.io/control-plane operator: In values: - "true" {{- end }} securityContext: runAsUser: 1001 tolerations: - effect: NoExecute operator: Exists - effect: NoSchedule operator: Exists serviceAccountName: {{ .Chart.Name }}-cloud-controller-manager containers: - name: {{ .Chart.Name }}-cloud-controller-manager image: "{{ template "system_default_registry" . }}{{ .Values.cloudControllerManager.image.repository }}:{{ .Values.cloudControllerManager.image.tag }}" args: - --v=2 - --cloud-provider=vsphere - --cloud-config=/etc/cloud/vsphere.conf volumeMounts: - mountPath: /etc/cloud name: vsphere-config-volume readOnly: true resources: requests: cpu: 200m hostNetwork: true volumes: - name: vsphere-config-volume configMap: name: cloud-config --- apiVersion: v1 kind: Service metadata: labels: component: {{ .Chart.Name }}-cloud-controller-manager name: {{ .Chart.Name }}-cloud-controller-manager namespace: {{ .Release.Namespace }} spec: type: NodePort ports: - port: 43001 protocol: TCP targetPort: 43001 selector: component: {{ .Chart.Name }}-cloud-controller-manager