Skip to content

Commit

Permalink
Fix namespace verification
Browse files Browse the repository at this point in the history
  • Loading branch information
olevitt committed Apr 23, 2020
1 parent 09c820e commit b88d279
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ private String determineNamespace(User user) {
owner.setType(KubernetesService.Owner.OwnerType.USER);
String namespaceId = KUBERNETES_NAMESPACE_PREFIX + owner.getId();
// If namespace is not present, create it
if (!kubernetesService.getNamespaces(owner).contains(namespaceId)) {
if (kubernetesService.getNamespaces(owner).stream().filter(namespace -> namespace.getMetadata().getName().equalsIgnoreCase(namespaceId)).count() == 0) {
kubernetesService.createNamespace(namespaceId, owner);
}
return namespaceId;
Expand Down

0 comments on commit b88d279

Please sign in to comment.