in pkg/resources/statefulset/mgmd_statefulset.go [41:87]
func (mss *mgmdStatefulSet) getPodVolumes(nc *v1.NdbCluster) []corev1.Volume {
return []corev1.Volume{
// Empty Dir volume for the mgmd data dir
*mss.getEmptyDirPodVolume(mss.getDataDirVolumeName()),
// Load the config.ini script via a volume
{
Name: mgmdConfigIniVolumeName,
VolumeSource: corev1.VolumeSource{
ConfigMap: &corev1.ConfigMapVolumeSource{
LocalObjectReference: corev1.LocalObjectReference{
Name: nc.GetConfigMapName(),
},
// Load only the config.ini key
Items: []corev1.KeyToPath{
{
Key: constants.ConfigIniKey,
Path: constants.ConfigIniKey,
},
},
},
},
},
// Load the helper scripts from
// the configmap into the pod via a volume
{
Name: helperScriptsVolName,
VolumeSource: corev1.VolumeSource{
ConfigMap: &corev1.ConfigMapVolumeSource{
LocalObjectReference: corev1.LocalObjectReference{
Name: nc.GetConfigMapName(),
},
DefaultMode: &ownerCanExecMode,
Items: []corev1.KeyToPath{
{
// Load the startup probe
Key: constants.MgmdStartupProbeScript,
Path: constants.MgmdStartupProbeScript,
},
},
},
},
},
}
}