From 5fd238cd3c5cbcc6ea0910a11dcfdeb0d2bd0b36 Mon Sep 17 00:00:00 2001 From: Clint Date: Thu, 19 Dec 2024 14:33:59 -0600 Subject: [PATCH] Update src/pepr/operator/index.ts Co-authored-by: Micah Nagel --- src/pepr/operator/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pepr/operator/index.ts b/src/pepr/operator/index.ts index bcddba27c..df2b051b5 100644 --- a/src/pepr/operator/index.ts +++ b/src/pepr/operator/index.ts @@ -42,7 +42,11 @@ if (process.env.PEPR_WATCH_MODE === "true" || process.env.PEPR_MODE === "dev") { void initAPIServerCIDR(); } -void initAllNodesTarget(); +// Pre-populate the Node CIDR list since we are not persisting it +// Note ignore any errors since the watch will still be running hereafter +if (process.env.PEPR_WATCH_MODE === "true" || process.env.PEPR_MODE === "dev") { + void initAllNodesTarget(); +} // Watch for changes to the API server EndpointSlice and update the API server CIDR // Skip if a CIDR is defined in the UDS Config