diff --git a/services/provider/server/server.go b/services/provider/server/server.go index 4408ee9def..724ef5547b 100644 --- a/services/provider/server/server.go +++ b/services/provider/server/server.go @@ -521,17 +521,20 @@ func (s *OCSProviderServer) getExternalResources(ctx context.Context, consumerRe Kind: "Secret", Data: mustMarshal(map[string]string{ "auth_token": string(authToken), - "mgmt_addr": noobaaMgmtAddress, + "mgmt_addr": fmt.Sprintf("https://%s:443", noobaaMgmtAddress), }), }) extR = append(extR, &pb.ExternalResource{ - Name: "noobaa-remote", + Name: "noobaa", Kind: "Noobaa", Data: mustMarshal(&nbv1.NooBaaSpec{ JoinSecret: &v1.SecretReference{ Name: "noobaa-remote-join-secret", }, + CleanupPolicy: nbv1.CleanupPolicySpec{ + AllowNoobaaDeletion: true, + }, }), }) return extR, nil diff --git a/services/provider/server/server_test.go b/services/provider/server/server_test.go index 6e69537829..35404e871b 100644 --- a/services/provider/server/server_test.go +++ b/services/provider/server/server_test.go @@ -67,11 +67,14 @@ var noobaaSpec = &nbv1.NooBaaSpec{ JoinSecret: &v1.SecretReference{ Name: "noobaa-remote-join-secret", }, + CleanupPolicy: nbv1.CleanupPolicySpec{ + AllowNoobaaDeletion: true, + }, } var joinSecret = map[string]string{ "auth_token": "authToken", - "mgmt_addr": "noobaaMgmtAddress", + "mgmt_addr": "https://noobaaMgmtAddress:443", } var mockExtR = map[string]*externalResource{ @@ -105,8 +108,8 @@ var mockExtR = map[string]*externalResource{ Kind: "Secret", Data: joinSecret, }, - "noobaa-remote": { - Name: "noobaa-remote", + "noobaa": { + Name: "noobaa", Kind: "Noobaa", Data: noobaaSpec, },