Config maps
A config map holds non-secret configuration strings on the Controller. Keys live in a root data block, beside metadata, not under spec.
The short map is Config, secrets, and volumes. Fields are on ConfigMap fields.
Passwords and private keys belong in a Secret.
When to use it
Use a config map for feature flags, log levels, and endpoints. Deploy it before any volume mount or microservice that names it.
What deploy does
potctl deploy -f configmap.yaml -n my-ecn
Deploy looks up metadata.name. A missing name creates the config map. The same name updates data. There is no attach on the config map itself. Nodes receive the files when a volume mount that names it is linked.
apiVersion: datasance.com/v3
kind: ConfigMap
metadata:
name: app-settings
namespace: my-ecn
data:
log_level: info
features: '{"darkMode":true}'
How a microservice uses it
Set valueFromConfigMap to configmap-name/key.
apiVersion: datasance.com/v3
kind: Microservice
metadata:
name: line-monitor/reader
spec:
container:
env:
- key: LOG_LEVEL
valueFromConfigMap: app-settings/log_level
To mount the keys as files, create a volume mount with spec.configMapName set to this name, then use type: volumeMount on the microservice. See Volume mounts and Microservice fields.
CLI
potctl get configmaps -n my-ecn
potctl describe configmap app-settings -n my-ecn
potctl delete configmap app-settings -n my-ecn
describe configmap can print long values as YAML literal blocks. delete configmap takes the name.
Console
Config → ConfigMaps edits structured data or raw YAML. See Configuration.