HUB
Sign inSign up

cmattoon/dir2cm

By cmattoon

•Updated over 7 years ago

Dumps a directory to a Kubernetes ConfigMap

Image
0

1.8K

cmattoon/dir2cm repository overview

Test Setup: $ mkdir -p configfiles $ for i in $(seq 1 5); do
echo "This is file $i" >> "configfiles/file_${i}.txt";
done

Generate a ConfigMap:

docker run --rm -v "$(pwd)/configfiles:/data" cmattoon/dir2cm -name foobar

Should dump the following to stdout:

apiversion: v1
kind: ConfigMap
metadata:
  name: foobar
  labels: {}
data:
  file_1.txt: |
    This is file 1
  file_2.txt: |
    This is file 2
  file_3.txt: |
    This is file 3
  file_4.txt: |
    This is file 4
  file_5.txt: |
    This is file 5
Tag summary
Recent tags
Content type
Image
Digest
Size
108.5 MB
Last updated
over 7 years ago
docker pull cmattoon/dir2cm:latest