# CsiVolumeSourceV1 Properties

- Package: [Aspire.Hosting.Kubernetes](/reference/api/csharp/aspire.hosting.kubernetes.md)
- Type: [CsiVolumeSourceV1](/reference/api/csharp/aspire.hosting.kubernetes/csivolumesourcev1.md)
- Kind: `Properties`
- Members: `5`

Represents a CSI (Container Storage Interface) volume source in Kubernetes.

<a id="driver"></a>

## Driver

- Name: `Driver`
- Modifiers: `get; set`
- Returns: `string`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/f4c27f2d43ddc1cacd0dd083b30d1fea1cee7a62/src/Aspire.Hosting.Kubernetes/Resources/CsiVolumeSourceV1.cs)

Gets or sets the name of the CSI driver that handles the volume.

```csharp
public string Driver { get; set; }
```

## Remarks

The driver name identifies the CSI driver registered in the cluster that should publish this volume for the pod.

<a id="fstype"></a>

## FsType

- Name: `FsType`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/f4c27f2d43ddc1cacd0dd083b30d1fea1cee7a62/src/Aspire.Hosting.Kubernetes/Resources/CsiVolumeSourceV1.cs)

Gets or sets the filesystem type to mount.

```csharp
public string? FsType { get; set; }
```

## Remarks

This value is passed to the CSI driver for volume publishing. It is used by filesystem-backed CSI drivers and may be ignored by drivers that do not mount a filesystem.

<a id="nodepublishsecretref"></a>

## NodePublishSecretRef

- Name: `NodePublishSecretRef`
- Modifiers: `nullable` `get; set`
- Returns: [LocalObjectReferenceV1?](/reference/api/csharp/aspire.hosting.kubernetes/localobjectreferencev1.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/f4c27f2d43ddc1cacd0dd083b30d1fea1cee7a62/src/Aspire.Hosting.Kubernetes/Resources/CsiVolumeSourceV1.cs)

Gets or sets a reference to the secret that contains node publish credentials.

```csharp
public LocalObjectReferenceV1? NodePublishSecretRef { get; set; }
```

## Remarks

Some CSI drivers use this reference to authenticate node publish operations. The referenced object is a Kubernetes Secret in the same namespace as the pod.

<a id="readonly"></a>

## ReadOnly

- Name: `ReadOnly`
- Modifiers: `nullable` `get; set`
- Returns: `bool?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/f4c27f2d43ddc1cacd0dd083b30d1fea1cee7a62/src/Aspire.Hosting.Kubernetes/Resources/CsiVolumeSourceV1.cs)

Gets or sets a value indicating whether the volume should be mounted read-only.

```csharp
public bool? ReadOnly { get; set; }
```

## Remarks

If set to `true`, Kubernetes requests a read-only mount from the CSI driver. When omitted, Kubernetes treats the value as `false`, so the volume is mounted read/write.

<a id="volumeattributes"></a>

## VolumeAttributes

- Name: `VolumeAttributes`
- Modifiers: `get`
- Returns: `Dictionary<string, string>`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/f4c27f2d43ddc1cacd0dd083b30d1fea1cee7a62/src/Aspire.Hosting.Kubernetes/Resources/CsiVolumeSourceV1.cs#L59)

Gets the driver-specific volume attributes.

```csharp
public Dictionary<string, string> VolumeAttributes { get; }
```

## Remarks

Each key-value pair is passed to the CSI driver. For example, the Secrets Store CSI driver uses this collection to identify the SecretProviderClass for the pod.
