github.com/oam-dev/kubevela@v1.9.11/docs/examples/app-with-volumes/td-azureDisk.yaml (about) 1 apiVersion: core.oam.dev/v1beta1 2 kind: TraitDefinition 3 metadata: 4 name: azure-disk-volume 5 namespace: vela-system 6 spec: 7 appliesToWorkloads: 8 - deployments.apps 9 schematic: 10 cue: 11 template: | 12 patch: { 13 spec: template: spec: { 14 // +patchKey=name 15 containers: [ for c in context.output.spec.template.spec.containers { 16 { 17 name: c.name 18 // +patchKey=name 19 volumeMounts: [{ 20 name: parameter.name 21 mountPath: parameter.mountPath 22 }] 23 } 24 }] 25 26 // +patchKey=name 27 volumes: [{ 28 name: parameter.name 29 azureDisk: { 30 diskName: parameter.diskName 31 diskURI: parameter.diskURI 32 fsType: parameter.fsType 33 cachingMode: parameter.cachingMode 34 readOnly: parameter.readOnly 35 kind: parameter.kind 36 } 37 }] 38 } 39 } 40 41 parameter: { 42 // +usage=The name of volume 43 name: string 44 mountPath: string 45 // +usage=The Name of the data disk in the blob storage. 46 diskName: string 47 // +usage=The URI of the data disk in the blob storage. 48 diskURI: string 49 // +usage=Filesystem type to mount. 50 fsType: *"ext4" | string 51 // +usage=Host Caching mode: None, Read Only, Read Write. 52 cachingMode: *"None" | "ReadOnly" | "ReadWrite" 53 // +usage=ReadOnly here will force the ReadOnly setting in VolumeMounts. 54 readOnly: *false | bool 55 // +usage=Expected values Shared: multiple blob disks per storage account Dedicated: single blob disk per storage account Managed: azure managed data disk (only in managed availability set). defaults to shared 56 kind: *"Shared" | "Managed" | "Dedicated" 57 }