Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion internal/persistence/aivencredentials/queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (

"github.com/nais/api/internal/activitylog"
"github.com/nais/api/internal/auth/authz"
"github.com/nais/api/internal/environmentmapper"
"github.com/nais/api/internal/graph/apierror"
"github.com/nais/api/internal/kubernetes"
"github.com/nais/api/internal/slug"
Expand Down Expand Up @@ -205,7 +206,8 @@ func CreateKafkaCredentials(ctx context.Context, input CreateKafkaCredentialsInp
// getClient returns the dynamic client for the given environment (cluster).
func getClient(ctx context.Context, environmentName string) (dynamic.Interface, error) {
l := fromContext(ctx)
client, ok := l.dynamicClients[environmentName]
clusterName := environmentmapper.ClusterName(environmentName)
client, ok := l.dynamicClients[clusterName]
Comment thread
rbjornstad marked this conversation as resolved.
if !ok {
return nil, fmt.Errorf("unknown environment: %s", environmentName)
}
Expand Down
Loading