Skip to content

Commit

Permalink
policy: Log info on new stream
Browse files Browse the repository at this point in the history
Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
  • Loading branch information
jrajahalme authored and sayboras committed Oct 31, 2024
1 parent dc83bb3 commit db4d2bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cilium/network_policy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1272,10 +1272,12 @@ NetworkPolicyMap::onConfigUpdate(const std::vector<Envoy::Config::DecodedResourc
// New security identities (e.g., for FQDN policies) only get inserted to the new IP cache,
// so open it before the workers get a chance to enforce policy on the new IDs.
if (isNewStream()) {
ENVOY_LOG(info, "New NetworkPolicy stream");

// Get ipcache singleton only if it was successfully created previously
IPCacheSharedPtr ipcache = IPCache::GetIPCache(context_);
if (ipcache != nullptr) {
ENVOY_LOG(trace, "Reopening ipcache on new stream");
ENVOY_LOG(info, "Reopening ipcache on new stream");
ipcache->Open();
}
}
Expand Down

0 comments on commit db4d2bf

Please sign in to comment.