github.com/mirantis/virtlet@v1.5.2-0.20191204181327-1659b8a48e9b/examples/cirros-vm-volume-mount.yaml (about)

     1  apiVersion: v1
     2  kind: Pod
     3  metadata:
     4    name: cirros-vm-volume-mount
     5    annotations:
     6      kubernetes.io/target-runtime: virtlet.cloud
     7      VirtletVCPUCount: "1"
     8      VirtletDiskDriver: virtio
     9      VirtletSSHKeys: |
    10        ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCaJEcFDXEK2ZbX0ZLS1EIYFZRbDAcRfuVjpstSc0De8+sV1aiu+dePxdkuDRwqFtCyk6dEZkssjOkBXtri00MECLkir6FcH3kKOJtbJ6vy3uaJc9w1ERo+wyl6SkAh/+JTJkp7QRXj8oylW5E20LsbnA/dIwWzAF51PPwF7A7FtNg9DnwPqMkxFo1Th/buOMKbP5ZA1mmNNtmzbMpMfJATvVyiv3ccsSJKOiyQr6UG+j7sc/7jMVz5Xk34Vd0l8GwcB0334MchHckmqDB142h/NCWTr8oLakDNvkfC1YneAfAO41hDkUbxPtVBG5M/o7P4fxoqiHEX+ZLfRxDtHB53 me@localhost
    11      # cloud-init user data
    12      # @virtlet-mount-script@ is replaced with commands that mount
    13      # volumes into this VM
    14      VirtletCloudInitUserDataScript: "@virtlet-mount-script@"
    15  spec:
    16    nodeSelector:
    17      extraRuntime: virtlet
    18  
    19    containers:
    20    - name: cirros-vm
    21      image: virtlet.cloud/cirros
    22      imagePullPolicy: IfNotPresent
    23      tty: true
    24      stdin: true
    25      resources:
    26        limits:
    27          memory: 160Mi
    28      # volumeMounts are handled by means of @virtlet-mount-script@ here.
    29      # They can also be handled by means of cloud-init if the image supports it,
    30      # but this is not the case with CirrOS.
    31      volumeMounts:
    32      - name: somevol
    33        mountPath: /somevol
    34    volumes:
    35    # Define an ephemeral volume to be mounted under /somevol
    36    # This can only be used to add some extra disk space
    37    # as it'll be removed with this VM.
    38    - name: somevol
    39      flexVolume:
    40        driver: "virtlet/flexvolume_driver"
    41        options:
    42          type: qcow2
    43          capacity: 40MB