additionalMounts parameter
Use the additionalMounts parameter to mount a list of additional resources like configMaps, secrets, and PVCs with volume mount configuration, to be mounted into each pods.
Used to pass customer overrides through a configMap to the pods as an alternate
way. For more information, see Passing customer overrides through configMaps by using additionalMounts.
additionalMounts:
additionalMounts:
configMaps:
- name: ""
mountPath: ""
# subPath: ""
# subPathExpr: ""
# readOnly: false
# mountPropagation: ""
# matchLabels: {}
secrets:
- name: ""
mountPath: ""
# subPath: ""
# subPathExpr: ""
# readOnly: false
# mountPropagation: ""
# matchLabels: {}
storages:
- name: ""
mountPath: ""
# matchLabels: {}additionalMounts parameter.
| Property | Default value | Value type | Required | Description |
|---|---|---|---|---|
name |
string | Yes | Specify the name and make sure it matches the name of a configMap or a secret. | |
mountPath |
string | Yes | Specify the path within the container where the volume should be mounted. The path must not contain ':'. | |
mountPropagation |
string | No | This determines how mounts are propagated from the host to container and the other way
around. When not set, MountPropagationNone is used. |
|
readOnly |
false |
boolean | No | Mounted read-only if true, read-write otherwise (false or unspecified). |
subPath |
"" (volumes's root) |
string | No | Path within the configMap or secret from which the container's volume should be mounted. |
subPathExpr |
"" (volumes's root) |
string | No | Expanded path within the configMap or secret from which the container's volume should be
mounted. Behaves similarly to SubPath but environment variable references
$(VAR_NAME) are expanded using the container's environment.
SubPathExpr and SubPath are mutually exclusive. |
matchLabels |
object | No | Specify matchLabels as key-value pair. If matchLabels are
empty, then the volume is mounted to every pod. Otherwise, the additional volume is mounted to only
those pods where key-value pair of matchLabels matches with key-value pair of
podLabels. |
storage property of
additionalMounts spec.
| Property | Default value | Value type | Required | Description |
|---|---|---|---|---|
mountPath |
|
string | Yes | Specify the path to mount a PV onto the pod. For additional mounts, ensure that the
|
name |
shared-volume |
string | Yes | Specify the name of the Persistent Volume claim. |
matchLabels |
object | No | Specify matchLabels as key-value pair. If matchLabels are
empty, then the volume is mounted to every pod. Otherwise, the additional volume is mounted to only
those pods where key-value pair of matchLabels matches with key-value pair of
podLabels. |
Automation of initialization scripts by using additionalMounts
You can choose to mount your initialization scripts to the pods and that allows the scripts to
run automatically when your application and agent servers start. Use
additionalMounts to mount initialization scripts to a specific location inside the
pod. The scripts must be mounted to the /opt/ssfs/init location, (a sub-directory
is also accepted). When the pod starts, it checks this location for executable files and runs the
scripts in alphabetical order. For NFS storage, you must change the permissions such that the
scripts are executable. The pod runs only executable files inside the
/opt/ssfs/init location.
additionalMounts:
configMaps:
- name: init-scripts
mountPath: /opt/ssfs/init/cm_scripts
defaultMode: 0770
storages:
- name: scripts-pvc
mountPath: /opt/ssfs/init/storage_scripts