Skip to main content
Version: v1.6.1

VolumeMount YAML Specification

potctl allows users to deploy and manage volumeMounts.

The VolumeMount has a very simple definition

apiVersion: datasance.com/v3
kind: VolumeMount
metadata:
name: test-vm-from-configmap
spec:
configMapName: configmap-name
apiVersion: datasance.com/v3
kind: VolumeMount
metadata:
name: test-vm-from-secret
spec:
secretName: configmap-name
FieldDescription
spec.configMapNameThe name of ConfigMap that you are going to create a VolumeMount from
spec.secretNameThe name of Secret that you are going to create a VolumeMount from

Attach VolumeMount to Agents

potctl 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'
Legacy prefix

The previous form using hostDestination: $VolumeMount/<name> is deprecated. Use the volumeMount field (or equivalent by-name reference) and type on the volume mapping instead.

Detach VolumeMount from Agents

potctl detach volume-mount test-vm-from-configmap agentName-1 agentName-2 agentName-3
Group 3See anything wrong with the document? Help us improve it!