parts/k8s/addons/azuredisk-csi-driver-deployment.yaml (1,715 lines of code) (raw):

--- {{/* Source: azuredisk-csi-driver/templates/serviceaccount-csi-azuredisk-controller.yaml */}} apiVersion: v1 kind: ServiceAccount metadata: name: csi-azuredisk-controller-sa namespace: kube-system labels: addonmanager.kubernetes.io/mode: Reconcile --- {{/* Source: azuredisk-csi-driver/templates/serviceaccount-csi-azuredisk-node.yaml */}} apiVersion: v1 kind: ServiceAccount metadata: name: csi-azuredisk-node-sa namespace: kube-system labels: addonmanager.kubernetes.io/mode: Reconcile --- {{/* Source: azuredisk-csi-driver/templates/rbac-csi-azuredisk-controller.yaml */}} kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: name: azuredisk-external-provisioner-role labels: addonmanager.kubernetes.io/mode: Reconcile rules: - apiGroups: [""] resources: ["persistentvolumes"] verbs: ["get", "list", "watch", "create", "delete"] - apiGroups: [""] resources: ["persistentvolumeclaims"] verbs: ["get", "list", "watch", "update"] - apiGroups: ["storage.k8s.io"] resources: ["storageclasses"] verbs: ["get", "list", "watch"] - apiGroups: [""] resources: ["events"] verbs: ["get", "list", "watch", "create", "update", "patch"] - apiGroups: ["storage.k8s.io"] resources: ["csinodes"] verbs: ["get", "list", "watch"] - apiGroups: [""] resources: ["nodes"] verbs: ["get", "list", "watch"] - apiGroups: ["coordination.k8s.io"] resources: ["leases"] verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshots"] verbs: ["get", "list"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshotcontents"] verbs: ["get", "list"] --- {{/* Source: azuredisk-csi-driver/templates/rbac-csi-azuredisk-controller.yaml */}} kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: name: azuredisk-external-attacher-role labels: addonmanager.kubernetes.io/mode: Reconcile rules: - apiGroups: [""] resources: ["persistentvolumes"] verbs: ["get", "list", "watch", "update"] - apiGroups: [""] resources: ["nodes"] verbs: ["get", "list", "watch"] - apiGroups: ["csi.storage.k8s.io"] resources: ["csinodeinfos"] verbs: ["get", "list", "watch"] - apiGroups: ["storage.k8s.io"] resources: ["volumeattachments"] verbs: ["get", "list", "watch", "update", "patch"] - apiGroups: ["storage.k8s.io"] resources: ["volumeattachments/status"] verbs: ["get", "list", "watch", "update", "patch"] - apiGroups: ["coordination.k8s.io"] resources: ["leases"] verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] --- {{/* Source: azuredisk-csi-driver/templates/rbac-csi-azuredisk-controller.yaml */}} kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: name: azuredisk-external-snapshotter-role labels: addonmanager.kubernetes.io/mode: Reconcile rules: - apiGroups: [""] resources: ["events"] verbs: ["list", "watch", "create", "update", "patch"] - apiGroups: [""] resources: ["secrets"] verbs: ["get", "list"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshotclasses"] verbs: ["get", "list", "watch"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshotcontents"] verbs: ["create", "get", "list", "watch", "update", "delete", "patch"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshotcontents/status"] verbs: ["update", "patch"] - apiGroups: ["apiextensions.k8s.io"] resources: ["customresourcedefinitions"] verbs: ["create", "list", "watch", "delete"] - apiGroups: ["coordination.k8s.io"] resources: ["leases"] verbs: ["get", "watch", "list", "delete", "update", "create", "patch"] --- {{/* Source: azuredisk-csi-driver/templates/rbac-csi-azuredisk-controller.yaml */}} kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: name: azuredisk-external-resizer-role namespace: kube-system labels: addonmanager.kubernetes.io/mode: Reconcile rules: - apiGroups: [""] resources: ["persistentvolumes"] verbs: ["get", "list", "watch", "update", "patch"] - apiGroups: [""] resources: ["persistentvolumeclaims"] verbs: ["get", "list", "watch"] - apiGroups: [""] resources: ["persistentvolumeclaims/status"] verbs: ["update", "patch"] - apiGroups: [""] resources: ["events"] verbs: ["list", "watch", "create", "update", "patch"] - apiGroups: ["coordination.k8s.io"] resources: ["leases"] verbs: ["get", "list", "watch", "create", "update", "patch", "delete"] - apiGroups: [""] resources: ["pods"] verbs: ["get", "list", "watch"] --- {{/* Source: azuredisk-csi-driver/templates/rbac-csi-azuredisk-secret.yaml */}} kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: namespace: kube-system name: csi-azuredisk-secret-role labels: addonmanager.kubernetes.io/mode: Reconcile rules: - apiGroups: [""] resources: ["secrets"] verbs: ["get", "list"] --- {{/* Source: azuredisk-csi-driver/templates/rbac-csi-azuredisk-controller.yaml */}} kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: azuredisk-csi-provisioner-binding namespace: kube-system labels: addonmanager.kubernetes.io/mode: Reconcile subjects: - kind: ServiceAccount name: csi-azuredisk-controller-sa namespace: kube-system roleRef: kind: ClusterRole name: azuredisk-external-provisioner-role apiGroup: rbac.authorization.k8s.io --- {{/* Source: azuredisk-csi-driver/templates/rbac-csi-azuredisk-controller.yaml */}} kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: azuredisk-csi-attacher-binding namespace: kube-system labels: addonmanager.kubernetes.io/mode: Reconcile subjects: - kind: ServiceAccount name: csi-azuredisk-controller-sa namespace: kube-system roleRef: kind: ClusterRole name: azuredisk-external-attacher-role apiGroup: rbac.authorization.k8s.io --- {{/* Source: azuredisk-csi-driver/templates/rbac-csi-azuredisk-controller.yaml */}} kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: azuredisk-csi-snapshotter-binding namespace: kube-system labels: addonmanager.kubernetes.io/mode: Reconcile subjects: - kind: ServiceAccount name: csi-azuredisk-controller-sa namespace: kube-system roleRef: kind: ClusterRole name: azuredisk-external-snapshotter-role apiGroup: rbac.authorization.k8s.io --- {{/* Source: azuredisk-csi-driver/templates/rbac-csi-azuredisk-controller.yaml */}} kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: azuredisk-csi-resizer-role namespace: kube-system labels: addonmanager.kubernetes.io/mode: Reconcile subjects: - kind: ServiceAccount name: csi-azuredisk-controller-sa namespace: kube-system roleRef: kind: ClusterRole name: azuredisk-external-resizer-role apiGroup: rbac.authorization.k8s.io --- {{/* Source: azuredisk-csi-driver/templates/rbac-csi-azuredisk-secret.yaml */}} kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: csi-azuredisk-secret-binding namespace: kube-system labels: addonmanager.kubernetes.io/mode: Reconcile subjects: - kind: ServiceAccount name: csi-azuredisk-controller-sa namespace: kube-system - kind: ServiceAccount name: csi-azuredisk-node-sa namespace: kube-system roleRef: kind: ClusterRole name: csi-azuredisk-secret-role apiGroup: rbac.authorization.k8s.io {{if and (IsKubernetesVersionGe "1.18.0") HasWindows}} --- {{/* Source: azuredisk-csi-driver/templates/csi-azuredisk-node-windows.yaml */}} kind: DaemonSet apiVersion: apps/v1 metadata: name: csi-azuredisk-node-windows namespace: kube-system labels: addonmanager.kubernetes.io/mode: Reconcile spec: updateStrategy: type: RollingUpdate rollingUpdate: maxUnavailable: 50% selector: matchLabels: app: csi-azuredisk-node-windows template: metadata: labels: app: csi-azuredisk-node-windows spec: serviceAccountName: csi-azuredisk-node-sa nodeSelector: kubernetes.io/os: windows priorityClassName: system-node-critical {{- if IsKubernetesVersionGe "1.27.0"}} securityContext: seccompProfile: type: RuntimeDefault {{- end}} tolerations: - key: "node.kubernetes.io/os" operator: "Exists" effect: "NoSchedule" containers: - name: liveness-probe volumeMounts: - mountPath: C:\csi name: plugin-dir image: {{ContainerImage "livenessprobe-windows"}} args: - "--csi-address=$(CSI_ENDPOINT)" - "--probe-timeout=3s" - "--health-port=29603" - "--v=2" env: - name: CSI_ENDPOINT value: unix://C:\\csi\\csi.sock resources: limits: cpu: {{ContainerCPULimits "livenessprobe-windows"}} memory: {{ContainerMemLimits "livenessprobe-windows"}} requests: cpu: {{ContainerCPUReqs "livenessprobe-windows"}} memory: {{ContainerMemReqs "livenessprobe-windows"}} - name: node-driver-registrar image: {{ContainerImage "csi-node-driver-registrar-windows"}} args: - "--v=2" - "--csi-address=$(CSI_ENDPOINT)" - "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)" livenessProbe: exec: command: - /csi-node-driver-registrar.exe - --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH) - --mode=kubelet-registration-probe initialDelaySeconds: 60 timeoutSeconds: 30 env: - name: CSI_ENDPOINT value: unix://C:\\csi\\csi.sock - name: DRIVER_REG_SOCK_PATH value: C:\\var\\lib\\kubelet\\plugins\\disk.csi.azure.com\\csi.sock - name: KUBE_NODE_NAME valueFrom: fieldRef: fieldPath: spec.nodeName volumeMounts: - name: kubelet-dir mountPath: "C:\\var\\lib\\kubelet" - name: plugin-dir mountPath: C:\csi - name: registration-dir mountPath: C:\registration resources: limits: cpu: {{ContainerCPULimits "csi-node-driver-registrar-windows"}} memory: {{ContainerMemLimits "csi-node-driver-registrar-windows"}} requests: cpu: {{ContainerCPUReqs "csi-node-driver-registrar-windows"}} memory: {{ContainerMemReqs "csi-node-driver-registrar-windows"}} - name: azuredisk image: {{ContainerImage "azuredisk-csi"}} args: - "--v=5" - "--endpoint=$(CSI_ENDPOINT)" - "--nodeid=$(KUBE_NODE_NAME)" {{- if not (IsKubernetesVersionGe "1.27.0")}} - "--metrics-address=0.0.0.0:29605" {{- end}} - "--user-agent-suffix=aks-engine" - "--support-zone=false" - "--get-node-info-from-labels=true" {{- if IsKubernetesVersionGe "1.27.0"}} - "--get-nodeid-from-imds=false" {{- end}} ports: - containerPort: 29603 name: healthz protocol: TCP livenessProbe: failureThreshold: 5 httpGet: path: /healthz port: healthz initialDelaySeconds: 30 timeoutSeconds: 10 periodSeconds: 30 env: - name: AZURE_CREDENTIAL_FILE value: "C:\\k\\azure.json" - name: CSI_ENDPOINT value: unix://C:\\csi\\csi.sock - name: KUBE_NODE_NAME valueFrom: fieldRef: apiVersion: v1 fieldPath: spec.nodeName {{- if IsAzureStackCloud}} - name: AZURE_ENVIRONMENT_FILEPATH value: C:\k\azurestackcloud.json {{end}} volumeMounts: - name: kubelet-dir mountPath: "C:\\var\\lib\\kubelet" - name: plugin-dir mountPath: C:\csi - name: azure-config mountPath: C:\k - name: csi-proxy-fs-pipe-v1 mountPath: \\.\pipe\csi-proxy-filesystem-v1 - name: csi-proxy-disk-pipe-v1 mountPath: \\.\pipe\csi-proxy-disk-v1 - name: csi-proxy-volume-pipe-v1 mountPath: \\.\pipe\csi-proxy-volume-v1 # these paths are still included for compatibility, they're used # only if the node has still the beta version of the CSI proxy - name: csi-proxy-fs-pipe-v1beta1 mountPath: \\.\pipe\csi-proxy-filesystem-v1beta1 - name: csi-proxy-disk-pipe-v1beta2 mountPath: \\.\pipe\csi-proxy-disk-v1beta2 - name: csi-proxy-volume-pipe-v1beta2 mountPath: \\.\pipe\csi-proxy-volume-v1beta2 resources: limits: cpu: {{ContainerCPULimits "azuredisk-csi"}} memory: {{ContainerMemLimits "azuredisk-csi"}} requests: cpu: {{ContainerCPUReqs "azuredisk-csi"}} memory: {{ContainerMemReqs "azuredisk-csi"}} volumes: - name: csi-proxy-fs-pipe-v1 hostPath: path: \\.\pipe\csi-proxy-filesystem-v1 - name: csi-proxy-disk-pipe-v1 hostPath: path: \\.\pipe\csi-proxy-disk-v1 - name: csi-proxy-volume-pipe-v1 hostPath: path: \\.\pipe\csi-proxy-volume-v1 # these paths are still included for compatibility, they're used # only if the node has still the beta version of the CSI proxy - name: csi-proxy-fs-pipe-v1beta1 hostPath: path: \\.\pipe\csi-proxy-filesystem-v1beta1 - name: csi-proxy-disk-pipe-v1beta2 hostPath: path: \\.\pipe\csi-proxy-disk-v1beta2 - name: csi-proxy-volume-pipe-v1beta2 hostPath: path: \\.\pipe\csi-proxy-volume-v1beta2 - name: registration-dir hostPath: path: C:\var\lib\kubelet\plugins_registry\ type: Directory - name: kubelet-dir hostPath: path: C:\var\lib\kubelet\ type: Directory - name: plugin-dir hostPath: path: C:\var\lib\kubelet\plugins\disk.csi.azure.com\ type: DirectoryOrCreate - name: azure-config hostPath: path: C:\k type: DirectoryOrCreate {{end}} {{if HasLinux}} --- {{/* Source: azuredisk-csi-driver/templates/csi-azuredisk-node.yaml */}} kind: DaemonSet apiVersion: apps/v1 metadata: name: csi-azuredisk-node namespace: kube-system labels: addonmanager.kubernetes.io/mode: Reconcile spec: updateStrategy: type: RollingUpdate rollingUpdate: maxUnavailable: 50% selector: matchLabels: app: csi-azuredisk-node template: metadata: labels: app: csi-azuredisk-node spec: hostNetwork: true dnsPolicy: Default serviceAccountName: csi-azuredisk-node-sa nodeSelector: kubernetes.io/os: linux priorityClassName: system-node-critical {{- if IsKubernetesVersionGe "1.27.0"}} securityContext: seccompProfile: type: RuntimeDefault {{- end}} tolerations: - operator: "Exists" containers: - name: liveness-probe volumeMounts: - mountPath: /csi name: socket-dir image: {{ContainerImage "livenessprobe"}} args: - --csi-address=/csi/csi.sock - --probe-timeout=3s - --health-port=29603 - --v=2 resources: limits: cpu: {{ContainerCPULimits "livenessprobe"}} memory: {{ContainerMemLimits "livenessprobe"}} requests: cpu: {{ContainerCPUReqs "livenessprobe"}} memory: {{ContainerMemReqs "livenessprobe"}} - name: node-driver-registrar image: {{ContainerImage "csi-node-driver-registrar"}} args: - --csi-address=$(ADDRESS) - --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH) - --v=2 livenessProbe: exec: command: - /csi-node-driver-registrar - --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH) - --mode=kubelet-registration-probe initialDelaySeconds: 30 timeoutSeconds: 15 env: - name: ADDRESS value: /csi/csi.sock - name: DRIVER_REG_SOCK_PATH value: /var/lib/kubelet/plugins/disk.csi.azure.com/csi.sock volumeMounts: - name: socket-dir mountPath: /csi - name: registration-dir mountPath: /registration resources: limits: cpu: {{ContainerCPULimits "csi-node-driver-registrar"}} memory: {{ContainerMemLimits "csi-node-driver-registrar"}} requests: cpu: {{ContainerCPUReqs "csi-node-driver-registrar"}} memory: {{ContainerMemReqs "csi-node-driver-registrar"}} - name: azuredisk image: {{ContainerImage "azuredisk-csi"}} args: - "--v=5" - "--endpoint=$(CSI_ENDPOINT)" - "--nodeid=$(KUBE_NODE_NAME)" - "--metrics-address=0.0.0.0:29605" - "--enable-perf-optimization=true" - "--user-agent-suffix=aks-engine" - "--support-zone=false" - "--get-node-info-from-labels=true" {{- if IsKubernetesVersionGe "1.27.0"}} - "--get-nodeid-from-imds=false" {{- end}} ports: - containerPort: 29603 name: healthz protocol: TCP livenessProbe: failureThreshold: 5 httpGet: path: /healthz port: healthz initialDelaySeconds: 30 timeoutSeconds: 10 periodSeconds: 30 env: - name: AZURE_CREDENTIAL_FILE value: "/etc/kubernetes/azure.json" - name: CSI_ENDPOINT value: unix:///csi/csi.sock - name: KUBE_NODE_NAME valueFrom: fieldRef: apiVersion: v1 fieldPath: spec.nodeName {{- if IsAzureStackCloud}} - name: AZURE_ENVIRONMENT_FILEPATH value: /etc/kubernetes/azurestackcloud.json {{end}} securityContext: privileged: true volumeMounts: - mountPath: /csi name: socket-dir - mountPath: /var/lib/kubelet/ mountPropagation: Bidirectional name: mountpoint-dir - mountPath: /etc/kubernetes/ name: azure-cred - mountPath: /dev name: device-dir - mountPath: /sys/bus/scsi/devices name: sys-devices-dir - mountPath: /sys/class/ name: sys-class {{- if IsAzureStackCloud}} - mountPath: /etc/ssl/certs readOnly: true name: ssl {{end}} resources: limits: cpu: {{ContainerCPULimits "azuredisk-csi"}} memory: {{ContainerMemLimits "azuredisk-csi"}} requests: cpu: {{ContainerCPUReqs "azuredisk-csi"}} memory: {{ContainerMemReqs "azuredisk-csi"}} volumes: - hostPath: path: /var/lib/kubelet/plugins/disk.csi.azure.com type: DirectoryOrCreate name: socket-dir - hostPath: path: /var/lib/kubelet/ type: DirectoryOrCreate name: mountpoint-dir - hostPath: path: /var/lib/kubelet/plugins_registry/ type: DirectoryOrCreate name: registration-dir - hostPath: path: /etc/kubernetes/ type: DirectoryOrCreate name: azure-cred - hostPath: path: /dev type: Directory name: device-dir - hostPath: path: /sys/bus/scsi/devices type: Directory name: sys-devices-dir - hostPath: path: /sys/class/ type: Directory name: sys-class {{- if IsAzureStackCloud}} - hostPath: path: /etc/ssl/certs type: Directory name: ssl {{end}} {{end}} --- {{/* Source: azuredisk-csi-driver/templates/csi-azuredisk-controller.yaml */}} kind: Deployment apiVersion: apps/v1 metadata: name: csi-azuredisk-controller namespace: kube-system labels: addonmanager.kubernetes.io/mode: Reconcile spec: replicas: {{CSIControllerReplicas}} selector: matchLabels: app: csi-azuredisk-controller template: metadata: labels: app: csi-azuredisk-controller spec: hostNetwork: true serviceAccountName: csi-azuredisk-controller-sa nodeSelector: kubernetes.io/os: linux node-role.kubernetes.io/master: "" priorityClassName: system-cluster-critical {{- if IsKubernetesVersionGe "1.27.0"}} securityContext: seccompProfile: type: RuntimeDefault {{- end}} tolerations: - key: "node-role.kubernetes.io/master" operator: "Exists" effect: "NoSchedule" - key: "node-role.kubernetes.io/control-plane" operator: "Exists" effect: "NoSchedule" - key: "node-role.kubernetes.io/controlplane" operator: "Exists" effect: "NoSchedule" containers: - name: csi-provisioner image: {{ContainerImage "csi-provisioner"}} args: {{- if IsKubernetesVersionGe "1.28.0"}} - "--feature-gates=Topology=true,HonorPVReclaimPolicy=true" {{- else }} - "--feature-gates=Topology=true" {{- end}} - "--csi-address=$(ADDRESS)" - "--v=2" - "--timeout=30s" - "--leader-election" - "--leader-election-namespace=kube-system" - "--worker-threads=40" - "--extra-create-metadata=true" - "--strict-topology=true" - "--kube-api-qps=50" - "--kube-api-burst=100" env: - name: ADDRESS value: /csi/csi.sock volumeMounts: - mountPath: /csi name: socket-dir resources: limits: cpu: {{ContainerCPULimits "csi-provisioner"}} memory: {{ContainerMemLimits "csi-provisioner"}} requests: cpu: {{ContainerCPUReqs "csi-provisioner"}} memory: {{ContainerMemReqs "csi-provisioner"}} - name: csi-attacher image: {{ContainerImage "csi-attacher"}} args: - "-v=2" - "-csi-address=$(ADDRESS)" - "-timeout=1200s" - "-leader-election" - "--leader-election-namespace=kube-system" {{- if IsKubernetesVersionGe "1.27.0"}} - "-worker-threads=1000" - "-kube-api-qps=200" - "-kube-api-burst=400" {{- end}} {{- if not (IsKubernetesVersionGe "1.27.0")}} - "-worker-threads=500" - "-kube-api-qps=50" - "-kube-api-burst=100" {{- end}} env: - name: ADDRESS value: /csi/csi.sock volumeMounts: - mountPath: /csi name: socket-dir resources: limits: cpu: {{ContainerCPULimits "csi-attacher"}} memory: {{ContainerMemLimits "csi-attacher"}} requests: cpu: {{ContainerCPUReqs "csi-attacher"}} memory: {{ContainerMemReqs "csi-attacher"}} {{if ShouldEnableCSISnapshotFeature "azuredisk-csi-driver"}} - name: csi-snapshotter image: {{ContainerImage "csi-snapshotter"}} args: - "-csi-address=$(ADDRESS)" - "-leader-election" - "--leader-election-namespace=kube-system" - "-v=2" env: - name: ADDRESS value: /csi/csi.sock volumeMounts: - name: socket-dir mountPath: /csi resources: limits: cpu: {{ContainerCPULimits "csi-snapshotter"}} memory: {{ContainerMemLimits "csi-snapshotter"}} requests: cpu: {{ContainerCPUReqs "csi-snapshotter"}} memory: {{ContainerMemReqs "csi-snapshotter"}} {{end}} - name: csi-resizer image: {{ContainerImage "csi-resizer"}} args: - "-csi-address=$(ADDRESS)" - "-v=2" - "-leader-election" - "--leader-election-namespace=kube-system" - '-handle-volume-inuse-error=false' - '-feature-gates=RecoverVolumeExpansionFailure=true' - '-timeout=240s' env: - name: ADDRESS value: /csi/csi.sock volumeMounts: - name: socket-dir mountPath: /csi resources: limits: cpu: {{ContainerCPULimits "csi-resizer"}} memory: {{ContainerMemLimits "csi-resizer"}} requests: cpu: {{ContainerCPUReqs "csi-resizer"}} memory: {{ContainerMemReqs "csi-resizer"}} - name: liveness-probe image: {{ContainerImage "livenessprobe"}} args: - --csi-address=/csi/csi.sock - --probe-timeout=3s - --health-port=29602 - --v=2 volumeMounts: - name: socket-dir mountPath: /csi resources: limits: cpu: {{ContainerCPULimits "livenessprobe"}} memory: {{ContainerMemLimits "livenessprobe"}} requests: cpu: {{ContainerCPUReqs "livenessprobe"}} memory: {{ContainerMemReqs "livenessprobe"}} - name: azuredisk image: {{ContainerImage "azuredisk-csi"}} args: - "--v=5" - "--endpoint=$(CSI_ENDPOINT)" - "--metrics-address=0.0.0.0:29604" - "--user-agent-suffix=aks-engine" - "--vmss-cache-ttl-seconds=-1" {{- if IsKubernetesVersionGe "1.27.0"}} - "--enable-traffic-manager=false" - "--traffic-manager-port=7788" {{- end}} ports: - containerPort: 29602 name: healthz protocol: TCP - containerPort: 29604 name: metrics protocol: TCP livenessProbe: failureThreshold: 5 httpGet: path: /healthz port: healthz initialDelaySeconds: 30 timeoutSeconds: 10 periodSeconds: 30 env: - name: AZURE_CREDENTIAL_FILE value: "/etc/kubernetes/azure.json" - name: CSI_ENDPOINT value: unix:///csi/csi.sock {{- if IsAzureStackCloud}} - name: AZURE_ENVIRONMENT_FILEPATH value: /etc/kubernetes/azurestackcloud.json {{end}} volumeMounts: - mountPath: /csi name: socket-dir - mountPath: /etc/kubernetes/ name: azure-cred {{- if IsAzureStackCloud}} - mountPath: /etc/ssl/certs readOnly: true name: ssl {{end}} resources: limits: cpu: {{ContainerCPULimits "azuredisk-csi"}} memory: {{ContainerMemLimits "azuredisk-csi"}} requests: cpu: {{ContainerCPUReqs "azuredisk-csi"}} memory: {{ContainerMemReqs "azuredisk-csi"}} volumes: - name: socket-dir emptyDir: {} - name: azure-cred hostPath: path: /etc/kubernetes/ type: DirectoryOrCreate {{- if IsAzureStackCloud}} - hostPath: path: /etc/ssl/certs type: Directory name: ssl {{end}} {{if ShouldEnableCSISnapshotFeature "azuredisk-csi-driver"}} --- {{/* Source: azuredisk-csi-driver/templates/csi-snapshot-controller.yaml */}} kind: Deployment apiVersion: apps/v1 metadata: name: csi-snapshot-controller namespace: kube-system labels: addonmanager.kubernetes.io/mode: Reconcile spec: replicas: 1 selector: matchLabels: app: csi-snapshot-controller {{- if IsKubernetesVersionGe "1.27.0"}} # the snapshot controller won't be marked as ready if the v1 CRDs are unavailable # in #504 the snapshot-controller will exit after around 7.5 seconds if it # can't find the v1 CRDs so this value should be greater than that minReadySeconds: 15 strategy: rollingUpdate: maxSurge: 0 maxUnavailable: 1 type: RollingUpdate {{- end}} template: metadata: labels: app: csi-snapshot-controller spec: serviceAccountName: csi-snapshot-controller-sa nodeSelector: kubernetes.io/os: linux kubernetes.io/role: master priorityClassName: system-cluster-critical {{- if IsKubernetesVersionGe "1.27.0"}} securityContext: seccompProfile: type: RuntimeDefault {{- end}} tolerations: - key: "node-role.kubernetes.io/master" operator: "Exists" effect: "NoSchedule" - key: "node-role.kubernetes.io/control-plane" operator: "Exists" effect: "NoSchedule" - key: "node-role.kubernetes.io/controlplane" operator: "Equal" value: "true" effect: "NoSchedule" containers: - name: csi-snapshot-controller image: {{ContainerImage "csi-snapshot-controller"}} args: - "--v=2" - "--leader-election=false" - "--leader-election-namespace=kube-system" resources: limits: cpu: {{ContainerCPULimits "csi-snapshot-controller"}} memory: {{ContainerMemLimits "csi-snapshot-controller"}} requests: cpu: {{ContainerCPUReqs "csi-snapshot-controller"}} memory: {{ContainerMemReqs "csi-snapshot-controller"}} --- {{/* Source: azuredisk-csi-driver/templates/rbac-csi-snapshot-controller.yaml */}} kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: name: csi-snapshot-controller-role labels: addonmanager.kubernetes.io/mode: Reconcile rules: - apiGroups: [""] resources: ["persistentvolumes"] verbs: ["get", "list", "watch"] - apiGroups: [""] resources: ["persistentvolumeclaims"] verbs: ["get", "list", "watch", "update"] - apiGroups: ["storage.k8s.io"] resources: ["storageclasses"] verbs: ["get", "list", "watch"] - apiGroups: [""] resources: ["events"] verbs: ["list", "watch", "create", "update", "patch"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshotclasses"] verbs: ["get", "list", "watch"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshotcontents"] verbs: ["create", "get", "list", "watch", "update", "delete", "patch"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshotcontents/status"] verbs: ["patch"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshots"] verbs: ["get", "list", "watch", "update", "patch"] - apiGroups: ["snapshot.storage.k8s.io"] resources: ["volumesnapshots/status"] verbs: ["update", "patch"] --- {{/* Source: azuredisk-csi-driver/templates/rbac-csi-snapshot-controller.yaml */}} kind: ClusterRole apiVersion: rbac.authorization.k8s.io/v1 metadata: namespace: kube-system name: csi-snapshot-controller-leaderelection-role labels: addonmanager.kubernetes.io/mode: Reconcile rules: - apiGroups: ["coordination.k8s.io"] resources: ["leases"] verbs: ["get", "watch", "list", "delete", "update", "create", "patch"] --- {{/* Source: azuredisk-csi-driver/templates/rbac-csi-snapshot-controller.yaml */}} kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: csi-snapshot-controller-binding labels: addonmanager.kubernetes.io/mode: Reconcile subjects: - kind: ServiceAccount name: csi-snapshot-controller-sa namespace: kube-system roleRef: kind: ClusterRole name: csi-snapshot-controller-role apiGroup: rbac.authorization.k8s.io --- {{/* Source: azuredisk-csi-driver/templates/rbac-csi-snapshot-controller.yaml */}} kind: ClusterRoleBinding apiVersion: rbac.authorization.k8s.io/v1 metadata: name: csi-snapshot-controller-leaderelection-binding namespace: kube-system labels: addonmanager.kubernetes.io/mode: Reconcile subjects: - kind: ServiceAccount name: csi-snapshot-controller-sa namespace: kube-system roleRef: kind: ClusterRole name: csi-snapshot-controller-leaderelection-role apiGroup: rbac.authorization.k8s.io --- {{/* Source: azuredisk-csi-driver/templates/crd-csi-snapshot.yaml */}} apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: {{- if IsKubernetesVersionGe "1.27.0"}} controller-gen.kubebuilder.io/version: v0.8.0 api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/665" {{- end}} {{- if not (IsKubernetesVersionGe "1.27.0")}} controller-gen.kubebuilder.io/version: v0.4.0 api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/419" {{- end}} labels: addonmanager.kubernetes.io/mode: Reconcile creationTimestamp: null name: volumesnapshots.snapshot.storage.k8s.io spec: group: snapshot.storage.k8s.io names: kind: VolumeSnapshot listKind: VolumeSnapshotList plural: volumesnapshots shortNames: - vs singular: volumesnapshot scope: Namespaced versions: - additionalPrinterColumns: - description: Indicates if the snapshot is ready to be used to restore a volume. jsonPath: .status.readyToUse name: ReadyToUse type: boolean - description: If a new snapshot needs to be created, this contains the name of the source PVC from which this snapshot was (or will be) created. jsonPath: .spec.source.persistentVolumeClaimName name: SourcePVC type: string - description: If a snapshot already exists, this contains the name of the existing VolumeSnapshotContent object representing the existing snapshot. jsonPath: .spec.source.volumeSnapshotContentName name: SourceSnapshotContent type: string - description: Represents the minimum size of volume required to rehydrate from this snapshot. jsonPath: .status.restoreSize name: RestoreSize type: string - description: The name of the VolumeSnapshotClass requested by the VolumeSnapshot. jsonPath: .spec.volumeSnapshotClassName name: SnapshotClass type: string - description: Name of the VolumeSnapshotContent object to which the VolumeSnapshot object intends to bind to. Please note that verification of binding actually requires checking both VolumeSnapshot and VolumeSnapshotContent to ensure both are pointing at each other. Binding MUST be verified prior to usage of this object. jsonPath: .status.boundVolumeSnapshotContentName name: SnapshotContent type: string - description: Timestamp when the point-in-time snapshot was taken by the underlying storage system. jsonPath: .status.creationTime name: CreationTime type: date - jsonPath: .metadata.creationTimestamp name: Age type: date name: v1 schema: openAPIV3Schema: description: VolumeSnapshot is a user's request for either creating a point-in-time snapshot of a persistent volume, or binding to a pre-existing snapshot. properties: apiVersion: description: 'More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: description: 'More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string spec: description: 'More info: https://kubernetes.io/docs/concepts/storage/volume-snapshots#volumesnapshots Required.' properties: source: description: source specifies where a snapshot will be created from. This field is immutable after creation. Required. properties: persistentVolumeClaimName: description: persistentVolumeClaimName specifies the name of the PersistentVolumeClaim object representing the volume from which a snapshot should be created. This PVC is assumed to be in the same namespace as the VolumeSnapshot object. This field should be set if the snapshot does not exists, and needs to be created. This field is immutable. type: string volumeSnapshotContentName: description: volumeSnapshotContentName specifies the name of a pre-existing VolumeSnapshotContent object representing an existing volume snapshot. This field should be set if the snapshot already exists and only needs a representation in Kubernetes. This field is immutable. type: string type: object oneOf: - required: ["persistentVolumeClaimName"] - required: ["volumeSnapshotContentName"] volumeSnapshotClassName: description: 'VolumeSnapshotClassName is the name of the VolumeSnapshotClass requested by the VolumeSnapshot. VolumeSnapshotClassName may be left nil to indicate that the default SnapshotClass should be used. A given cluster may have multiple default Volume SnapshotClasses: one default per CSI Driver. If a VolumeSnapshot does not specify a SnapshotClass, VolumeSnapshotSource will be checked to figure out what the associated CSI Driver is, and the default VolumeSnapshotClass associated with that CSI Driver will be used. If more than one VolumeSnapshotClass exist for a given CSI Driver and more than one have been marked as default, CreateSnapshot will fail and generate an event. Empty string is not allowed for this field.' type: string required: - source type: object status: description: status represents the current information of a snapshot. Consumers must verify binding between VolumeSnapshot and VolumeSnapshotContent objects is successful (by validating that both VolumeSnapshot and VolumeSnapshotContent point at each other) before using this object. properties: boundVolumeSnapshotContentName: description: 'boundVolumeSnapshotContentName is the name of the VolumeSnapshotContent object to which this VolumeSnapshot object intends to bind to. If not specified, it indicates that the VolumeSnapshot object has not been successfully bound to a VolumeSnapshotContent object yet. NOTE: To avoid possible security issues, consumers must verify binding between VolumeSnapshot and VolumeSnapshotContent objects is successful (by validating that both VolumeSnapshot and VolumeSnapshotContent point at each other) before using this object.' type: string creationTime: description: creationTime is the timestamp when the point-in-time snapshot is taken by the underlying storage system. In dynamic snapshot creation case, this field will be filled in by the snapshot controller with the "creation_time" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "creation_time" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. If not specified, it may indicate that the creation time of the snapshot is unknown. format: date-time type: string error: description: error is the last observed error during snapshot creation, if any. This field could be helpful to upper level controllers(i.e., application controller) to decide whether they should continue on waiting for the snapshot to be created based on the type of error reported. The snapshot controller will keep retrying when an error occurrs during the snapshot creation. Upon success, this error field will be cleared. properties: message: description: 'message is a string detailing the encountered error during snapshot creation if specified. NOTE: message may be logged, and it should not contain sensitive information.' type: string time: description: time is the timestamp when the error was encountered. format: date-time type: string type: object readyToUse: description: readyToUse indicates if the snapshot is ready to be used to restore a volume. In dynamic snapshot creation case, this field will be filled in by the snapshot controller with the "ready_to_use" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "ready_to_use" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it, otherwise, this field will be set to "True". If not specified, it means the readiness of a snapshot is unknown. type: boolean restoreSize: type: string description: restoreSize represents the minimum size of volume required to create a volume from this snapshot. In dynamic snapshot creation case, this field will be filled in by the snapshot controller with the "size_bytes" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "size_bytes" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. When restoring a volume from this snapshot, the size of the volume MUST NOT be smaller than the restoreSize if it is specified, otherwise the restoration will fail. If not specified, it indicates that the size is unknown. pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object required: - spec type: object served: true storage: true subresources: status: {} - additionalPrinterColumns: - description: Indicates if the snapshot is ready to be used to restore a volume. jsonPath: .status.readyToUse name: ReadyToUse type: boolean - description: If a new snapshot needs to be created, this contains the name of the source PVC from which this snapshot was (or will be) created. jsonPath: .spec.source.persistentVolumeClaimName name: SourcePVC type: string - description: If a snapshot already exists, this contains the name of the existing VolumeSnapshotContent object representing the existing snapshot. jsonPath: .spec.source.volumeSnapshotContentName name: SourceSnapshotContent type: string - description: Represents the minimum size of volume required to rehydrate from this snapshot. jsonPath: .status.restoreSize name: RestoreSize type: string - description: The name of the VolumeSnapshotClass requested by the VolumeSnapshot. jsonPath: .spec.volumeSnapshotClassName name: SnapshotClass type: string - description: Name of the VolumeSnapshotContent object to which the VolumeSnapshot object intends to bind to. Please note that verification of binding actually requires checking both VolumeSnapshot and VolumeSnapshotContent to ensure both are pointing at each other. Binding MUST be verified prior to usage of this object. jsonPath: .status.boundVolumeSnapshotContentName name: SnapshotContent type: string - description: Timestamp when the point-in-time snapshot was taken by the underlying storage system. jsonPath: .status.creationTime name: CreationTime type: date - jsonPath: .metadata.creationTimestamp name: Age type: date name: v1beta1 # This indicates the v1beta1 version of the custom resource is deprecated. # API requests to this version receive a warning in the server response. deprecated: true # This overrides the default warning returned to clients making v1beta1 API requests. deprecationWarning: "snapshot.storage.k8s.io/v1beta1 VolumeSnapshot is deprecated; use snapshot.storage.k8s.io/v1 VolumeSnapshot" schema: openAPIV3Schema: description: VolumeSnapshot is a user's request for either creating a point-in-time snapshot of a persistent volume, or binding to a pre-existing snapshot. properties: apiVersion: description: 'More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: description: 'More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string spec: description: 'More info: https://kubernetes.io/docs/concepts/storage/volume-snapshots#volumesnapshots Required.' properties: source: description: source specifies where a snapshot will be created from. This field is immutable after creation. Required. properties: persistentVolumeClaimName: description: persistentVolumeClaimName specifies the name of the PersistentVolumeClaim object representing the volume from which a snapshot should be created. This PVC is assumed to be in the same namespace as the VolumeSnapshot object. This field should be set if the snapshot does not exists, and needs to be created. This field is immutable. type: string volumeSnapshotContentName: description: volumeSnapshotContentName specifies the name of a pre-existing VolumeSnapshotContent object representing an existing volume snapshot. This field should be set if the snapshot already exists and only needs a representation in Kubernetes. This field is immutable. type: string type: object volumeSnapshotClassName: description: 'VolumeSnapshotClassName is the name of the VolumeSnapshotClass requested by the VolumeSnapshot. VolumeSnapshotClassName may be left nil to indicate that the default SnapshotClass should be used. A given cluster may have multiple default Volume SnapshotClasses: one default per CSI Driver. If a VolumeSnapshot does not specify a SnapshotClass, VolumeSnapshotSource will be checked to figure out what the associated CSI Driver is, and the default VolumeSnapshotClass associated with that CSI Driver will be used. If more than one VolumeSnapshotClass exist for a given CSI Driver and more than one have been marked as default, CreateSnapshot will fail and generate an event. Empty string is not allowed for this field.' type: string required: - source type: object status: description: status represents the current information of a snapshot. Consumers must verify binding between VolumeSnapshot and VolumeSnapshotContent objects is successful (by validating that both VolumeSnapshot and VolumeSnapshotContent point at each other) before using this object. properties: boundVolumeSnapshotContentName: description: 'boundVolumeSnapshotContentName is the name of the VolumeSnapshotContent object to which this VolumeSnapshot object intends to bind to. If not specified, it indicates that the VolumeSnapshot object has not been successfully bound to a VolumeSnapshotContent object yet. NOTE: To avoid possible security issues, consumers must verify binding between VolumeSnapshot and VolumeSnapshotContent objects is successful (by validating that both VolumeSnapshot and VolumeSnapshotContent point at each other) before using this object.' type: string creationTime: description: creationTime is the timestamp when the point-in-time snapshot is taken by the underlying storage system. In dynamic snapshot creation case, this field will be filled in by the snapshot controller with the "creation_time" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "creation_time" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. If not specified, it may indicate that the creation time of the snapshot is unknown. format: date-time type: string error: description: error is the last observed error during snapshot creation, if any. This field could be helpful to upper level controllers(i.e., application controller) to decide whether they should continue on waiting for the snapshot to be created based on the type of error reported. The snapshot controller will keep retrying when an error occurs during the snapshot creation. Upon success, this error field will be cleared. properties: message: description: 'message is a string detailing the encountered error during snapshot creation if specified. NOTE: message may be logged, and it should not contain sensitive information.' type: string time: description: time is the timestamp when the error was encountered. format: date-time type: string type: object readyToUse: description: readyToUse indicates if the snapshot is ready to be used to restore a volume. In dynamic snapshot creation case, this field will be filled in by the snapshot controller with the "ready_to_use" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "ready_to_use" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it, otherwise, this field will be set to "True". If not specified, it means the readiness of a snapshot is unknown. type: boolean restoreSize: type: string description: restoreSize represents the minimum size of volume required to create a volume from this snapshot. In dynamic snapshot creation case, this field will be filled in by the snapshot controller with the "size_bytes" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "size_bytes" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. When restoring a volume from this snapshot, the size of the volume MUST NOT be smaller than the restoreSize if it is specified, otherwise the restoration will fail. If not specified, it indicates that the size is unknown. pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object required: - spec type: object {{- if IsKubernetesVersionGe "1.27.0"}} served: false {{- end}} {{- if not (IsKubernetesVersionGe "1.27.0")}} served: true {{- end}} storage: false subresources: status: {} status: acceptedNames: kind: "" plural: "" conditions: [] storedVersions: [] --- {{/* Source: azuredisk-csi-driver/templates/crd-csi-snapshot.yaml */}} apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: {{- if IsKubernetesVersionGe "1.27.0"}} controller-gen.kubebuilder.io/version: v0.8.0 api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/665" {{- end}} {{- if not (IsKubernetesVersionGe "1.27.0")}} controller-gen.kubebuilder.io/version: v0.4.0 api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/419" {{- end}} labels: addonmanager.kubernetes.io/mode: Reconcile creationTimestamp: null name: volumesnapshotclasses.snapshot.storage.k8s.io spec: group: snapshot.storage.k8s.io names: kind: VolumeSnapshotClass listKind: VolumeSnapshotClassList plural: volumesnapshotclasses shortNames: - vsclass - vsclasses singular: volumesnapshotclass scope: Cluster versions: - additionalPrinterColumns: - jsonPath: .driver name: Driver type: string - description: Determines whether a VolumeSnapshotContent created through the VolumeSnapshotClass should be deleted when its bound VolumeSnapshot is deleted. jsonPath: .deletionPolicy name: DeletionPolicy type: string - jsonPath: .metadata.creationTimestamp name: Age type: date name: v1 schema: openAPIV3Schema: description: VolumeSnapshotClass specifies parameters that a underlying storage system uses when creating a volume snapshot. A specific VolumeSnapshotClass is used by specifying its name in a VolumeSnapshot object. VolumeSnapshotClasses are non-namespaced properties: apiVersion: description: 'More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string deletionPolicy: description: deletionPolicy determines whether a VolumeSnapshotContent created through the VolumeSnapshotClass should be deleted when its bound VolumeSnapshot is deleted. Supported values are "Retain" and "Delete". "Retain" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are kept. "Delete" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are deleted. Required. enum: - Delete - Retain type: string driver: description: driver is the name of the storage driver that handles this VolumeSnapshotClass. Required. type: string kind: description: 'More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string parameters: additionalProperties: type: string description: parameters is a key-value map with storage driver specific parameters for creating snapshots. These values are opaque to Kubernetes. type: object required: - deletionPolicy - driver type: object served: true storage: true subresources: {} - additionalPrinterColumns: - jsonPath: .driver name: Driver type: string - description: Determines whether a VolumeSnapshotContent created through the VolumeSnapshotClass should be deleted when its bound VolumeSnapshot is deleted. jsonPath: .deletionPolicy name: DeletionPolicy type: string - jsonPath: .metadata.creationTimestamp name: Age type: date name: v1beta1 # This indicates the v1beta1 version of the custom resource is deprecated. # API requests to this version receive a warning in the server response. deprecated: true # This overrides the default warning returned to clients making v1beta1 API requests. deprecationWarning: "snapshot.storage.k8s.io/v1beta1 VolumeSnapshotClass is deprecated; use snapshot.storage.k8s.io/v1 VolumeSnapshotClass" schema: openAPIV3Schema: description: VolumeSnapshotClass specifies parameters that a underlying storage system uses when creating a volume snapshot. A specific VolumeSnapshotClass is used by specifying its name in a VolumeSnapshot object. VolumeSnapshotClasses are non-namespaced properties: apiVersion: description: 'More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string deletionPolicy: description: deletionPolicy determines whether a VolumeSnapshotContent created through the VolumeSnapshotClass should be deleted when its bound VolumeSnapshot is deleted. Supported values are "Retain" and "Delete". "Retain" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are kept. "Delete" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are deleted. Required. enum: - Delete - Retain type: string driver: description: driver is the name of the storage driver that handles this VolumeSnapshotClass. Required. type: string kind: description: 'More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string parameters: additionalProperties: type: string description: parameters is a key-value map with storage driver specific parameters for creating snapshots. These values are opaque to Kubernetes. type: object required: - deletionPolicy - driver type: object {{- if IsKubernetesVersionGe "1.27.0"}} served: false {{- end}} {{- if not (IsKubernetesVersionGe "1.27.0")}} served: true {{- end}} storage: false subresources: {} status: acceptedNames: kind: "" plural: "" conditions: [] storedVersions: [] --- {{/* Source: azuredisk-csi-driver/templates/crd-csi-snapshot.yaml */}} apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: {{- if IsKubernetesVersionGe "1.27.0"}} controller-gen.kubebuilder.io/version: v0.8.0 api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/665" {{- end}} {{- if not (IsKubernetesVersionGe "1.27.0")}} controller-gen.kubebuilder.io/version: v0.4.0 api-approved.kubernetes.io: "https://github.com/kubernetes-csi/external-snapshotter/pull/419" {{- end}} labels: addonmanager.kubernetes.io/mode: Reconcile creationTimestamp: null name: volumesnapshotcontents.snapshot.storage.k8s.io spec: group: snapshot.storage.k8s.io names: kind: VolumeSnapshotContent listKind: VolumeSnapshotContentList plural: volumesnapshotcontents singular: volumesnapshotcontent scope: Cluster versions: - additionalPrinterColumns: - description: Indicates if the snapshot is ready to be used to restore a volume. jsonPath: .status.readyToUse name: ReadyToUse type: boolean - description: Represents the complete size of the snapshot in bytes jsonPath: .status.restoreSize name: RestoreSize type: integer - description: Determines whether this VolumeSnapshotContent and its physical snapshot on the underlying storage system should be deleted when its bound VolumeSnapshot is deleted. jsonPath: .spec.deletionPolicy name: DeletionPolicy type: string - description: Name of the CSI driver used to create the physical snapshot on the underlying storage system. jsonPath: .spec.driver name: Driver type: string - description: Name of the VolumeSnapshotClass to which this snapshot belongs. jsonPath: .spec.volumeSnapshotClassName name: VolumeSnapshotClass type: string - description: Name of the VolumeSnapshot object to which this VolumeSnapshotContent object is bound. jsonPath: .spec.volumeSnapshotRef.name name: VolumeSnapshot type: string - description: Namespace of the VolumeSnapshot object to which this VolumeSnapshotContent object is bound. jsonPath: .spec.volumeSnapshotRef.namespace name: VolumeSnapshotNamespace type: string - jsonPath: .metadata.creationTimestamp name: Age type: date name: v1 schema: openAPIV3Schema: description: VolumeSnapshotContent represents the actual "on-disk" snapshot object in the underlying storage system properties: apiVersion: description: 'More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: description: 'More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string spec: description: spec defines properties of a VolumeSnapshotContent created by the underlying storage system. Required. properties: deletionPolicy: description: deletionPolicy determines whether this VolumeSnapshotContent and its physical snapshot on the underlying storage system should be deleted when its bound VolumeSnapshot is deleted. Supported values are "Retain" and "Delete". "Retain" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are kept. "Delete" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are deleted. For dynamically provisioned snapshots, this field will automatically be filled in by the CSI snapshotter sidecar with the "DeletionPolicy" field defined in the corresponding VolumeSnapshotClass. For pre-existing snapshots, users MUST specify this field when creating the VolumeSnapshotContent object. Required. enum: - Delete - Retain type: string driver: description: driver is the name of the CSI driver used to create the physical snapshot on the underlying storage system. This MUST be the same as the name returned by the CSI GetPluginName() call for that driver. Required. type: string source: description: source specifies whether the snapshot is (or should be) dynamically provisioned or already exists, and just requires a Kubernetes object representation. This field is immutable after creation. Required. properties: snapshotHandle: description: snapshotHandle specifies the CSI "snapshot_id" of a pre-existing snapshot on the underlying storage system for which a Kubernetes object representation was (or should be) created. This field is immutable. type: string volumeHandle: description: volumeHandle specifies the CSI "volume_id" of the volume from which a snapshot should be dynamically taken from. This field is immutable. type: string type: object oneOf: - required: ["snapshotHandle"] - required: ["volumeHandle"] {{- if IsKubernetesVersionGe "1.27.0"}} sourceVolumeMode: description: SourceVolumeMode is the mode of the volume whose snapshot is taken. Can be either “Filesystem” or “Block”. If not specified, it indicates the source volume's mode is unknown. This field is immutable. This field is an alpha field. type: string {{- end}} volumeSnapshotClassName: description: name of the VolumeSnapshotClass from which this snapshot was (or will be) created. Note that after provisioning, the VolumeSnapshotClass may be deleted or recreated with different set of values, and as such, should not be referenced post-snapshot creation. type: string volumeSnapshotRef: description: volumeSnapshotRef specifies the VolumeSnapshot object to which this VolumeSnapshotContent object is bound. VolumeSnapshot.Spec.VolumeSnapshotContentName field must reference to this VolumeSnapshotContent's name for the bidirectional binding to be valid. For a pre-existing VolumeSnapshotContent object, name and namespace of the VolumeSnapshot object MUST be provided for binding to happen. This field is immutable after creation. Required. properties: apiVersion: description: API version of the referent. type: string fieldPath: description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' type: string kind: description: 'More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string name: description: 'More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' type: string namespace: description: 'More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' type: string resourceVersion: description: 'More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' type: string uid: description: 'More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' type: string type: object required: - deletionPolicy - driver - source - volumeSnapshotRef type: object status: description: status represents the current information of a snapshot. properties: creationTime: description: creationTime is the timestamp when the point-in-time snapshot is taken by the underlying storage system. In dynamic snapshot creation case, this field will be filled in by the CSI snapshotter sidecar with the "creation_time" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "creation_time" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. If not specified, it indicates the creation time is unknown. The format of this field is a Unix nanoseconds time encoded as an int64. On Unix, the command `date +%s%N` returns the current time in nanoseconds since 1970-01-01 00:00:00 UTC. format: int64 type: integer error: description: error is the last observed error during snapshot creation, if any. Upon success after retry, this error field will be cleared. properties: message: description: 'message is a string detailing the encountered error during snapshot creation if specified. NOTE: message may be logged, and it should not contain sensitive information.' type: string time: description: time is the timestamp when the error was encountered. format: date-time type: string type: object readyToUse: description: readyToUse indicates if a snapshot is ready to be used to restore a volume. In dynamic snapshot creation case, this field will be filled in by the CSI snapshotter sidecar with the "ready_to_use" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "ready_to_use" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it, otherwise, this field will be set to "True". If not specified, it means the readiness of a snapshot is unknown. type: boolean restoreSize: description: restoreSize represents the complete size of the snapshot in bytes. In dynamic snapshot creation case, this field will be filled in by the CSI snapshotter sidecar with the "size_bytes" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "size_bytes" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. When restoring a volume from this snapshot, the size of the volume MUST NOT be smaller than the restoreSize if it is specified, otherwise the restoration will fail. If not specified, it indicates that the size is unknown. format: int64 minimum: 0 type: integer snapshotHandle: description: snapshotHandle is the CSI "snapshot_id" of a snapshot on the underlying storage system. If not specified, it indicates that dynamic snapshot creation has either failed or it is still in progress. type: string type: object required: - spec type: object served: true storage: true subresources: status: {} - additionalPrinterColumns: - description: Indicates if the snapshot is ready to be used to restore a volume. jsonPath: .status.readyToUse name: ReadyToUse type: boolean - description: Represents the complete size of the snapshot in bytes jsonPath: .status.restoreSize name: RestoreSize type: integer - description: Determines whether this VolumeSnapshotContent and its physical snapshot on the underlying storage system should be deleted when its bound VolumeSnapshot is deleted. jsonPath: .spec.deletionPolicy name: DeletionPolicy type: string - description: Name of the CSI driver used to create the physical snapshot on the underlying storage system. jsonPath: .spec.driver name: Driver type: string - description: Name of the VolumeSnapshotClass to which this snapshot belongs. jsonPath: .spec.volumeSnapshotClassName name: VolumeSnapshotClass type: string - description: Name of the VolumeSnapshot object to which this VolumeSnapshotContent object is bound. jsonPath: .spec.volumeSnapshotRef.name name: VolumeSnapshot type: string - description: Namespace of the VolumeSnapshot object to which this VolumeSnapshotContent object is bound. jsonPath: .spec.volumeSnapshotRef.namespace name: VolumeSnapshotNamespace type: string - jsonPath: .metadata.creationTimestamp name: Age type: date name: v1beta1 # This indicates the v1beta1 version of the custom resource is deprecated. # API requests to this version receive a warning in the server response. deprecated: true # This overrides the default warning returned to clients making v1beta1 API requests. deprecationWarning: "snapshot.storage.k8s.io/v1beta1 VolumeSnapshotContent is deprecated; use snapshot.storage.k8s.io/v1 VolumeSnapshotContent" schema: openAPIV3Schema: description: VolumeSnapshotContent represents the actual "on-disk" snapshot object in the underlying storage system properties: apiVersion: description: 'More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: description: 'More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string spec: description: spec defines properties of a VolumeSnapshotContent created by the underlying storage system. Required. properties: deletionPolicy: description: deletionPolicy determines whether this VolumeSnapshotContent and its physical snapshot on the underlying storage system should be deleted when its bound VolumeSnapshot is deleted. Supported values are "Retain" and "Delete". "Retain" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are kept. "Delete" means that the VolumeSnapshotContent and its physical snapshot on underlying storage system are deleted. For dynamically provisioned snapshots, this field will automatically be filled in by the CSI snapshotter sidecar with the "DeletionPolicy" field defined in the corresponding VolumeSnapshotClass. For pre-existing snapshots, users MUST specify this field when creating the VolumeSnapshotContent object. Required. enum: - Delete - Retain type: string driver: description: driver is the name of the CSI driver used to create the physical snapshot on the underlying storage system. This MUST be the same as the name returned by the CSI GetPluginName() call for that driver. Required. type: string source: description: source specifies whether the snapshot is (or should be) dynamically provisioned or already exists, and just requires a Kubernetes object representation. This field is immutable after creation. Required. properties: snapshotHandle: description: snapshotHandle specifies the CSI "snapshot_id" of a pre-existing snapshot on the underlying storage system for which a Kubernetes object representation was (or should be) created. This field is immutable. type: string volumeHandle: description: volumeHandle specifies the CSI "volume_id" of the volume from which a snapshot should be dynamically taken from. This field is immutable. type: string type: object volumeSnapshotClassName: description: name of the VolumeSnapshotClass from which this snapshot was (or will be) created. Note that after provisioning, the VolumeSnapshotClass may be deleted or recreated with different set of values, and as such, should not be referenced post-snapshot creation. type: string volumeSnapshotRef: description: volumeSnapshotRef specifies the VolumeSnapshot object to which this VolumeSnapshotContent object is bound. VolumeSnapshot.Spec.VolumeSnapshotContentName field must reference to this VolumeSnapshotContent's name for the bidirectional binding to be valid. For a pre-existing VolumeSnapshotContent object, name and namespace of the VolumeSnapshot object MUST be provided for binding to happen. This field is immutable after creation. Required. properties: apiVersion: description: API version of the referent. type: string fieldPath: description: 'If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: "spec.containers{name}" (where "name" refers to the name of the container that triggered the event) or if no container name is specified "spec.containers[2]" (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object. TODO: this design is not final and this field is subject to change in the future.' type: string kind: description: 'More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string name: description: 'More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' type: string namespace: description: 'More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' type: string resourceVersion: description: 'More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' type: string uid: description: 'More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' type: string type: object required: - deletionPolicy - driver - source - volumeSnapshotRef type: object status: description: status represents the current information of a snapshot. properties: creationTime: description: creationTime is the timestamp when the point-in-time snapshot is taken by the underlying storage system. In dynamic snapshot creation case, this field will be filled in by the CSI snapshotter sidecar with the "creation_time" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "creation_time" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. If not specified, it indicates the creation time is unknown. The format of this field is a Unix nanoseconds time encoded as an int64. On Unix, the command `date +%s%N` returns the current time in nanoseconds since 1970-01-01 00:00:00 UTC. format: int64 type: integer error: description: error is the last observed error during snapshot creation, if any. Upon success after retry, this error field will be cleared. properties: message: description: 'message is a string detailing the encountered error during snapshot creation if specified. NOTE: message may be logged, and it should not contain sensitive information.' type: string time: description: time is the timestamp when the error was encountered. format: date-time type: string type: object readyToUse: description: readyToUse indicates if a snapshot is ready to be used to restore a volume. In dynamic snapshot creation case, this field will be filled in by the CSI snapshotter sidecar with the "ready_to_use" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "ready_to_use" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it, otherwise, this field will be set to "True". If not specified, it means the readiness of a snapshot is unknown. type: boolean restoreSize: description: restoreSize represents the complete size of the snapshot in bytes. In dynamic snapshot creation case, this field will be filled in by the CSI snapshotter sidecar with the "size_bytes" value returned from CSI "CreateSnapshot" gRPC call. For a pre-existing snapshot, this field will be filled with the "size_bytes" value returned from the CSI "ListSnapshots" gRPC call if the driver supports it. When restoring a volume from this snapshot, the size of the volume MUST NOT be smaller than the restoreSize if it is specified, otherwise the restoration will fail. If not specified, it indicates that the size is unknown. format: int64 minimum: 0 type: integer snapshotHandle: description: snapshotHandle is the CSI "snapshot_id" of a snapshot on the underlying storage system. If not specified, it indicates that dynamic snapshot creation has either failed or it is still in progress. type: string type: object required: - spec type: object {{- if IsKubernetesVersionGe "1.27.0"}} served: false {{- end}} {{- if not (IsKubernetesVersionGe "1.27.0")}} served: true {{- end}} storage: false subresources: status: {} status: acceptedNames: kind: "" plural: "" conditions: [] storedVersions: [] --- {{/* Source: azuredisk-csi-driver/templates/serviceaccount-csi-snapshot-controller.yaml */}} apiVersion: v1 kind: ServiceAccount metadata: name: csi-snapshot-controller-sa namespace: kube-system labels: addonmanager.kubernetes.io/mode: Reconcile {{end}} --- {{/* Source: azuredisk-csi-driver/templates/csi-azuredisk-driver.yaml */}} apiVersion: storage.k8s.io/v1 kind: CSIDriver metadata: name: disk.csi.azure.com labels: addonmanager.kubernetes.io/mode: Reconcile spec: attachRequired: true podInfoOnMount: false