Skip to content

Commit ae77be0

Browse files
authored
Merge pull request #125917 from v-jaswel/aca/v-jaswel_work_item_371940_20250225
[ACA] [371940] Document subPath.
2 parents 9de41ed + bccd19a commit ae77be0

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

articles/container-apps/storage-mounts.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: craigshoemaker
66
ms.service: azure-container-apps
77
ms.custom: devx-track-azurecli
88
ms.topic: conceptual
9-
ms.date: 01/31/2025
9+
ms.date: 02/25/2025
1010
ms.author: cshoe
1111
zone_pivot_groups: arm-azure-cli-portal
1212
---
@@ -321,9 +321,12 @@ For a step-by-step tutorial on mounting an SMB file share, refer to [Create an A
321321
- The `name` is an identifier for the volume.
322322
- For `storageType`, use `AzureFile` for SMB, or `NfsAzureFile` for NFS. This value must match the storage type you defined in the environment.
323323
- For `storageName`, use the name of the storage you defined in the environment.
324+
- The `mountOptions` is a comma-separated string of mount options. For more information see [Use mountOptions settings in Azure Files](/troubleshoot/azure/azure-kubernetes/storage/mountoptions-settings-azure-files).
325+
- The `secrets` list is a list of secrets to mount in the volume. For more information see [Mounting secrets in a volume](./manage-secrets.md#secrets-volume-mounts).
324326
- For each container in the template that you want to mount Azure Files storage, define a volume mount in the `volumeMounts` array of the container definition.
325327
- The `volumeName` is the name defined in the `volumes` array.
326328
- The `mountPath` is the path in the container to mount the volume.
329+
- The `subPath` (optional) is the path in the volume to mount. If not specified, the volume root is mounted. For more information see [using subPath](https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath).
327330
328331
# [SMB](#tab/smb)
329332
@@ -338,6 +341,7 @@ For a step-by-step tutorial on mounting an SMB file share, refer to [Create an A
338341
volumeMounts:
339342
- volumeName: azure-files-volume
340343
mountPath: /my-files
344+
subPath: my-sub-path
341345
volumes:
342346
- name: azure-files-volume
343347
storageType: AzureFile
@@ -357,6 +361,7 @@ For a step-by-step tutorial on mounting an SMB file share, refer to [Create an A
357361
volumeMounts:
358362
- volumeName: azure-files-volume
359363
mountPath: /my-files
364+
subPath: my-sub-path
360365
volumes:
361366
- name: azure-files-volume
362367
storageType: NfsAzureFile
@@ -501,7 +506,8 @@ The following ARM template snippets demonstrate how to add an Azure Files share
501506
"volumeMounts": [
502507
{
503508
"mountPath": "/myfiles",
504-
"volumeName": "azure-files-volume"
509+
"volumeName": "azure-files-volume",
510+
"subPath": "my-sub-path"
505511
}
506512
]
507513
}
@@ -547,7 +553,8 @@ The following ARM template snippets demonstrate how to add an Azure Files share
547553
"volumeMounts": [
548554
{
549555
"mountPath": "/myfiles",
550-
"volumeName": "azure-files-volume"
556+
"volumeName": "azure-files-volume",
557+
"subPath": "my-sub-path"
551558
}
552559
]
553560
}
@@ -574,9 +581,12 @@ The following ARM template snippets demonstrate how to add an Azure Files share
574581
- The `name` is an identifier for the volume.
575582
- For `storageType`, use `AzureFile` for SMB, or `NfsAzureFile` for NFS. This value must match the storage type you defined in the environment.
576583
- For `storageName`, use the name of the storage you defined in the environment.
584+
- The `mountOptions` is a comma-separated string of mount options. For more information see [Use mountOptions settings in Azure Files](/troubleshoot/azure/azure-kubernetes/storage/mountoptions-settings-azure-files).
585+
- The `secrets` list is a list of secrets to mount in the volume. For more information see [Mounting secrets in a volume](./manage-secrets.md#secrets-volume-mounts).
577586
- For each container in the template that you want to mount Azure Files storage, define a volume mount in the `volumeMounts` array of the container definition.
578587
- The `volumeName` is the name defined in the `volumes` array.
579588
- The `mountPath` is the path in the container to mount the volume.
589+
- The `subPath` (optional) is the path in the volume to mount. If not specified, the volume root is mounted. For more information see [using subPath](https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath).
580590
581591
See the [ARM template API specification](azure-resource-manager-api-spec.md) for a full example.
582592
@@ -632,6 +642,7 @@ To configure a volume mount for Azure Files storage in the Azure portal, add a f
632642
- **Volume type**: **Azure file volume**.
633643
- **Name**: Enter a volume name.
634644
- **File share name**: Select the file share you created previously.
645+
- **Mount options**: Optionally, enter a comma-separated string of mount options. For more information see [Use mountOptions settings in Azure Files](/troubleshoot/azure/azure-kubernetes/storage/mountoptions-settings-azure-files).
635646
636647
1. Select **Add** to exit the context pane.
637648
@@ -645,6 +656,8 @@ To configure a volume mount for Azure Files storage in the Azure portal, add a f
645656
646657
1. In **Mount path**, enter the absolute path in the container to mount the volume.
647658
659+
1. In **Sub path (optional)**, enter the path in the volume to mount. If not specified, the volume root is mounted. For more information see [using subPath](https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath).
660+
648661
1. Select **Save** to save changes and exit the context pane.
649662
650663
1. Select **Create** to create the new revision.

0 commit comments

Comments
 (0)