Skip to content

Commit

Permalink
cilium: Adjust onConfigUpdate signature
Browse files Browse the repository at this point in the history
Relates: envoyproxy/envoy#29439
Signed-off-by: Tam Mach <tam.mach@cilium.io>
  • Loading branch information
sayboras committed Oct 22, 2023
1 parent 5c621da commit 135d04f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
3 changes: 2 additions & 1 deletion cilium/host_map.cc
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ void PolicyHostMap::startSubscription(Server::Configuration::CommonFactoryContex
subscription_->start({});
}

void PolicyHostMap::onConfigUpdate(const std::vector<Envoy::Config::DecodedResourceRef>& resources,
absl::Status PolicyHostMap::onConfigUpdate(const std::vector<Envoy::Config::DecodedResourceRef>& resources,
const std::string& version_info) {
ENVOY_LOG(debug, "PolicyHostMap::onConfigUpdate({}), {} resources, version: {}", name_,
resources.size(), version_info);
Expand Down Expand Up @@ -189,6 +189,7 @@ void PolicyHostMap::onConfigUpdate(const std::vector<Envoy::Config::DecodedResou
return newmap;
});
logmaps("onConfigUpdate");
return absl::OkStatus();
}

void PolicyHostMap::onConfigUpdateFailed(Envoy::Config::ConfigUpdateFailureReason,
Expand Down
5 changes: 3 additions & 2 deletions cilium/host_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,16 @@ class PolicyHostMap : public Singleton::Instance,
}

// Config::SubscriptionCallbacks
void onConfigUpdate(const std::vector<Envoy::Config::DecodedResourceRef>& resources,
absl::Status onConfigUpdate(const std::vector<Envoy::Config::DecodedResourceRef>& resources,
const std::string& version_info) override;
void onConfigUpdate(const std::vector<Envoy::Config::DecodedResourceRef>& added_resources,
absl::Status onConfigUpdate(const std::vector<Envoy::Config::DecodedResourceRef>& added_resources,
const Protobuf::RepeatedPtrField<std::string>& removed_resources,
const std::string& system_version_info) override {
// NOT IMPLEMENTED YET.
UNREFERENCED_PARAMETER(added_resources);
UNREFERENCED_PARAMETER(removed_resources);
UNREFERENCED_PARAMETER(system_version_info);
return absl::OkStatus();
}
void onConfigUpdateFailed(Envoy::Config::ConfigUpdateFailureReason,
const EnvoyException* e) override;
Expand Down
3 changes: 2 additions & 1 deletion cilium/network_policy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ void ThreadLocalPolicyMap::Update(std::vector<std::shared_ptr<PolicyInstanceImpl
}
}

void NetworkPolicyMap::onConfigUpdate(
absl::Status NetworkPolicyMap::onConfigUpdate(
const std::vector<Envoy::Config::DecodedResourceRef>& resources,
const std::string& version_info) {
ENVOY_LOG(debug, "NetworkPolicyMap::onConfigUpdate({}), {} resources, version: {}", name_,
Expand Down Expand Up @@ -932,6 +932,7 @@ void NetworkPolicyMap::onConfigUpdate(
#pragma clang diagnostic ignored "-Wnull-dereference"
transport_factory_context_->setInitManager(*static_cast<Init::Manager*>(nullptr));
#pragma clang diagnostic pop
return absl::OkStatus();
}

void NetworkPolicyMap::onConfigUpdateFailed(Envoy::Config::ConfigUpdateFailureReason,
Expand Down
5 changes: 3 additions & 2 deletions cilium/network_policy.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,16 @@ class NetworkPolicyMap : public Singleton::Instance,
void runAfterAllThreads(std::function<void()>) const;

// Config::SubscriptionCallbacks
void onConfigUpdate(const std::vector<Envoy::Config::DecodedResourceRef>& resources,
absl::Status onConfigUpdate(const std::vector<Envoy::Config::DecodedResourceRef>& resources,
const std::string& version_info) override;
void onConfigUpdate(const std::vector<Envoy::Config::DecodedResourceRef>& added_resources,
absl::Status onConfigUpdate(const std::vector<Envoy::Config::DecodedResourceRef>& added_resources,
const Protobuf::RepeatedPtrField<std::string>& removed_resources,
const std::string& system_version_info) override {
// NOT IMPLEMENTED YET.
UNREFERENCED_PARAMETER(added_resources);
UNREFERENCED_PARAMETER(removed_resources);
UNREFERENCED_PARAMETER(system_version_info);
return absl::OkStatus();
}
void onConfigUpdateFailed(Envoy::Config::ConfigUpdateFailureReason,
const EnvoyException* e) override;
Expand Down

0 comments on commit 135d04f

Please sign in to comment.