Parameters in the values.yaml File of Helm
When using Helm to install CSI, you need to prepare the values.yaml file of the Helm project based on the features required during deployment. Huawei CSI provides the values.yaml template file in the helm/esdk directory of the software package.
This section describes the configuration items in the values.yaml file and backend configuration examples in typical scenarios.
images Parameters
The images parameters in the values.yaml file are used to configure the component image information on which Huawei CSI depends during running. Set the following parameters:
Table 1 images parameters
livenessprobe sidecar image. | |||
csi-provisioner sidecar image. | |||
csi-attacher sidecar image. | |||
csi-resizer sidecar image. | |||
csi-snapshotter sidecar image. | |||
snapshot-controller sidecar image. | |||
csi-node-driver-registrar sidecar image. | registry.k8s.io/sig-storage/csi-node-driver-registrar:v2.13.0 |
- For details about the values of huaweiCSIService, storageBackendSidecar, storageBackendController, and huaweiCSIExtender, see Uploading a Huawei CSI Image . Use the name and version of the finally generated image.
- For details about other sidecar image parameters, see Checking the Images on Which CSI Depends . Use the name and version of the finally uploaded image.
controller Parameters
The controller parameters are used to configure the huawei-csi-controller component.
Table 2 controller parameters
If the Kubernetes version is earlier than v1.17, the huawei-csi-controller component can be deployed only in single-copy mode because the csi-provisioner sidecar image provided by the Kubernetes community does not support the --leader-election parameter. Therefore, if the Kubernetes version is earlier than v1.17, this parameter can only be set to 1. | ||||
PV name prefix. The default value is pvc, that is, the name of a created PV is pvc-<uuid>. The prefix must comply with the naming rules of DNS Subdomain Names, and the total length of the PV name cannot exceed 253 characters. | The corresponding provisioner parameter name is --volume-name-prefix. It is recommended that the prefix contain no more than 20 characters. For details, see Configuring the PV Name Prefix.
| |||
If a port conflict occurs, change the port number to an idle one. | ||||
If you want to use snapshot-related functions, enable this feature. | ||||
Node selector of huawei-csi-controller. After this parameter is set, huawei-csi-controller will be scheduled only to a node with the label. | For details about the node selector, see Assign Pods to Nodes. | |||
Taint toleration of huawei-csi-controller. After this parameter is set, huawei-csi-controller can tolerate taints on a node. | For details about taints and tolerations, see Taints and Tolerations. | |||
Node affinity of huawei-csi-controller. After this parameter is set, huawei-csi-controller will be preferentially scheduled to a node with the label. | For details about node affinity, see Assigning Pods to Nodes. | |||
Liveness probe port of huawei-csi-controller, used for health check. | If a port conflict occurs, change the port number to an idle one. | |||
If you want to use PVC change-related functions, enable this feature. | ||||
Minimum retry interval when a PVC change fails to be created. | ||||
Maximum retry interval when a PVC change fails to be created. | ||||
Whether to run CSI services on the Service of the Kubernetes cluster. | After this function is enabled, other services in the Kubernetes cluster can access CSI services through gRPC. | |||
Port used when CSI services run on the Service of the Kubernetes cluster. | If a port conflict occurs, change the port number to an idle one. |
If controller.snapshot.enabled is set to true, you need to install the volume snapshot CRD resource in the helm/crd/snapshot-crds directory.
node Parameters
The node parameters are used to configure the huawei-csi-node component.
Table 3 node parameters
Maximum number of volumes provisioned by Huawei CSI that can be used by a node. If this parameter is not specified or is set to 0, the number is unlimited. If nodeName is specified during Pod creation, this configuration will be ignored. | For details, see Volume Limits. | |||
Node selector of huawei-csi-node. After this parameter is set, huawei-csi-node will be scheduled only to a node with the label. | For details about the node selector, see Assign Pods to Nodes. | |||
Taint toleration of huawei-csi-node. After this parameter is set, huawei-csi-node can tolerate taints on a node. | - key: "node.kubernetes.io/memory-pressure" operator: "Exists" effect: "NoExecute" - key: "node.kubernetes.io/disk-pressure" operator: "Exists" effect: "NoExecute" - key: "node.kubernetes.io/network-unavailable" operator: "Exists" effect: "NoExecute" | For details about taints and tolerations, see Taints and Tolerations. | ||
Node affinity of huawei-csi-node. After this parameter is set, huawei-csi-node will be preferentially scheduled to a node with the label. | For details about node affinity, see Assigning Pods to Nodes. | |||
Liveness probe port of huawei-csi-node, used for health check. | If a port conflict occurs, change the port number to an idle one. | |||
Name of the directory where a block device is mounted to kubelet. | After a block device is successfully mounted, the directory structure of the mount path is as follows: /var/lib/kubelet/plugins/kubernetes.io/csi/{kubeletVolumeDevicesDirName}/publish/{specName}/{podUID} |
csiDriver Parameters
The csiDriver parameters include the basic configurations for running Huawei CSI, such as Huawei driver name and multipathing type.
Table 4 csiDriver parameters
Maximum number of disks that can be concurrently scanned/detached. The value is an integer ranging from 1 to 10. | A larger value indicates that more concurrent disk scanning and detaching operations are performed on a single node at the same time. When DM-Multipath is used, a large number of concurrent requests may cause unknown problems and affect the overall time. | |||
Whether to use multipathing software. The value is a Boolean value. | It is strongly recommended that multipathing software be enabled to enhance the redundancy and performance of storage links. | |||
Multipathing software used when the storage protocol is fc or iscsi. The following parameter values can be configured: | ||||
Multipathing software used when the storage protocol is NVMe. The following parameter values can be configured: | ||||
Timeout interval for waiting for multipathing aggregation when DM-Multipath is used on the host. The value ranges from 1 to 600 seconds. | ||||
In scenarios such as mounting and capacity expansion, the CSI plug-in needs to run some host commands, for example, running the mount command to mount a file system. This parameter is used to control the timeout interval for running a single command. | ||||
Whether to enable CSI automatic disk scanning when the roce-nvme or tcp-nvme protocol is used. | If an external tool is used to establish an NVMe_over_RoCE or NVMe_over_TCP connection, set this parameter to false. For example, if the SNSD automatic connection function is enabled on storage devices, you can set this parameter to false. | |||
Whether to check that the number of paths aggregated by DM-Multipath or NVMe-Native is equal to the actual number of online paths. The following parameter values can be configured:
| This parameter is mandatory when csiDriver.scsiMultipathType is set to DM-multipath or csiDriver.nvmeMultipathType is set to NVMe-Native. | |||
Interval for updating backend capabilities. The value ranges from 60 to 600 seconds. | ||||
Record type of the controller log. The following parameter values can be configured:
| When the value is file, logs are retained in the specified directory of the node. When the Pod where CSI is located is destroyed, logs are still retained. When the value is console, logs are retained in the temporary space of the Pod where CSI is located. When the Pod where CSI is located is destroyed, the logs are also destroyed. | |||
Output level of the controller log. The following parameter values can be configured:
| ||||
Ensure that the directory has sufficient space for storing logs. It is recommended that the space be greater than or equal to 200 MB. | ||||
Maximum number of controller log file backups in file output mode. | ||||
Record type of the node log. The following parameter values can be configured:
| When the value is file, logs are retained in the specified directory of the node. When the Pod where CSI is located is destroyed, logs are still retained. When the value is console, logs are retained in the temporary space of the Pod where CSI is located. When the Pod where CSI is located is destroyed, the logs are also destroyed. | |||
Output level of the node log. The following parameter values can be configured:
| ||||
Ensure that the directory has sufficient space for storing logs. It is recommended that the space be greater than or equal to 200 MB. | ||||
Maximum number of node log file backups in file output mode. | ||||
After this item is enabled, the CSI node will automatically report the node IP address. | ||||
By default, the information required by CSI on all nodes is saved to a Secret. After this function is enabled, an independent Secret is created for each node to save information. NOTICE: After this function is enabled, the following conditions must be met:
|
If Huawei CSI has been deployed in your container environment, ensure that the value of csiDriver.driverName is the same as that configured during previous deployment. Otherwise, existing volumes or snapshots provisioned by Huawei CSI in the system cannot be managed by the newly deployed Huawei CSI.
Other Parameters
Other parameters include some features of the CSI plug-in or the policies for obtaining images.
Table 5 Other parameters
Kubernetes namespace where Huawei CSI is running, which can be customized. The name must consist of lowercase letters, digits, and hyphens (-), for example, my-name and 123-abc. | ||||
Used by the Kubernetes cluster to pass the identity authentication of an image registry to pull private images. | For details, see Pull an Image from a Private Registry. | |||
The CSIDriver feature is a GA version in Kubernetes v1.18. Therefore, to use this feature, the Kubernetes version must be later than v1.18. If the Kubernetes version is earlier than v1.18, set this parameter to false. | ||||
Whether the CSI plug-in skips the attach operation. The following parameter values can be configured: | The attachRequired parameter can be configured in Kubernetes v1.18. If CSIDriverObject.isCreate is set to true and attachRequired is set to false, the huawei-csi plug-in will not deploy the csi-attacher sidecar. | |||
Whether the ownership and permissions of a basic volume can be changed before the volume is mounted. The following parameter values can be configured:
| The fsGroupPolicy parameter can be configured in Kubernetes v1.20, and takes effect only when CSIDriverObject.isCreate is set to true. This feature is a Beta version in Kubernetes v1.20 but a GA version in Kubernetes v1.23. Therefore, the Kubernetes version must be later than v1.20. | |||
This parameter takes effect only in the multi-controller scenario. | ||||
This parameter takes effect only in the multi-controller scenario. | ||||
This parameter takes effect only in the multi-controller scenario. | ||||
| ||||
| ||||
You can allocate container resources related to huawei-csi-controller and huawei-csi-node: resources.<component>.<container-name> <component> supports the following values:
controller.<container-name> supports the following values:
node.<container-name> supports the following values:
| For the default values of different container resources, see Huawei CSI Resource Management. | The following uses livenessProbe of huawei-csi-controller as an example: resources: controller: limits: cpu: 100m memory: 128Mi requests: cpu: 10m memory: 128Mi |
Ensure that the namespace entered in kubernetes.namespace exists on Kubernetes. If the namespace does not exist, run the following command to create it. In this example, the namespace for running Huawei CSI is huawei-csi.kubectl create namespace huawei-csi