Check the existence of the expected service when ignoring the NodePort already allocated error

Check the existence of the expected service when ignoring the NodePort already allocated error

Fixes 2308

Signed-off-by: Wenkai Yin(尹文开) <yinw@vmware.com>
This commit is contained in:
Wenkai Yin(尹文开)
2022-01-11 09:55:49 +08:00
parent 5c5947f0d9
commit 62779bbcc6
4 changed files with 152 additions and 21 deletions

View File

@@ -162,3 +162,14 @@ func VSLs(items ...metav1.Object) *APIResource {
Items: items,
}
}
func Services(items ...metav1.Object) *APIResource {
return &APIResource{
Group: "",
Version: "v1",
Name: "services",
ShortName: "svc",
Namespaced: true,
Items: items,
}
}