From 3c8adbf5d663e6985fa330b32bbdf748f1766019 Mon Sep 17 00:00:00 2001 From: Noel Bundick Date: Fri, 9 Mar 2018 16:36:17 -0800 Subject: [PATCH] Add details on mounting existing Azure Managed Disks --- staging/volumes/azure_disk/README.md | 5 ++-- .../pod-uses-existing-managed-disk.yaml | 24 +++++++++++++++++++ 2 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 staging/volumes/azure_disk/static-provisioning/managed-disk/pod-uses-existing-managed-disk.yaml diff --git a/staging/volumes/azure_disk/README.md b/staging/volumes/azure_disk/README.md index 35edc7ca8..ea1db94ad 100644 --- a/staging/volumes/azure_disk/README.md +++ b/staging/volumes/azure_disk/README.md @@ -4,8 +4,9 @@ On Azure VM, create a Pod using the volume spec based on [azure](azure.yaml). In the pod, you need to provide the following information: -- *diskName*: (required) the name of the VHD blob object. -- *diskURI*: (required) the URI of the vhd blob object. +- *diskName*: (required) the name of the VHD blob object OR the name of an Azure managed data disk if Kind is Managed. +- *diskURI*: (required) the URI of the vhd blob object OR the resourceID of an Azure managed data disk if Kind is Managed. +- *kind*: (optional) kind of disk. Must be one of Shared (multiple disks per storage account), Dedicated (single blob disk per storage account), or Managed (Azure managed data disk). Default is Shared. - *cachingMode*: (optional) disk caching mode. Must be one of None, ReadOnly, or ReadWrite. Default is None. - *fsType*: (optional) the filesytem type to mount. Default is ext4. - *readOnly*: (optional) whether the filesystem is used as readOnly. Default is false. diff --git a/staging/volumes/azure_disk/static-provisioning/managed-disk/pod-uses-existing-managed-disk.yaml b/staging/volumes/azure_disk/static-provisioning/managed-disk/pod-uses-existing-managed-disk.yaml new file mode 100644 index 000000000..c197bf2b8 --- /dev/null +++ b/staging/volumes/azure_disk/static-provisioning/managed-disk/pod-uses-existing-managed-disk.yaml @@ -0,0 +1,24 @@ +kind: Pod +apiVersion: v1 +metadata: + name: pod-uses-managed-ssd-5g + labels: + name: storage +spec: + containers: + - image: nginx + name: az-c-01 + command: + - /bin/sh + - -c + - while true; do echo $(date) >> /mnt/managed/outfile; sleep 1; done + volumeMounts: + - name: managed01 + mountPath: /mnt/managed + volumes: + - name: managed01 + azureDisk: + kind: Managed + diskName: myDisk + diskURI: /subscriptions//resourceGroups//providers/Microsoft.Compute/disks/ +