Skip to content

Commit

Permalink
Add different mounts for HCD & DSE
Browse files Browse the repository at this point in the history
  • Loading branch information
burmanm committed Sep 11, 2024
1 parent 6f42125 commit bccc3c2
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions pkg/reconciliation/construct_podtemplatespec.go
Original file line number Diff line number Diff line change
Expand Up @@ -744,10 +744,23 @@ func buildContainers(dc *api.CassandraDatacenter, baseTemplate *corev1.PodTempla
Name: "tmp",
MountPath: "/tmp",
})
cassContainer.VolumeMounts = append(cassContainer.VolumeMounts, corev1.VolumeMount{
Name: "etc-cassandra",
MountPath: "/etc/cassandra",
})

if dc.Spec.ServerType == "hcd" {
cassContainer.VolumeMounts = append(cassContainer.VolumeMounts, corev1.VolumeMount{
Name: "etc-cassandra",
MountPath: "/opt/hcd/resources/cassandra/conf",
})
} else if dc.Spec.ServerType == "dse" {
cassContainer.VolumeMounts = append(cassContainer.VolumeMounts, corev1.VolumeMount{
Name: "etc-cassandra",
MountPath: "/opt/dse/resources/cassandra/conf",
})
} else {
cassContainer.VolumeMounts = append(cassContainer.VolumeMounts, corev1.VolumeMount{
Name: "etc-cassandra",
MountPath: "/etc/cassandra",
})
}
}

volumeMounts = combineVolumeMountSlices(volumeMounts, cassContainer.VolumeMounts)
Expand Down

0 comments on commit bccc3c2

Please sign in to comment.