### Get All Helm Release Details Source: https://github.com/zebernst/synology-csi-talos/blob/main/charts/synology-csi/templates/NOTES.txt Retrieves all configuration, notes, and resource details associated with the Helm release. This command provides a comprehensive view of the deployed release and its components. ```helm helm get all {{ .Release.Name }} --namespace {{ .Release.Namespace }} ``` -------------------------------- ### Install Synology CSI Helm Chart Source: https://github.com/zebernst/synology-csi-talos/blob/main/charts/synology-csi/README.md Installs the Synology CSI chart into your Kubernetes cluster. Replace `` with a unique name for your deployment. ```shell helm install synology-csi-chart/synology-csi ``` -------------------------------- ### Install Synology CSI Driver Pods Source: https://github.com/zebernst/synology-csi-talos/blob/main/README.md Commands to install the Synology CSI driver pods in a Kubernetes cluster. Options include installing all components or just the basic driver without the snapshotter. ```shell ./scripts/deploy.sh install --all ./scripts/deploy.sh install --basic ./scripts/deploy.sh --help ``` -------------------------------- ### Add Synology CSI Helm Repository Source: https://github.com/zebernst/synology-csi-talos/blob/main/charts/synology-csi/README.md Adds the Synology CSI Helm chart repository to your local Helm configuration. This command is necessary to fetch the chart for installation. ```shell helm repo add synology-csi-chart https://zebernst.github.io/synology-csi-talos ``` -------------------------------- ### Synology CSI Client Configuration Source: https://github.com/zebernst/synology-csi-talos/blob/main/README.md Example YAML configuration for Synology CSI driver client information, specifying NAS host, port, HTTPS status, username, and password. Supports multiple NAS entries. ```yaml clients: - host: 192.168.1.1 port: 5000 https: false username: password: - host: 192.168.1.2 port: 5001 https: true username: password: ``` -------------------------------- ### Get CSI Controller Plugin Logs Source: https://github.com/zebernst/synology-csi-talos/blob/main/charts/synology-csi/README.md Fetches logs from the 'plugin' container within the CSI controller pod. This command is essential for inspecting internal driver behavior and identifying errors during volume operations like CreateVolume. ```shell $ kubectl logs -n $NAMESPACE -l helm.sh/template=controller.yaml -c plugin ``` -------------------------------- ### Check Helm Release Status Source: https://github.com/zebernst/synology-csi-talos/blob/main/charts/synology-csi/templates/NOTES.txt Displays the current status of the Helm release, including deployed resources and their health. This command is useful for quickly verifying if the chart has been deployed successfully. ```helm helm status {{ .Release.Name }} --namespace {{ .Release.Namespace }} ``` -------------------------------- ### Uninstall Synology CSI Helm Chart Source: https://github.com/zebernst/synology-csi-talos/blob/main/charts/synology-csi/README.md Uninstalls the Synology CSI chart from your Kubernetes cluster. Replace `` with the name used during installation. ```shell helm delete ``` -------------------------------- ### Local Development: Build and Deploy Chart Source: https://github.com/zebernst/synology-csi-talos/blob/main/charts/synology-csi/README.md Commands for local development of the Synology CSI chart. 'make up' builds and deploys the chart, while 'make' can be used for other development tasks defined in the Makefile. ```shell $ make up ``` ```shell $ make ``` -------------------------------- ### Build CSI Driver and Tools Source: https://github.com/zebernst/synology-csi-talos/blob/main/README.md Commands to build the Synology CSI driver, the synocli dev tool, run unit tests, and build a Docker image for the CSI driver. ```shell make make synocli make test ./scripts/deploy.sh build ``` -------------------------------- ### Deploy Synology CSI Driver (Script) Source: https://github.com/zebernst/synology-csi-talos/blob/main/README.md Instructions for deploying the Synology CSI driver using the provided bash script. Supports both full deployment (including snapshotter) and basic deployment (without snapshotter), with options to build locally or pull images. ```shell # Full deployment (build local image) ./scripts/deploy.sh run # Basic deployment (build local image) ./scripts/deploy.sh build && ./scripts/deploy.sh install --basic # Full deployment (pull image) ./scripts/deploy.sh install --all # Basic deployment (pull image) ./scripts/deploy.sh install --basic ``` -------------------------------- ### Search Synology CSI Helm Charts Source: https://github.com/zebernst/synology-csi-talos/blob/main/charts/synology-csi/README.md Searches for available charts within the Synology CSI Helm repository. This helps verify the repository was added correctly and lists available chart versions. ```shell helm search repo synology-csi-chart ``` -------------------------------- ### Clone and Configure Synology CSI Driver Source: https://github.com/zebernst/synology-csi-talos/blob/main/README.md Steps to clone the Synology CSI driver repository and prepare the client configuration file. This involves setting up connection details for your Synology DSM. ```shell git clone https://github.com/zebernst/synology-csi-talos.git cd synology-csi cp config/client-info-template.yml config/client-info.yml ``` -------------------------------- ### Deploy Synology CSI Driver (Helm) Source: https://github.com/zebernst/synology-csi-talos/blob/main/README.md Procedure for deploying the Synology CSI driver using Helm for local development. This involves creating a namespace, a client info secret, and then deploying the Helm chart. ```shell kubectl create ns synology-csi kubectl create secret -n synology-csi generic client-info-secret --from-file=./config/client-info.yml cd deploy/helm; make up ``` -------------------------------- ### CSI Controller GRPC CreateVolume Call Source: https://github.com/zebernst/synology-csi-talos/blob/main/charts/synology-csi/README.md Logs from the CSI driver's controller plugin showing a GRPC call to the CreateVolume method. It includes the request payload detailing capacity, name, filesystem type, and volume capabilities, along with any resulting error. ```go 2022-01-25T08:19:57Z [INFO] [driver/utils.go:104] GRPC call: /csi.v1.Controller/CreateVolume 2022-01-25T08:19:57Z [INFO] [driver/utils.go:105] GRPC request: {"capacity_range":{"required_bytes":1073741824},"name":"pvc-a3d7962b-0ab5-4184-b545-a44cc424aaf1","parameters":{"fsType":"ext4"},"volume_capabilities":[{"AccessType":{"Mount":{"fs_type":"ext4"}},"access_mode":{"mode":1}}]} 2022-01-25T08:19:57Z [ERROR] [driver/utils.go:108] GRPC error: rpc error: code = Internal desc = Couldn't find any host available to create Volume ``` -------------------------------- ### VolumeSnapshotClass Kubernetes API Object Source: https://github.com/zebernst/synology-csi-talos/blob/main/README.md Defines a VolumeSnapshotClass for Kubernetes, specifying parameters for creating volume snapshots. This includes the driver name, deletion policy, and optional parameters for snapshot descriptions and locking on the DSM side. ```APIDOC apiVersion: snapshot.storage.k8s.io/v1beta1 kind: VolumeSnapshotClass metadata: name: synology-snapshotclass annotations: storageclass.kubernetes.io/is-default-class: "false" driver: csi.san.synology.com deletionPolicy: Delete # parameters: # description: 'Kubernetes CSI' # is_locked: 'false' # Parameters for VolumeSnapshotClass: # - description (string): The description of the snapshot on DSM. Supported protocols: iSCSI. # - is_locked (string): Whether to lock the snapshot on DSM. Supported protocols: iSCSI, SMB, NFS. Default: 'false'. ``` -------------------------------- ### Automated Testing of CSI Driver Source: https://github.com/zebernst/synology-csi-talos/blob/main/charts/synology-csi/README.md Executes automated tests for the Synology CSI Driver. This process creates a PersistentVolumeClaim (PVC) and a Job to mount the associated PersistentVolume (PV), writing a file to its filesystem to verify functionality. Resources are cleaned up automatically upon successful completion. ```shell $ make test ``` -------------------------------- ### Apply VolumeSnapshotClass YAML Source: https://github.com/zebernst/synology-csi-talos/blob/main/README.md Applies a VolumeSnapshotClass configuration to the Kubernetes cluster. This enables the creation of volume snapshots using the Synology CSI driver. ```shell kubectl apply -f ``` -------------------------------- ### Apply StorageClass YAML Source: https://github.com/zebernst/synology-csi-talos/blob/main/README.md Applies a StorageClass configuration to the Kubernetes cluster. This command is used to provision storage dynamically based on the defined StorageClass. ```shell kubectl apply -f ``` -------------------------------- ### Describe CSI Test Pod Source: https://github.com/zebernst/synology-csi-talos/blob/main/charts/synology-csi/README.md Retrieves detailed information about the Kubernetes pod associated with the CSI test job. This command helps diagnose scheduling issues or problems related to the pod's volumes and events. ```shell $ kubectl describe pods -n $NAMESPACE -l helm.sh/template=test.yaml ``` -------------------------------- ### Create CSI Client Secret Source: https://github.com/zebernst/synology-csi-talos/blob/main/README.md Command to create a Kubernetes secret from a client configuration file. The secret stores Synology NAS connection details. Ensure the namespace and secret name are correctly specified. ```bash kubectl create secret -n generic client-info-secret --from-file=config/client-info.yml ``` -------------------------------- ### Update Synology CSI Helm Repository Source: https://github.com/zebernst/synology-csi-talos/blob/main/charts/synology-csi/README.md Updates the local Helm repository cache to retrieve the latest versions of charts from the Synology CSI repository. Run this if you have previously added the repo. ```shell helm repo update ``` -------------------------------- ### Create SMB StorageClass for Synology CSI Source: https://github.com/zebernst/synology-csi-talos/blob/main/README.md This snippet defines a Kubernetes StorageClass for the Synology CSI driver using the SMB/CIFS protocol. It references a pre-created secret for authentication and specifies parameters like DSM IP and location. ```yaml apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: synostorage-smb provisioner: csi.san.synology.com parameters: protocol: "smb" dsm: '192.168.1.1' location: '/volume1' csi.storage.k8s.io/node-stage-secret-name: "cifs-csi-credentials" csi.storage.k8s.io/node-stage-secret-namespace: "default" reclaimPolicy: Delete allowVolumeExpansion: true ``` -------------------------------- ### Describe CSI Test PVC Source: https://github.com/zebernst/synology-csi-talos/blob/main/charts/synology-csi/README.md Retrieves detailed information about the PersistentVolumeClaim (PVC) used by the CSI test job. This is crucial for diagnosing volume provisioning and binding failures by examining the PVC's events. ```shell $ kubectl describe pvc -n $NAMESPACE -l helm.sh/template=test.yaml ``` -------------------------------- ### Customizing Configuration with Existing Secret Source: https://github.com/zebernst/synology-csi-talos/blob/main/charts/synology-csi/README.md Demonstrates how to use an existing Kubernetes Secret to provide client connection parameters for the Synology CSI Driver. The secret must contain a `client-info.yml` key with a base64 encoded YAML structure. ```yaml apiVersion: v1 kind: Secret metadata: name: -client-info data: client-info.yml: |- Y2xpZW50czoKLSBob3N0OiAxOTIuMTY4LjEuMQogIGh0dHBzOiBmYWxzZQogIHBhc3N3b3JkOiBwYXNzd29yZAogIHBvcnQ6IDUwMDAKICB1c2VybmFtZTogdXNlcm5hbWU=K ``` -------------------------------- ### Create NFS StorageClass for Synology CSI Source: https://github.com/zebernst/synology-csi-talos/blob/main/README.md This snippet defines a Kubernetes StorageClass for the Synology CSI driver using the NFS protocol. It includes parameters for DSM IP, location, mount permissions, and NFS version. ```yaml apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: synostorage-nfs provisioner: csi.san.synology.com parameters: protocol: "nfs" dsm: "192.168.1.1" location: '/volume1' mountPermissions: '0755' mountOptions: - nfsvers=4.1 reclaimPolicy: Delete allowVolumeExpansion: true ``` -------------------------------- ### Verify CSI Driver Pod Status Source: https://github.com/zebernst/synology-csi-talos/blob/main/README.md Command to check the status of all pods belonging to the Synology CSI driver within the 'synology-csi' namespace. Ensures the driver components are running correctly. ```shell kubectl get pods -n synology-csi ``` -------------------------------- ### Set CSI Namespace Variable Source: https://github.com/zebernst/synology-csi-talos/blob/main/charts/synology-csi/README.md Sets the NAMESPACE environment variable to 'synology-csi'. This variable is commonly used in subsequent kubectl commands to target the correct Kubernetes namespace for the CSI driver resources. ```shell $ NAMESPACE=synology-csi ``` -------------------------------- ### Create iSCSI StorageClass for Synology CSI Source: https://github.com/zebernst/synology-csi-talos/blob/main/README.md This snippet defines a Kubernetes StorageClass for the Synology CSI driver using the iSCSI protocol. It specifies parameters like fsType, DSM IP, and location for provisioning iSCSI LUNs. ```yaml apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: annotations: storageclass.kubernetes.io/is-default-class: "false" name: synostorage provisioner: csi.san.synology.com parameters: fsType: 'btrfs' dsm: '192.168.1.1' location: '/volume1' formatOptions: '--nodiscard' reclaimPolicy: Retain allowVolumeExpansion: true ``` -------------------------------- ### Create SMB Credentials Secret for Synology CSI Source: https://github.com/zebernst/synology-csi-talos/blob/main/README.md This snippet defines a Kubernetes Secret required for Synology CSI driver when using the SMB/CIFS protocol. It stores the DSM username and password needed to access shared folders. ```yaml apiVersion: v1 kind: Secret metadata: name: cifs-csi-credentials namespace: default type: Opaque stringData: username: # DSM user account accessing the shared folder password: # DSM user password accessing the shared folder ``` -------------------------------- ### Uninstall Synology CSI Driver Source: https://github.com/zebernst/synology-csi-talos/blob/main/README.md Command to uninstall the Synology CSI driver from the Kubernetes cluster. Ensure no resources are using storage managed by the driver before execution. ```shell ./scripts/uninstall.sh ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.