diff --git a/controllers/k8ssandra/cassandra_metrics_agent_test.go b/controllers/k8ssandra/cassandra_metrics_agent_test.go index c59b0629d..aa6dd7e8e 100644 --- a/controllers/k8ssandra/cassandra_metrics_agent_test.go +++ b/controllers/k8ssandra/cassandra_metrics_agent_test.go @@ -2,9 +2,10 @@ package k8ssandra import ( "context" + "testing" + "github.com/k8ssandra/k8ssandra-operator/pkg/cassandra" "github.com/stretchr/testify/assert" - "testing" cassdcapi "github.com/k8ssandra/cass-operator/apis/cassandra/v1beta1" api "github.com/k8ssandra/k8ssandra-operator/apis/k8ssandra/v1alpha1" diff --git a/pkg/telemetry/cassandra_agent/cassandra_agent_config.go b/pkg/telemetry/cassandra_agent/cassandra_agent_config.go index e3580203d..230fafdc9 100644 --- a/pkg/telemetry/cassandra_agent/cassandra_agent_config.go +++ b/pkg/telemetry/cassandra_agent/cassandra_agent_config.go @@ -137,7 +137,8 @@ func (c Configurator) AddStsVolumes(dc *cassdcapi.CassandraDatacenter) error { func(c *corev1.Container) { vm := corev1.VolumeMount{ Name: "metrics-agent-config", - MountPath: filepath.Base(filepath.Dir(agentConfigLocation)), + MountPath: agentConfigLocation, + SubPath: filepath.Base(agentConfigLocation), } c.VolumeMounts = append(c.VolumeMounts, vm) })