Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v23.3.x] allow property aliases in redpanda.yaml, fix aliases not being applied #15760

Prev Previous commit
Next Next commit
config/config_store property_aliases() property_names_and_aliases()
property_aliases() mirrors property_names()
and both get merged in property_names_and_aliases(), to be used instead
of property_names when filtering/scanning over user input

(cherry picked from commit bebf4aa)
andijcr authored and vbotbuildovich committed Dec 19, 2023
commit 87c58da76dfde1a2ee47532e6125ebe57fb81fcc
15 changes: 15 additions & 0 deletions src/v/config/config_store.h
Original file line number Diff line number Diff line change
@@ -194,6 +194,21 @@ class config_store {
return result;
}

std::set<std::string_view> property_aliases() const {
std::set<std::string_view> result;
for (const auto& i : _aliases) {
result.insert(i.first);
}

return result;
}

std::set<std::string_view> property_names_and_aliases() const {
auto all = property_names();
all.merge(property_aliases());
return all;
}

friend std::ostream&
operator<<(std::ostream& o, const config::config_store& c) {
o << "{ ";