Skip to content

Commit

Permalink
Fix Redis URL
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Saratura committed Oct 12, 2023
1 parent 993448d commit f5380d8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile.vars.mk
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ UPBOUND_PACKAGE_IMG ?= $(UPBOUND_CONTAINER_REGISTRY)/$(PROJECT_OWNER)/$(PROJECT_
## KIND:setup

# https://hub.docker.com/r/kindest/node/tags
KIND_NODE_VERSION ?= v1.24.0
KIND_NODE_VERSION ?= v1.26.6
KIND_IMAGE ?= docker.io/kindest/node:$(KIND_NODE_VERSION)
KIND_KUBECONFIG ?= $(kind_dir)/kind-kubeconfig-$(KIND_NODE_VERSION)
KIND_CLUSTER ?= $(PROJECT_NAME)-$(KIND_NODE_VERSION)
Expand Down
4 changes: 2 additions & 2 deletions operator/rediscontroller/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ func (ts *RedisControllerTestSuite) getRedisResponse(mg *exoscalev1.Redis, setti
providerSpec := mg.Spec.ForProvider
master := oapi.DbaasNodeStateRoleMaster
running := oapi.EnumServiceStateRunning

uri := "https://foo:bar@baz:5321"
return &oapi.GetDbaasServiceRedisResponse{
JSON200: &oapi.DbaasServiceRedis{
Maintenance: &oapi.DbaasServiceMaintenance{
Expand All @@ -318,7 +318,7 @@ func (ts *RedisControllerTestSuite) getRedisResponse(mg *exoscalev1.Redis, setti
}{
Uri: &[]string{"https://foo:bar@baz:5321"},
},
Uri: nil,
Uri: &uri,
UriParams: nil,
Users: nil,
Version: nil,
Expand Down
5 changes: 3 additions & 2 deletions operator/rediscontroller/observe.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,11 @@ func isUpToDate(current, external *exoscalev1.RedisParameters, log logr.Logger)
}

func connectionDetails(in oapi.DbaasServiceRedis) (map[string][]byte, error) {
if in.ConnectionInfo == nil || len(*in.ConnectionInfo.Uri) == 0 {
if in.Uri == nil {
return map[string][]byte{}, nil
}
uri := (*in.ConnectionInfo.Uri)[0]

uri := *in.Uri
parsed, err := url.Parse(uri)
if err != nil {
return nil, err
Expand Down

0 comments on commit f5380d8

Please sign in to comment.