Skip to content

Commit 79d54d8

Browse files
author
Kautilya Tripathi
committed
backend: Fix cluster addition
This ensures that: We only store contexts that actually match the requested cluster name. We don't return a context key unless we've successfully stored a context. Fixes: #2622 Signed-off-by: Kautilya Tripathi <ktripathi@microsoft.com>
1 parent c97a07c commit 79d54d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backend/cmd/stateless.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ func (c *HeadlampConfig) handleStatelessReq(r *http.Request, kubeConfig string)
120120
key = customObj.CustomName + userID
121121
}
122122
} else if context.Name != clusterName {
123-
contextKey = clusterName
123+
// Skip contexts that don't match the requested cluster name
124124
continue
125125
}
126126

0 commit comments

Comments
 (0)