Skip to main content
Version: v3.9.0

Volume mounts

A volume mount binds one Secret or one ConfigMap to a Controller object. Edgelet nodes receive the files when the mount is linked. A microservice then uses type: volumeMount.

The short map is Config, secrets, and volumes. Fields are on VolumeMount fields.

A Volume copies a directory from the operator machine and lists nodes in its own spec. A VolumeMount publishes a Secret or ConfigMap. Attach applies here, and also to models, knowledge, and runtime classes.

When to use it​

Deploy the Secret or ConfigMap first. Set exactly one of secretName or configMapName.

Use attach volume-mount when the node should hold the files before any microservice references the mount, or on extra nodes. When a microservice already lists this mount, the Controller links it to that microservice's Edgelet node during microservice deploy.

What deploy does​

potctl deploy -f volume-mount.yaml -n my-ecn

Deploy creates the VolumeMount or updates it when the name exists. Deploy does not copy files by itself. Linking does.

volume-mount.yaml
apiVersion: datasance.com/v3
kind: VolumeMount
metadata:
name: app-config
namespace: my-ecn
spec:
configMapName: app-settings

A secret-backed mount sets spec.secretName instead, and leaves configMapName unset.

How a microservice uses it​

hostDestination is the volume mount metadata.name, not the Secret or ConfigMap name. type is volumeMount.

mount.yaml
apiVersion: datasance.com/v3
kind: Microservice
metadata:
name: line-monitor/reader
spec:
agent:
name: edge-01
container:
volumes:
- type: volumeMount
hostDestination: app-config
containerDestination: /etc/app
accessMode: ro

Deploy the VolumeMount before that microservice, in an earlier file or earlier in the same file. The mapping table is on Microservice fields.

CLI​

potctl get volume-mounts -n my-ecn
potctl describe volume-mount app-config -n my-ecn
potctl attach volume-mount app-config edge-01 -n my-ecn
potctl detach volume-mount app-config edge-01 -n my-ecn
potctl delete volume-mount app-config -n my-ecn

describe volume-mount shows the backing name. attach volume-mount and detach volume-mount take the mount name and Edgelet node names. Linked mounts also appear on describe agent.

Console​

Config → Volume Mounts creates mounts and lists linked nodes. See Configuration.

Group 3See anything wrong with the document? Help us improve it!