Understading ConfigMap yaml

Cluster information:

Kubernetes version: v1.14.1
Cloud being used: bare-metal
Installation method: manual
Host OS: Red Hat Enterprise Linux Server release 7.7

Hi,

I have trouble understanding the content of my local-storage.yaml. The below is a snippet of the larger file.

What does hostDir and mountDir mean in this context

apiVersion: v1
kind: ConfigMap
metadata:
  name: local-provisioner-config
  namespace: local-storage
data:
  storageClassMap: |
    local-storage:
       hostDir: /mnt/local-storage
       mountDir:  /mnt/local-storage
       blockCleanerCommand:
         - "/scripts/shred.sh"
         - "2"

I think this means the hostDir directory /mnt/local-storage on the worker node will be mounted inside the container in the mountDir directory /mnt/local-storage.

Hi Stephendotcarter.

Thanks that is also what I thinks. But I would be really happy to get it confirmed. It might be that I have not look well enough but I cant seem to find this stuff well explained in the documentation.

I think it’s not in K8s documentation because its an out-of-tree plugin.

Definition of the field is here:

This page provides some description of the fields: