VolumeMount YAML Specification

iofogctl allows users to deploy and manage volumeMounts.

The VolumeMount has a very simple definition

apiVersion: iofog.org/v3
kind: VolumeMount
metadata:
  name: test-vm-from-configmap
spec:
  configMapName: configmap-name
apiVersion: iofog.org/v3
kind: VolumeMount
metadata:
  name: test-vm-from-secret
spec:
  secretName: configmap-name
Field Description
spec.configMapName The name of ConfigMap that you are going to create a VolumeMount from
spec.secretName The name of Secret that you are going to create a VolumeMount from

Attach VolumeMount to Agents

iofogctl attach volume-mount test-vm-from-configmap agentName-1 agentName-2 agentName-3

When you attach volumeMount to Agents, each Agent will create local volume with volumeMount's secret or configMap, then you can easily attach those volumes to running microservices.

In the microservice volumes list, reference a VolumeMount by name and set type on the volume mapping. No prefix (e.g. $VolumeMount/) is required:

        volumes:
          - volumeMount: test-vm-from-configmap
            containerDestination: /home/foo
            accessMode: 'ro'
            type: 'bind'
          - volumeMount: test-vm-from-secret
            containerDestination: /home/foo
            accessMode: 'ro'
            type: 'bind'

Detach VolumeMount from Agents

iofogctl detach volume-mount test-vm-from-configmap agentName-1 agentName-2 agentName-3