Skip to content

Commit

Permalink
Add collectd directory for readOnly
Browse files Browse the repository at this point in the history
  • Loading branch information
burmanm committed Sep 16, 2024
1 parent b549012 commit 864f6d5
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion pkg/reconciliation/construct_podtemplatespec.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,15 @@ func addVolumes(dc *api.CassandraDatacenter, baseTemplate *corev1.PodTemplateSpe
EmptyDir: &corev1.EmptyDirVolumeSource{},
},
}
volumeDefaults = append(volumeDefaults, sparkConf)

collectDConf := corev1.Volume{
Name: "collectd-conf",
VolumeSource: corev1.VolumeSource{
EmptyDir: &corev1.EmptyDirVolumeSource{},
},
}

volumeDefaults = append(volumeDefaults, sparkConf, collectDConf)
}
}
}
Expand Down Expand Up @@ -785,6 +793,10 @@ func buildContainers(dc *api.CassandraDatacenter, baseTemplate *corev1.PodTempla
Name: "spark-conf",
MountPath: "/opt/dse/resources/spark/conf",
})
cassContainer.VolumeMounts = append(cassContainer.VolumeMounts, corev1.VolumeMount{
Name: "collectd-conf",
MountPath: "/opt/dse/resources/dse/collectd/etc/collectd",
})
}
} else {
cassContainer.VolumeMounts = append(cassContainer.VolumeMounts, corev1.VolumeMount{
Expand Down

0 comments on commit 864f6d5

Please sign in to comment.