diff --git a/pkg/brokerapi/brokerapi_test.go b/pkg/brokerapi/brokerapi_test.go index cd2a682..7fc0496 100644 --- a/pkg/brokerapi/brokerapi_test.go +++ b/pkg/brokerapi/brokerapi_test.go @@ -904,9 +904,10 @@ func (ts *EnvTestSuite) TestBrokerAPI_Bind() { }, }, "metricsEndpoints": []string{ - "http://1-1-1-redis-0.dbaas-test-cluster.metrics.example.tld", - "http://1-1-1-redis-1.dbaas-test-cluster.metrics.example.tld", - "http://1-1-1-redis-2.dbaas-test-cluster.metrics.example.tld", + "http://1-1-1.dbaas-test-cluster.metrics.example.tld", + "http://1-1-1.dbaas-test-cluster.metrics.example.tld/redis/0", + "http://1-1-1.dbaas-test-cluster.metrics.example.tld/redis/1", + "http://1-1-1.dbaas-test-cluster.metrics.example.tld/redis/2", }, }, }, @@ -995,9 +996,10 @@ func (ts *EnvTestSuite) TestBrokerAPI_Bind() { }, }, "metricsEndpoints": []string{ - "http://1-1-1-redis-0.dbaas-test-cluster.metrics.example.tld", - "http://1-1-1-redis-1.dbaas-test-cluster.metrics.example.tld", - "http://1-1-1-redis-2.dbaas-test-cluster.metrics.example.tld", + "http://1-1-1.dbaas-test-cluster.metrics.example.tld", + "http://1-1-1.dbaas-test-cluster.metrics.example.tld/redis/0", + "http://1-1-1.dbaas-test-cluster.metrics.example.tld/redis/1", + "http://1-1-1.dbaas-test-cluster.metrics.example.tld/redis/2", }, }, }, @@ -1086,9 +1088,10 @@ func (ts *EnvTestSuite) TestBrokerAPI_Bind() { "jdbcUrl": "***", "jdbcUrlMariaDb": "***", "metricsEndpoints": []string{ - "http://1-1-1-mariadb-0.dbaas-test-cluster.metrics.example.tld", - "http://1-1-1-mariadb-1.dbaas-test-cluster.metrics.example.tld", - "http://1-1-1-mariadb-2.dbaas-test-cluster.metrics.example.tld", + "http://1-1-1.dbaas-test-cluster.metrics.example.tld", + "http://1-1-1.dbaas-test-cluster.metrics.example.tld/mariadb/0", + "http://1-1-1.dbaas-test-cluster.metrics.example.tld/mariadb/1", + "http://1-1-1.dbaas-test-cluster.metrics.example.tld/mariadb/2", }, }, }, @@ -1296,9 +1299,10 @@ func (ts *EnvTestSuite) TestBrokerAPI_GetBinding() { }, }, "metricsEndpoints": []string{ - "http://1-1-1-redis-0.dbaas-test-cluster.metrics.example.tld", - "http://1-1-1-redis-1.dbaas-test-cluster.metrics.example.tld", - "http://1-1-1-redis-2.dbaas-test-cluster.metrics.example.tld", + "http://1-1-1.dbaas-test-cluster.metrics.example.tld", + "http://1-1-1.dbaas-test-cluster.metrics.example.tld/redis/0", + "http://1-1-1.dbaas-test-cluster.metrics.example.tld/redis/1", + "http://1-1-1.dbaas-test-cluster.metrics.example.tld/redis/2", }, }, }, diff --git a/pkg/crossplane/service_mariadb_database.go b/pkg/crossplane/service_mariadb_database.go index 11374c4..a507f30 100644 --- a/pkg/crossplane/service_mariadb_database.go +++ b/pkg/crossplane/service_mariadb_database.go @@ -304,9 +304,10 @@ func createCredentials(endpoint *Endpoint, username, password, database, databas } if metricsEnabled { creds["metricsEndpoints"] = []string{ - fmt.Sprintf("http://%s-mariadb-0.%s.%s", databaseParent, clusterName, metricsDomain), - fmt.Sprintf("http://%s-mariadb-1.%s.%s", databaseParent, clusterName, metricsDomain), - fmt.Sprintf("http://%s-mariadb-2.%s.%s", databaseParent, clusterName, metricsDomain), + fmt.Sprintf("http://%s.%s.%s", databaseParent, clusterName, metricsDomain), + fmt.Sprintf("http://%s.%s.%s/mariadb/0", databaseParent, clusterName, metricsDomain), + fmt.Sprintf("http://%s.%s.%s/mariadb/1", databaseParent, clusterName, metricsDomain), + fmt.Sprintf("http://%s.%s.%s/mariadb/2", databaseParent, clusterName, metricsDomain), } } diff --git a/pkg/crossplane/service_redis.go b/pkg/crossplane/service_redis.go index 5ae345b..680429c 100644 --- a/pkg/crossplane/service_redis.go +++ b/pkg/crossplane/service_redis.go @@ -85,9 +85,10 @@ func (rsb RedisServiceBinder) GetBinding(ctx context.Context, bindingID string) } if rsb.cp.config.EnableMetrics { creds["metricsEndpoints"] = []string{ - fmt.Sprintf("http://%s-redis-0.%s.%s", rsb.instance.ID(), cn, rsb.cp.config.MetricsDomain), - fmt.Sprintf("http://%s-redis-1.%s.%s", rsb.instance.ID(), cn, rsb.cp.config.MetricsDomain), - fmt.Sprintf("http://%s-redis-2.%s.%s", rsb.instance.ID(), cn, rsb.cp.config.MetricsDomain), + fmt.Sprintf("http://%s.%s.%s", rsb.instance.ID(), cn, rsb.cp.config.MetricsDomain), + fmt.Sprintf("http://%s.%s.%s/redis/0", rsb.instance.ID(), cn, rsb.cp.config.MetricsDomain), + fmt.Sprintf("http://%s.%s.%s/redis/1", rsb.instance.ID(), cn, rsb.cp.config.MetricsDomain), + fmt.Sprintf("http://%s.%s.%s/redis/2", rsb.instance.ID(), cn, rsb.cp.config.MetricsDomain), } }