mirror of https://git.rancher.io/charts
Merge pull request #1564 from PennyScissors/devv26
[dev-v2.6] Fix CPI and CSI unneeded templatespull/1566/head
commit
310675373a
Binary file not shown.
Binary file not shown.
|
@ -1,15 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: cloud-config
|
||||
namespace: {{ .Release.Namespace }}
|
||||
data:
|
||||
vsphere.conf: |
|
||||
[Global]
|
||||
secret-name = {{ .Values.vCenter.credentialsSecret.name | quote }}
|
||||
secret-namespace = {{ .Release.Namespace | quote }}
|
||||
port = {{ .Values.vCenter.port | quote }}
|
||||
insecure-flag = {{ .Values.vCenter.insecureFlag | quote }}
|
||||
|
||||
[VirtualCenter {{ .Values.vCenter.host | quote }}]
|
||||
datacenters = {{ .Values.vCenter.datacenters | quote }}
|
|
@ -1,89 +0,0 @@
|
|||
# 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
|
|
@ -1,129 +0,0 @@
|
|||
{{- if .Values.cloudControllerManager.rbac.enabled -}}
|
||||
# Source: https://github.com/kubernetes/cloud-provider-vsphere/blob/master/releases/v1.19/vsphere-cloud-controller-manager.yaml
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ .Chart.Name }}-cloud-controller-manager
|
||||
namespace: {{ .Release.Namespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ .Chart.Name }}-cloud-controller-manager
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- nodes
|
||||
verbs:
|
||||
- '*'
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- nodes/status
|
||||
verbs:
|
||||
- patch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services
|
||||
verbs:
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services/status
|
||||
verbs:
|
||||
- patch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- serviceaccounts
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- endpoints
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- "coordination.k8s.io"
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: apiserver-authentication-reader
|
||||
namespace: kube-system
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: extension-apiserver-authentication-reader
|
||||
subjects:
|
||||
- apiGroup: ""
|
||||
kind: ServiceAccount
|
||||
name: {{ .Chart.Name }}-cloud-controller-manager
|
||||
namespace: {{ .Release.Namespace }}
|
||||
- apiGroup: ""
|
||||
kind: User
|
||||
name: {{ .Chart.Name }}-cloud-controller-manager
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ .Chart.Name }}-cloud-controller-manager
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: {{ .Chart.Name }}-cloud-controller-manager
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Chart.Name }}-cloud-controller-manager
|
||||
namespace: {{ .Release.Namespace }}
|
||||
- kind: User
|
||||
name: {{ .Chart.Name }}-cloud-controller-manager
|
||||
{{- end -}}
|
|
@ -1,10 +0,0 @@
|
|||
{{- if .Values.vCenter.credentialsSecret.generate -}}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ .Values.vCenter.credentialsSecret.name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
data:
|
||||
{{ .Values.vCenter.host }}.username: {{ .Values.vCenter.username | b64enc | quote }}
|
||||
{{ .Values.vCenter.host }}.password: {{ .Values.vCenter.password | b64enc | quote }}
|
||||
{{- end -}}
|
|
@ -1,240 +0,0 @@
|
|||
# Source: https://github.com/kubernetes-sigs/vsphere-csi-driver
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: vsphere-csi-controller
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: vsphere-csi-controller
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: vsphere-csi-controller
|
||||
role: vsphere-csi
|
||||
spec:
|
||||
{{- if .Values.csiController.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- with .Values.csiController.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 }}
|
||||
serviceAccountName: vsphere-csi-controller
|
||||
tolerations:
|
||||
# Rancher specific change: These tolerations are intentionally different from upstream to avoid lessening the scope to only NoSchedule with a specific key
|
||||
# - key: node-role.kubernetes.io/master
|
||||
# operator: Exists
|
||||
# effect: NoSchedule
|
||||
- operator: "Exists"
|
||||
effect: NoSchedule
|
||||
- operator: "Exists"
|
||||
effect: NoExecute
|
||||
# uncomment below toleration if you need an aggressive pod eviction in case when
|
||||
# node becomes not-ready or unreachable. Default is 300 seconds if not specified.
|
||||
#- key: node.kubernetes.io/not-ready
|
||||
# operator: Exists
|
||||
# effect: NoExecute
|
||||
# tolerationSeconds: 30
|
||||
#- key: node.kubernetes.io/unreachable
|
||||
# operator: Exists
|
||||
# effect: NoExecute
|
||||
# tolerationSeconds: 30
|
||||
dnsPolicy: "Default"
|
||||
containers:
|
||||
- name: csi-attacher
|
||||
image: "{{ template "system_default_registry" . }}{{ .Values.csiController.image.csiAttacher.repository }}:{{ .Values.csiController.image.csiAttacher.tag }}"
|
||||
args:
|
||||
- "--v=4"
|
||||
- "--timeout=300s"
|
||||
- "--csi-address=$(ADDRESS)"
|
||||
- "--leader-election"
|
||||
env:
|
||||
- name: ADDRESS
|
||||
value: /csi/csi.sock
|
||||
volumeMounts:
|
||||
- mountPath: /csi
|
||||
name: socket-dir
|
||||
{{- if .Values.csiController.csiResizer.enabled }}
|
||||
- name: csi-resizer
|
||||
image: "{{ template "system_default_registry" . }}{{ .Values.csiController.image.csiResizer.repository }}:{{ .Values.csiController.image.csiResizer.tag }}"
|
||||
args:
|
||||
- "--v=4"
|
||||
- "--timeout=300s"
|
||||
- "--handle-volume-inuse-error=false"
|
||||
- "--csi-address=$(ADDRESS)"
|
||||
- "--kube-api-qps=100"
|
||||
- "--kube-api-burst=100"
|
||||
- "--leader-election"
|
||||
env:
|
||||
- name: ADDRESS
|
||||
value: /csi/csi.sock
|
||||
volumeMounts:
|
||||
- mountPath: /csi
|
||||
name: socket-dir
|
||||
{{- end }}
|
||||
- name: vsphere-csi-controller
|
||||
image: "{{ template "system_default_registry" . }}{{ .Values.csiController.image.repository }}:{{ .Values.csiController.image.tag }}"
|
||||
args:
|
||||
- "--fss-name=internal-feature-states.csi.vsphere.vmware.com"
|
||||
- "--fss-namespace=$(CSI_NAMESPACE)"
|
||||
imagePullPolicy: "Always"
|
||||
env:
|
||||
- name: CSI_ENDPOINT
|
||||
value: unix:///csi/csi.sock
|
||||
- name: X_CSI_MODE
|
||||
value: "controller"
|
||||
- name: VSPHERE_CSI_CONFIG
|
||||
value: "/etc/cloud/csi-vsphere.conf"
|
||||
- name: LOGGER_LEVEL
|
||||
value: "PRODUCTION" # Options: DEVELOPMENT, PRODUCTION
|
||||
- name: INCLUSTER_CLIENT_QPS
|
||||
value: "100"
|
||||
- name: INCLUSTER_CLIENT_BURST
|
||||
value: "100"
|
||||
- name: CSI_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: X_CSI_SERIAL_VOL_ACCESS_TIMEOUT
|
||||
value: 3m
|
||||
volumeMounts:
|
||||
- mountPath: /etc/cloud
|
||||
name: vsphere-config-volume
|
||||
readOnly: true
|
||||
- mountPath: /csi
|
||||
name: socket-dir
|
||||
ports:
|
||||
- name: healthz
|
||||
containerPort: 9808
|
||||
protocol: TCP
|
||||
- name: prometheus
|
||||
containerPort: 2112
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: healthz
|
||||
initialDelaySeconds: 10
|
||||
timeoutSeconds: 3
|
||||
periodSeconds: 5
|
||||
failureThreshold: 3
|
||||
- name: liveness-probe
|
||||
image: "{{ template "system_default_registry" . }}{{ .Values.csiController.image.livenessProbe.repository }}:{{ .Values.csiController.image.livenessProbe.tag }}"
|
||||
args:
|
||||
- "--v=4"
|
||||
- "--csi-address=/csi/csi.sock"
|
||||
volumeMounts:
|
||||
- name: socket-dir
|
||||
mountPath: /csi
|
||||
- name: vsphere-syncer
|
||||
image: "{{ template "system_default_registry" . }}{{ .Values.csiController.image.vsphereSyncer.repository }}:{{ .Values.csiController.image.vsphereSyncer.tag }}"
|
||||
args:
|
||||
- "--leader-election"
|
||||
- "--fss-name=internal-feature-states.csi.vsphere.vmware.com"
|
||||
- "--fss-namespace=$(CSI_NAMESPACE)"
|
||||
imagePullPolicy: "Always"
|
||||
ports:
|
||||
- containerPort: 2113
|
||||
name: prometheus
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: FULL_SYNC_INTERVAL_MINUTES
|
||||
value: "30"
|
||||
- name: VSPHERE_CSI_CONFIG
|
||||
value: "/etc/cloud/csi-vsphere.conf"
|
||||
- name: LOGGER_LEVEL
|
||||
value: "PRODUCTION" # Options: DEVELOPMENT, PRODUCTION
|
||||
- name: INCLUSTER_CLIENT_QPS
|
||||
value: "100"
|
||||
- name: INCLUSTER_CLIENT_BURST
|
||||
value: "100"
|
||||
- name: CSI_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
volumeMounts:
|
||||
- mountPath: /etc/cloud
|
||||
name: vsphere-config-volume
|
||||
readOnly: true
|
||||
- name: csi-provisioner
|
||||
image: "{{ template "system_default_registry" . }}{{ .Values.csiController.image.csiProvisioner.repository }}:{{ .Values.csiController.image.csiProvisioner.tag }}"
|
||||
args:
|
||||
- "--v=4"
|
||||
- "--timeout=300s"
|
||||
- "--csi-address=$(ADDRESS)"
|
||||
- "--kube-api-qps=100"
|
||||
- "--kube-api-burst=100"
|
||||
- "--leader-election"
|
||||
- "--default-fstype=ext4"
|
||||
# needed only for topology aware setup
|
||||
#- "--feature-gates=Topology=true"
|
||||
#- "--strict-topology"
|
||||
env:
|
||||
- name: ADDRESS
|
||||
value: /csi/csi.sock
|
||||
volumeMounts:
|
||||
- mountPath: /csi
|
||||
name: socket-dir
|
||||
volumes:
|
||||
- name: vsphere-config-volume
|
||||
secret:
|
||||
secretName: {{ .Values.vCenter.configSecret.name }}
|
||||
- name: socket-dir
|
||||
emptyDir: {}
|
||||
---
|
||||
apiVersion: v1
|
||||
data:
|
||||
"csi-migration": {{ .Values.csiMigration.enabled | quote }}
|
||||
"csi-auth-check": {{ .Values.csiAuthCheck.enabled | quote }}
|
||||
"online-volume-extend": {{ .Values.onlineVolumeExtend.enabled | quote }}
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: internal-feature-states.csi.vsphere.vmware.com
|
||||
namespace: {{ .Release.Namespace }}
|
||||
---
|
||||
apiVersion: storage.k8s.io/v1 # For k8s 1.17 use storage.k8s.io/v1beta1
|
||||
kind: CSIDriver
|
||||
metadata:
|
||||
name: csi.vsphere.vmware.com
|
||||
spec:
|
||||
attachRequired: true
|
||||
podInfoOnMount: false
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: vsphere-csi-controller
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app: vsphere-csi-controller
|
||||
spec:
|
||||
ports:
|
||||
- name: ctlr
|
||||
port: 2112
|
||||
targetPort: 2112
|
||||
protocol: TCP
|
||||
- name: syncer
|
||||
port: 2113
|
||||
targetPort: 2113
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: vsphere-csi-controller
|
|
@ -1,55 +0,0 @@
|
|||
# Source: https://github.com/kubernetes-sigs/vsphere-csi-driver
|
||||
kind: ServiceAccount
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: vsphere-csi-controller
|
||||
namespace: {{ .Release.Namespace }}
|
||||
---
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: vsphere-csi-controller-role
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes", "persistentvolumeclaims", "pods", "configmaps"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumeclaims/status"]
|
||||
verbs: ["patch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumes"]
|
||||
verbs: ["get", "list", "watch", "create", "update", "delete", "patch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["events"]
|
||||
verbs: ["get", "list", "watch", "create", "update", "patch"]
|
||||
- apiGroups: ["coordination.k8s.io"]
|
||||
resources: ["leases"]
|
||||
verbs: ["get", "watch", "list", "delete", "update", "create"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["storageclasses", "csinodes"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["volumeattachments"]
|
||||
verbs: ["get", "list", "watch", "patch"]
|
||||
- apiGroups: ["cns.vmware.com"]
|
||||
resources: ["cnsvspherevolumemigrations"]
|
||||
verbs: ["create", "get", "list", "watch", "update", "delete"]
|
||||
- apiGroups: ["apiextensions.k8s.io"]
|
||||
resources: ["customresourcedefinitions"]
|
||||
verbs: ["get", "create", "update"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["volumeattachments/status"]
|
||||
verbs: ["patch"]
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: vsphere-csi-controller-binding
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: vsphere-csi-controller
|
||||
namespace: {{ .Release.Namespace }}
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: vsphere-csi-controller-role
|
||||
apiGroup: rbac.authorization.k8s.io
|
|
@ -1,152 +0,0 @@
|
|||
# Source: https://github.com/kubernetes-sigs/vsphere-csi-driver
|
||||
kind: DaemonSet
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: vsphere-csi-node
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: vsphere-csi-node
|
||||
updateStrategy:
|
||||
type: "RollingUpdate"
|
||||
rollingUpdate:
|
||||
maxUnavailable: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: vsphere-csi-node
|
||||
role: vsphere-csi
|
||||
spec:
|
||||
serviceAccountName: vsphere-csi-node
|
||||
dnsPolicy: "Default"
|
||||
containers:
|
||||
- name: node-driver-registrar
|
||||
image: "{{ template "system_default_registry" . }}{{ .Values.csiNode.image.nodeDriverRegistrar.repository }}:{{ .Values.csiNode.image.nodeDriverRegistrar.tag }}"
|
||||
args:
|
||||
- "--v=5"
|
||||
- "--csi-address=$(ADDRESS)"
|
||||
- "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)"
|
||||
- "--health-port=9809"
|
||||
env:
|
||||
- name: ADDRESS
|
||||
value: /csi/csi.sock
|
||||
- name: DRIVER_REG_SOCK_PATH
|
||||
value: {{ .Values.csiNode.prefixPath }}/var/lib/kubelet/plugins/csi.vsphere.vmware.com/csi.sock
|
||||
volumeMounts:
|
||||
- name: plugin-dir
|
||||
mountPath: /csi
|
||||
- name: registration-dir
|
||||
mountPath: /registration
|
||||
ports:
|
||||
- containerPort: 9809
|
||||
name: healthz
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: healthz
|
||||
initialDelaySeconds: 5
|
||||
timeoutSeconds: 5
|
||||
- name: vsphere-csi-node
|
||||
image: "{{ template "system_default_registry" . }}{{ .Values.csiNode.image.repository }}:{{ .Values.csiNode.image.tag }}"
|
||||
args:
|
||||
- "--fss-name=internal-feature-states.csi.vsphere.vmware.com"
|
||||
- "--fss-namespace=$(CSI_NAMESPACE)"
|
||||
imagePullPolicy: "Always"
|
||||
env:
|
||||
- name: NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
- name: CSI_ENDPOINT
|
||||
value: unix:///csi/csi.sock
|
||||
- name: X_CSI_MODE
|
||||
value: "node"
|
||||
- name: X_CSI_SPEC_REQ_VALIDATION
|
||||
value: "false"
|
||||
# needed only for topology aware setups
|
||||
#- name: VSPHERE_CSI_CONFIG
|
||||
# value: "/etc/cloud/csi-vsphere.conf" # here csi-vsphere.conf is the name of the file used for creating secret using "--from-file" flag
|
||||
- name: X_CSI_DEBUG
|
||||
value: "true"
|
||||
- name: LOGGER_LEVEL
|
||||
value: "PRODUCTION" # Options: DEVELOPMENT, PRODUCTION
|
||||
- name: CSI_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
securityContext:
|
||||
privileged: true
|
||||
capabilities:
|
||||
add: ["SYS_ADMIN"]
|
||||
allowPrivilegeEscalation: true
|
||||
volumeMounts:
|
||||
# needed only for topology aware setups
|
||||
#- name: vsphere-config-volume
|
||||
# mountPath: /etc/cloud
|
||||
# readOnly: true
|
||||
- name: plugin-dir
|
||||
mountPath: /csi
|
||||
- name: pods-mount-dir
|
||||
mountPath: {{ .Values.csiNode.prefixPath }}/var/lib/kubelet
|
||||
# needed so that any mounts setup inside this container are
|
||||
# propagated back to the host machine.
|
||||
mountPropagation: "Bidirectional"
|
||||
- name: device-dir
|
||||
mountPath: /dev
|
||||
- name: blocks-dir
|
||||
mountPath: /sys/block
|
||||
- name: sys-devices-dir
|
||||
mountPath: /sys/devices
|
||||
ports:
|
||||
- containerPort: 9808
|
||||
name: healthz
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: healthz
|
||||
initialDelaySeconds: 10
|
||||
timeoutSeconds: 5
|
||||
periodSeconds: 5
|
||||
failureThreshold: 3
|
||||
- name: liveness-probe
|
||||
image: "{{ template "system_default_registry" . }}{{ .Values.csiNode.image.livenessProbe.repository }}:{{ .Values.csiNode.image.livenessProbe.tag }}"
|
||||
args:
|
||||
- "--v=4"
|
||||
- "--csi-address=/csi/csi.sock"
|
||||
volumeMounts:
|
||||
- name: plugin-dir
|
||||
mountPath: /csi
|
||||
volumes:
|
||||
# needed only for topology aware setups
|
||||
#- name: vsphere-config-volume
|
||||
# secret:
|
||||
# secretName: vsphere-config-secret
|
||||
- name: registration-dir
|
||||
hostPath:
|
||||
path: {{ .Values.csiNode.prefixPath }}/var/lib/kubelet/plugins_registry
|
||||
type: Directory
|
||||
- name: plugin-dir
|
||||
hostPath:
|
||||
path: {{ .Values.csiNode.prefixPath }}/var/lib/kubelet/plugins/csi.vsphere.vmware.com
|
||||
type: DirectoryOrCreate
|
||||
- name: pods-mount-dir
|
||||
hostPath:
|
||||
path: {{ .Values.csiNode.prefixPath }}/var/lib/kubelet
|
||||
type: Directory
|
||||
- name: device-dir
|
||||
hostPath:
|
||||
path: /dev
|
||||
- name: blocks-dir
|
||||
hostPath:
|
||||
path: /sys/block
|
||||
type: Directory
|
||||
- name: sys-devices-dir
|
||||
hostPath:
|
||||
path: /sys/devices
|
||||
type: Directory
|
||||
tolerations:
|
||||
- effect: NoExecute
|
||||
operator: Exists
|
||||
- effect: NoSchedule
|
||||
operator: Exists
|
|
@ -1,29 +0,0 @@
|
|||
kind: ServiceAccount
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: vsphere-csi-node
|
||||
namespace: {{ .Release.Namespace }}
|
||||
---
|
||||
kind: Role
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: vsphere-csi-node-role
|
||||
namespace: {{ .Release.Namespace }}
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["configmaps"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
---
|
||||
kind: RoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: vsphere-csi-node-binding
|
||||
namespace: {{ .Release.Namespace }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: vsphere-csi-node
|
||||
namespace: {{ .Release.Namespace }}
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: vsphere-csi-node-role
|
||||
apiGroup: rbac.authorization.k8s.io
|
|
@ -1,9 +0,0 @@
|
|||
{{- if .Values.vCenter.configSecret.generate -}}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ .Values.vCenter.configSecret.name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
data:
|
||||
csi-vsphere.conf: {{ tpl .Values.vCenter.configSecret.configTemplate . | b64enc | quote }}
|
||||
{{- end -}}
|
|
@ -1,16 +0,0 @@
|
|||
{{- if .Values.storageClass.enabled -}}
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: {{ .Values.storageClass.name | quote }}
|
||||
annotations:
|
||||
storageclass.kubernetes.io/is-default-class: {{ .Values.storageClass.isDefault | quote }}
|
||||
provisioner: csi.vsphere.vmware.com
|
||||
parameters:
|
||||
{{- if .Values.storageClass.datastoreURL }}
|
||||
datastoreURL: {{ .Values.storageClass.datastoreURL | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.storageClass.storagePolicyName }}
|
||||
storagepolicyname: {{ .Values.storageClass.storagePolicyName | quote }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
|
@ -4240,9 +4240,9 @@ entries:
|
|||
catalog.cattle.io/release-name: vsphere-cpi
|
||||
apiVersion: v1
|
||||
appVersion: 1.21.0
|
||||
created: "2021-10-13T14:33:36.796487-07:00"
|
||||
created: "2021-10-19T11:00:53.292007-07:00"
|
||||
description: vSphere Cloud Provider Interface (CPI)
|
||||
digest: 245e39f22060ff2a2183ab568c959787f0164552905a0e35fc8b532ac3cef1ad
|
||||
digest: ab0ecb23976e3286bba60e149bd9d9321bf99f8a78e9dc44dee900c7c057315b
|
||||
icon: https://charts.rancher.io/assets/logos/vsphere-cpi.svg
|
||||
keywords:
|
||||
- infrastructure
|
||||
|
@ -4312,9 +4312,9 @@ entries:
|
|||
catalog.cattle.io/release-name: vsphere-csi
|
||||
apiVersion: v1
|
||||
appVersion: 2.3.0
|
||||
created: "2021-10-13T14:33:37.200137-07:00"
|
||||
created: "2021-10-19T11:00:53.704839-07:00"
|
||||
description: vSphere Cloud Storage Interface (CSI)
|
||||
digest: c7405b4fc7384b1483353345a70d040c491621e83bd435a98dfabd0092e77ff5
|
||||
digest: 3873b569f1e3d121fca6a2cbd2ad0edaaab64190702c653b54290079f07724b8
|
||||
icon: https://charts.rancher.io/assets/logos/vsphere-csi.svg
|
||||
keywords:
|
||||
- infrastructure
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: cloud-config
|
||||
namespace: {{ .Release.Namespace }}
|
||||
data:
|
||||
vsphere.conf: |
|
||||
[Global]
|
||||
secret-name = {{ .Values.vCenter.credentialsSecret.name | quote }}
|
||||
secret-namespace = {{ .Release.Namespace | quote }}
|
||||
port = {{ .Values.vCenter.port | quote }}
|
||||
insecure-flag = {{ .Values.vCenter.insecureFlag | quote }}
|
||||
|
||||
[VirtualCenter {{ .Values.vCenter.host | quote }}]
|
||||
datacenters = {{ .Values.vCenter.datacenters | quote }}
|
|
@ -1,89 +0,0 @@
|
|||
# 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
|
|
@ -1,129 +0,0 @@
|
|||
{{- if .Values.cloudControllerManager.rbac.enabled -}}
|
||||
# Source: https://github.com/kubernetes/cloud-provider-vsphere/blob/master/releases/v1.19/vsphere-cloud-controller-manager.yaml
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ .Chart.Name }}-cloud-controller-manager
|
||||
namespace: {{ .Release.Namespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ .Chart.Name }}-cloud-controller-manager
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- create
|
||||
- patch
|
||||
- update
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- nodes
|
||||
verbs:
|
||||
- '*'
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- nodes/status
|
||||
verbs:
|
||||
- patch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services
|
||||
verbs:
|
||||
- list
|
||||
- patch
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- services/status
|
||||
verbs:
|
||||
- patch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- serviceaccounts
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- persistentvolumes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- update
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- endpoints
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- "coordination.k8s.io"
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- update
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: apiserver-authentication-reader
|
||||
namespace: kube-system
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: extension-apiserver-authentication-reader
|
||||
subjects:
|
||||
- apiGroup: ""
|
||||
kind: ServiceAccount
|
||||
name: {{ .Chart.Name }}-cloud-controller-manager
|
||||
namespace: {{ .Release.Namespace }}
|
||||
- apiGroup: ""
|
||||
kind: User
|
||||
name: {{ .Chart.Name }}-cloud-controller-manager
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ .Chart.Name }}-cloud-controller-manager
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: {{ .Chart.Name }}-cloud-controller-manager
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ .Chart.Name }}-cloud-controller-manager
|
||||
namespace: {{ .Release.Namespace }}
|
||||
- kind: User
|
||||
name: {{ .Chart.Name }}-cloud-controller-manager
|
||||
{{- end -}}
|
|
@ -1,10 +0,0 @@
|
|||
{{- if .Values.vCenter.credentialsSecret.generate -}}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ .Values.vCenter.credentialsSecret.name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
data:
|
||||
{{ .Values.vCenter.host }}.username: {{ .Values.vCenter.username | b64enc | quote }}
|
||||
{{ .Values.vCenter.host }}.password: {{ .Values.vCenter.password | b64enc | quote }}
|
||||
{{- end -}}
|
|
@ -1,240 +0,0 @@
|
|||
# Source: https://github.com/kubernetes-sigs/vsphere-csi-driver
|
||||
kind: Deployment
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: vsphere-csi-controller
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: vsphere-csi-controller
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: vsphere-csi-controller
|
||||
role: vsphere-csi
|
||||
spec:
|
||||
{{- if .Values.csiController.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- with .Values.csiController.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 }}
|
||||
serviceAccountName: vsphere-csi-controller
|
||||
tolerations:
|
||||
# Rancher specific change: These tolerations are intentionally different from upstream to avoid lessening the scope to only NoSchedule with a specific key
|
||||
# - key: node-role.kubernetes.io/master
|
||||
# operator: Exists
|
||||
# effect: NoSchedule
|
||||
- operator: "Exists"
|
||||
effect: NoSchedule
|
||||
- operator: "Exists"
|
||||
effect: NoExecute
|
||||
# uncomment below toleration if you need an aggressive pod eviction in case when
|
||||
# node becomes not-ready or unreachable. Default is 300 seconds if not specified.
|
||||
#- key: node.kubernetes.io/not-ready
|
||||
# operator: Exists
|
||||
# effect: NoExecute
|
||||
# tolerationSeconds: 30
|
||||
#- key: node.kubernetes.io/unreachable
|
||||
# operator: Exists
|
||||
# effect: NoExecute
|
||||
# tolerationSeconds: 30
|
||||
dnsPolicy: "Default"
|
||||
containers:
|
||||
- name: csi-attacher
|
||||
image: "{{ template "system_default_registry" . }}{{ .Values.csiController.image.csiAttacher.repository }}:{{ .Values.csiController.image.csiAttacher.tag }}"
|
||||
args:
|
||||
- "--v=4"
|
||||
- "--timeout=300s"
|
||||
- "--csi-address=$(ADDRESS)"
|
||||
- "--leader-election"
|
||||
env:
|
||||
- name: ADDRESS
|
||||
value: /csi/csi.sock
|
||||
volumeMounts:
|
||||
- mountPath: /csi
|
||||
name: socket-dir
|
||||
{{- if .Values.csiController.csiResizer.enabled }}
|
||||
- name: csi-resizer
|
||||
image: "{{ template "system_default_registry" . }}{{ .Values.csiController.image.csiResizer.repository }}:{{ .Values.csiController.image.csiResizer.tag }}"
|
||||
args:
|
||||
- "--v=4"
|
||||
- "--timeout=300s"
|
||||
- "--handle-volume-inuse-error=false"
|
||||
- "--csi-address=$(ADDRESS)"
|
||||
- "--kube-api-qps=100"
|
||||
- "--kube-api-burst=100"
|
||||
- "--leader-election"
|
||||
env:
|
||||
- name: ADDRESS
|
||||
value: /csi/csi.sock
|
||||
volumeMounts:
|
||||
- mountPath: /csi
|
||||
name: socket-dir
|
||||
{{- end }}
|
||||
- name: vsphere-csi-controller
|
||||
image: "{{ template "system_default_registry" . }}{{ .Values.csiController.image.repository }}:{{ .Values.csiController.image.tag }}"
|
||||
args:
|
||||
- "--fss-name=internal-feature-states.csi.vsphere.vmware.com"
|
||||
- "--fss-namespace=$(CSI_NAMESPACE)"
|
||||
imagePullPolicy: "Always"
|
||||
env:
|
||||
- name: CSI_ENDPOINT
|
||||
value: unix:///csi/csi.sock
|
||||
- name: X_CSI_MODE
|
||||
value: "controller"
|
||||
- name: VSPHERE_CSI_CONFIG
|
||||
value: "/etc/cloud/csi-vsphere.conf"
|
||||
- name: LOGGER_LEVEL
|
||||
value: "PRODUCTION" # Options: DEVELOPMENT, PRODUCTION
|
||||
- name: INCLUSTER_CLIENT_QPS
|
||||
value: "100"
|
||||
- name: INCLUSTER_CLIENT_BURST
|
||||
value: "100"
|
||||
- name: CSI_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: X_CSI_SERIAL_VOL_ACCESS_TIMEOUT
|
||||
value: 3m
|
||||
volumeMounts:
|
||||
- mountPath: /etc/cloud
|
||||
name: vsphere-config-volume
|
||||
readOnly: true
|
||||
- mountPath: /csi
|
||||
name: socket-dir
|
||||
ports:
|
||||
- name: healthz
|
||||
containerPort: 9808
|
||||
protocol: TCP
|
||||
- name: prometheus
|
||||
containerPort: 2112
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: healthz
|
||||
initialDelaySeconds: 10
|
||||
timeoutSeconds: 3
|
||||
periodSeconds: 5
|
||||
failureThreshold: 3
|
||||
- name: liveness-probe
|
||||
image: "{{ template "system_default_registry" . }}{{ .Values.csiController.image.livenessProbe.repository }}:{{ .Values.csiController.image.livenessProbe.tag }}"
|
||||
args:
|
||||
- "--v=4"
|
||||
- "--csi-address=/csi/csi.sock"
|
||||
volumeMounts:
|
||||
- name: socket-dir
|
||||
mountPath: /csi
|
||||
- name: vsphere-syncer
|
||||
image: "{{ template "system_default_registry" . }}{{ .Values.csiController.image.vsphereSyncer.repository }}:{{ .Values.csiController.image.vsphereSyncer.tag }}"
|
||||
args:
|
||||
- "--leader-election"
|
||||
- "--fss-name=internal-feature-states.csi.vsphere.vmware.com"
|
||||
- "--fss-namespace=$(CSI_NAMESPACE)"
|
||||
imagePullPolicy: "Always"
|
||||
ports:
|
||||
- containerPort: 2113
|
||||
name: prometheus
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: FULL_SYNC_INTERVAL_MINUTES
|
||||
value: "30"
|
||||
- name: VSPHERE_CSI_CONFIG
|
||||
value: "/etc/cloud/csi-vsphere.conf"
|
||||
- name: LOGGER_LEVEL
|
||||
value: "PRODUCTION" # Options: DEVELOPMENT, PRODUCTION
|
||||
- name: INCLUSTER_CLIENT_QPS
|
||||
value: "100"
|
||||
- name: INCLUSTER_CLIENT_BURST
|
||||
value: "100"
|
||||
- name: CSI_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
volumeMounts:
|
||||
- mountPath: /etc/cloud
|
||||
name: vsphere-config-volume
|
||||
readOnly: true
|
||||
- name: csi-provisioner
|
||||
image: "{{ template "system_default_registry" . }}{{ .Values.csiController.image.csiProvisioner.repository }}:{{ .Values.csiController.image.csiProvisioner.tag }}"
|
||||
args:
|
||||
- "--v=4"
|
||||
- "--timeout=300s"
|
||||
- "--csi-address=$(ADDRESS)"
|
||||
- "--kube-api-qps=100"
|
||||
- "--kube-api-burst=100"
|
||||
- "--leader-election"
|
||||
- "--default-fstype=ext4"
|
||||
# needed only for topology aware setup
|
||||
#- "--feature-gates=Topology=true"
|
||||
#- "--strict-topology"
|
||||
env:
|
||||
- name: ADDRESS
|
||||
value: /csi/csi.sock
|
||||
volumeMounts:
|
||||
- mountPath: /csi
|
||||
name: socket-dir
|
||||
volumes:
|
||||
- name: vsphere-config-volume
|
||||
secret:
|
||||
secretName: {{ .Values.vCenter.configSecret.name }}
|
||||
- name: socket-dir
|
||||
emptyDir: {}
|
||||
---
|
||||
apiVersion: v1
|
||||
data:
|
||||
"csi-migration": {{ .Values.csiMigration.enabled | quote }}
|
||||
"csi-auth-check": {{ .Values.csiAuthCheck.enabled | quote }}
|
||||
"online-volume-extend": {{ .Values.onlineVolumeExtend.enabled | quote }}
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: internal-feature-states.csi.vsphere.vmware.com
|
||||
namespace: {{ .Release.Namespace }}
|
||||
---
|
||||
apiVersion: storage.k8s.io/v1 # For k8s 1.17 use storage.k8s.io/v1beta1
|
||||
kind: CSIDriver
|
||||
metadata:
|
||||
name: csi.vsphere.vmware.com
|
||||
spec:
|
||||
attachRequired: true
|
||||
podInfoOnMount: false
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: vsphere-csi-controller
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
app: vsphere-csi-controller
|
||||
spec:
|
||||
ports:
|
||||
- name: ctlr
|
||||
port: 2112
|
||||
targetPort: 2112
|
||||
protocol: TCP
|
||||
- name: syncer
|
||||
port: 2113
|
||||
targetPort: 2113
|
||||
protocol: TCP
|
||||
selector:
|
||||
app: vsphere-csi-controller
|
|
@ -1,55 +0,0 @@
|
|||
# Source: https://github.com/kubernetes-sigs/vsphere-csi-driver
|
||||
kind: ServiceAccount
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: vsphere-csi-controller
|
||||
namespace: {{ .Release.Namespace }}
|
||||
---
|
||||
kind: ClusterRole
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: vsphere-csi-controller-role
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes", "persistentvolumeclaims", "pods", "configmaps"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumeclaims/status"]
|
||||
verbs: ["patch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumes"]
|
||||
verbs: ["get", "list", "watch", "create", "update", "delete", "patch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["events"]
|
||||
verbs: ["get", "list", "watch", "create", "update", "patch"]
|
||||
- apiGroups: ["coordination.k8s.io"]
|
||||
resources: ["leases"]
|
||||
verbs: ["get", "watch", "list", "delete", "update", "create"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["storageclasses", "csinodes"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["volumeattachments"]
|
||||
verbs: ["get", "list", "watch", "patch"]
|
||||
- apiGroups: ["cns.vmware.com"]
|
||||
resources: ["cnsvspherevolumemigrations"]
|
||||
verbs: ["create", "get", "list", "watch", "update", "delete"]
|
||||
- apiGroups: ["apiextensions.k8s.io"]
|
||||
resources: ["customresourcedefinitions"]
|
||||
verbs: ["get", "create", "update"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["volumeattachments/status"]
|
||||
verbs: ["patch"]
|
||||
---
|
||||
kind: ClusterRoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: vsphere-csi-controller-binding
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: vsphere-csi-controller
|
||||
namespace: {{ .Release.Namespace }}
|
||||
roleRef:
|
||||
kind: ClusterRole
|
||||
name: vsphere-csi-controller-role
|
||||
apiGroup: rbac.authorization.k8s.io
|
|
@ -1,152 +0,0 @@
|
|||
# Source: https://github.com/kubernetes-sigs/vsphere-csi-driver
|
||||
kind: DaemonSet
|
||||
apiVersion: apps/v1
|
||||
metadata:
|
||||
name: vsphere-csi-node
|
||||
namespace: {{ .Release.Namespace }}
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: vsphere-csi-node
|
||||
updateStrategy:
|
||||
type: "RollingUpdate"
|
||||
rollingUpdate:
|
||||
maxUnavailable: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: vsphere-csi-node
|
||||
role: vsphere-csi
|
||||
spec:
|
||||
serviceAccountName: vsphere-csi-node
|
||||
dnsPolicy: "Default"
|
||||
containers:
|
||||
- name: node-driver-registrar
|
||||
image: "{{ template "system_default_registry" . }}{{ .Values.csiNode.image.nodeDriverRegistrar.repository }}:{{ .Values.csiNode.image.nodeDriverRegistrar.tag }}"
|
||||
args:
|
||||
- "--v=5"
|
||||
- "--csi-address=$(ADDRESS)"
|
||||
- "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)"
|
||||
- "--health-port=9809"
|
||||
env:
|
||||
- name: ADDRESS
|
||||
value: /csi/csi.sock
|
||||
- name: DRIVER_REG_SOCK_PATH
|
||||
value: {{ .Values.csiNode.prefixPath }}/var/lib/kubelet/plugins/csi.vsphere.vmware.com/csi.sock
|
||||
volumeMounts:
|
||||
- name: plugin-dir
|
||||
mountPath: /csi
|
||||
- name: registration-dir
|
||||
mountPath: /registration
|
||||
ports:
|
||||
- containerPort: 9809
|
||||
name: healthz
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: healthz
|
||||
initialDelaySeconds: 5
|
||||
timeoutSeconds: 5
|
||||
- name: vsphere-csi-node
|
||||
image: "{{ template "system_default_registry" . }}{{ .Values.csiNode.image.repository }}:{{ .Values.csiNode.image.tag }}"
|
||||
args:
|
||||
- "--fss-name=internal-feature-states.csi.vsphere.vmware.com"
|
||||
- "--fss-namespace=$(CSI_NAMESPACE)"
|
||||
imagePullPolicy: "Always"
|
||||
env:
|
||||
- name: NODE_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
- name: CSI_ENDPOINT
|
||||
value: unix:///csi/csi.sock
|
||||
- name: X_CSI_MODE
|
||||
value: "node"
|
||||
- name: X_CSI_SPEC_REQ_VALIDATION
|
||||
value: "false"
|
||||
# needed only for topology aware setups
|
||||
#- name: VSPHERE_CSI_CONFIG
|
||||
# value: "/etc/cloud/csi-vsphere.conf" # here csi-vsphere.conf is the name of the file used for creating secret using "--from-file" flag
|
||||
- name: X_CSI_DEBUG
|
||||
value: "true"
|
||||
- name: LOGGER_LEVEL
|
||||
value: "PRODUCTION" # Options: DEVELOPMENT, PRODUCTION
|
||||
- name: CSI_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
securityContext:
|
||||
privileged: true
|
||||
capabilities:
|
||||
add: ["SYS_ADMIN"]
|
||||
allowPrivilegeEscalation: true
|
||||
volumeMounts:
|
||||
# needed only for topology aware setups
|
||||
#- name: vsphere-config-volume
|
||||
# mountPath: /etc/cloud
|
||||
# readOnly: true
|
||||
- name: plugin-dir
|
||||
mountPath: /csi
|
||||
- name: pods-mount-dir
|
||||
mountPath: {{ .Values.csiNode.prefixPath }}/var/lib/kubelet
|
||||
# needed so that any mounts setup inside this container are
|
||||
# propagated back to the host machine.
|
||||
mountPropagation: "Bidirectional"
|
||||
- name: device-dir
|
||||
mountPath: /dev
|
||||
- name: blocks-dir
|
||||
mountPath: /sys/block
|
||||
- name: sys-devices-dir
|
||||
mountPath: /sys/devices
|
||||
ports:
|
||||
- containerPort: 9808
|
||||
name: healthz
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: healthz
|
||||
initialDelaySeconds: 10
|
||||
timeoutSeconds: 5
|
||||
periodSeconds: 5
|
||||
failureThreshold: 3
|
||||
- name: liveness-probe
|
||||
image: "{{ template "system_default_registry" . }}{{ .Values.csiNode.image.livenessProbe.repository }}:{{ .Values.csiNode.image.livenessProbe.tag }}"
|
||||
args:
|
||||
- "--v=4"
|
||||
- "--csi-address=/csi/csi.sock"
|
||||
volumeMounts:
|
||||
- name: plugin-dir
|
||||
mountPath: /csi
|
||||
volumes:
|
||||
# needed only for topology aware setups
|
||||
#- name: vsphere-config-volume
|
||||
# secret:
|
||||
# secretName: vsphere-config-secret
|
||||
- name: registration-dir
|
||||
hostPath:
|
||||
path: {{ .Values.csiNode.prefixPath }}/var/lib/kubelet/plugins_registry
|
||||
type: Directory
|
||||
- name: plugin-dir
|
||||
hostPath:
|
||||
path: {{ .Values.csiNode.prefixPath }}/var/lib/kubelet/plugins/csi.vsphere.vmware.com
|
||||
type: DirectoryOrCreate
|
||||
- name: pods-mount-dir
|
||||
hostPath:
|
||||
path: {{ .Values.csiNode.prefixPath }}/var/lib/kubelet
|
||||
type: Directory
|
||||
- name: device-dir
|
||||
hostPath:
|
||||
path: /dev
|
||||
- name: blocks-dir
|
||||
hostPath:
|
||||
path: /sys/block
|
||||
type: Directory
|
||||
- name: sys-devices-dir
|
||||
hostPath:
|
||||
path: /sys/devices
|
||||
type: Directory
|
||||
tolerations:
|
||||
- effect: NoExecute
|
||||
operator: Exists
|
||||
- effect: NoSchedule
|
||||
operator: Exists
|
|
@ -1,29 +0,0 @@
|
|||
kind: ServiceAccount
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: vsphere-csi-node
|
||||
namespace: {{ .Release.Namespace }}
|
||||
---
|
||||
kind: Role
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: vsphere-csi-node-role
|
||||
namespace: {{ .Release.Namespace }}
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["configmaps"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
---
|
||||
kind: RoleBinding
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
metadata:
|
||||
name: vsphere-csi-node-binding
|
||||
namespace: {{ .Release.Namespace }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: vsphere-csi-node
|
||||
namespace: {{ .Release.Namespace }}
|
||||
roleRef:
|
||||
kind: Role
|
||||
name: vsphere-csi-node-role
|
||||
apiGroup: rbac.authorization.k8s.io
|
|
@ -1,9 +0,0 @@
|
|||
{{- if .Values.vCenter.configSecret.generate -}}
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ .Values.vCenter.configSecret.name }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
data:
|
||||
csi-vsphere.conf: {{ tpl .Values.vCenter.configSecret.configTemplate . | b64enc | quote }}
|
||||
{{- end -}}
|
|
@ -1,16 +0,0 @@
|
|||
{{- if .Values.storageClass.enabled -}}
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: {{ .Values.storageClass.name | quote }}
|
||||
annotations:
|
||||
storageclass.kubernetes.io/is-default-class: {{ .Values.storageClass.isDefault | quote }}
|
||||
provisioner: csi.vsphere.vmware.com
|
||||
parameters:
|
||||
{{- if .Values.storageClass.datastoreURL }}
|
||||
datastoreURL: {{ .Values.storageClass.datastoreURL | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.storageClass.storagePolicyName }}
|
||||
storagepolicyname: {{ .Values.storageClass.storagePolicyName | quote }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
Loading…
Reference in New Issue