rancher-charts/charts/rancher-vsphere-cpi/1.0.1/templates/vsphere-cpi-ds.yaml

75 lines
2.1 KiB
YAML

# 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: cloud-controller-manager
tier: control-plane
k8s-app: vsphere-cloud-controller-manager
name: vsphere-cloud-controller-manager
namespace: {{ .Release.Namespace }}
spec:
selector:
matchLabels:
k8s-app: vsphere-cloud-controller-manager
updateStrategy:
type: RollingUpdate
template:
metadata:
labels:
k8s-app: vsphere-cloud-controller-manager
spec:
nodeSelector:
{{- if .Values.cloudControllerManager.nodeSelector }}
{{- with .Values.cloudControllerManager.nodeSelector }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- else }}
node-role.kubernetes.io/controlplane: "true"
{{- end }}
securityContext:
runAsUser: 1001
tolerations:
- effect: NoExecute
operator: Exists
- effect: NoSchedule
operator: Exists
serviceAccountName: cloud-controller-manager
containers:
- name: vsphere-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: cloud-controller-manager
name: vsphere-cloud-controller-manager
namespace: {{ .Release.Namespace }}
spec:
type: NodePort
ports:
- port: 43001
protocol: TCP
targetPort: 43001
selector:
component: cloud-controller-manager