Fix: dont ignore empty string for kubernetes podSelector (#2372)

This commit is contained in:
shamoon 2023-11-24 16:15:42 -08:00 committed by GitHub
parent c2729e302d
commit 6b35443100
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -257,7 +257,7 @@ export async function servicesFromKubernetes() {
constructedService.external = constructedService.external =
String(ingress.metadata.annotations[`${ANNOTATION_BASE}/external`]).toLowerCase() === "true"; String(ingress.metadata.annotations[`${ANNOTATION_BASE}/external`]).toLowerCase() === "true";
} }
if (ingress.metadata.annotations[`${ANNOTATION_BASE}/pod-selector`]) { if (ingress.metadata.annotations[`${ANNOTATION_BASE}/pod-selector`] !== undefined) {
constructedService.podSelector = ingress.metadata.annotations[`${ANNOTATION_BASE}/pod-selector`]; constructedService.podSelector = ingress.metadata.annotations[`${ANNOTATION_BASE}/pod-selector`];
} }
if (ingress.metadata.annotations[`${ANNOTATION_BASE}/ping`]) { if (ingress.metadata.annotations[`${ANNOTATION_BASE}/ping`]) {