# Generic Mount Example This allows you to mount any pre-provisioned PVs, secret or configMap into any container. It can be used e.g. to mount migration nfs, cifs / samba shares into a pipeliner container. Use the following format: ``` mounts: generic: - name: : path: volumeName: configMap: secret: subPath: [a (optional) subpath to be used inside the PV] accessMode: size: ``` ## Mounting generic secrets or configMaps In this example, we create a secret with two sample files and a configMap with two sample files: ``` apiVersion: v1 kind: Secret metadata: name: sample-generic-secret type: Opaque stringData: test1.txt: | This is a test file lets see if this works. test2.txt: | This is a second test file lets see if this works. --- apiVersion: v1 kind: ConfigMap metadata: name: sample-generic-configmap data: test1.txt: | This is a test file lets see if this works. test2.txt: | This is a second test file lets see if this works. ``` Then we use these objects to mount them as directory and as files: ``` nappl: mounts: generic: # -- This shows how to mount the contents of a secret into # a directory - name: "sample-generic-secret" secret: "sample-generic-secret" path: "/mnt/secret" # -- This shows how to mount the contents of a configMap into # a directory - name: "sample-generic-configmap" configMap: "sample-generic-configmap" path: "/mnt/configmap" # -- This shows how to mount a file from a secret to a secret file - name: "sample-generic-secret-file" secret: "sample-generic-secret" path: "/mnt/secret-file.txt" subPath: "test1.txt" # -- This shows how to mount a file from a configMap to a file - name: "sample-generic-configmap-file" configMap: "sample-generic-configmap" path: "/mnt/configmap-file.txt" subPath: "test2.txt" ``` ## Mounting generic PVs Here is an example how to mount any pre-created PV: ``` mounts: generic: # -- This shows how to mount a generic Persistent Volume - name: "migration" path: "/mnt/migration" subPath: "{{ .Release.Name }}-mig" accessModes: - ReadWriteMany volumeName: my-migration-data-volume size: "512Gi" ```