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

support configServer V2 #1592

Merged
merged 41 commits into from
Jul 16, 2024
Merged

support configServer V2 #1592

merged 41 commits into from
Jul 16, 2024

Conversation

quzard
Copy link
Collaborator

@quzard quzard commented Jul 5, 2024

No description provided.

@quzard quzard requested a review from yyuuttaaoo July 5, 2024 07:04
@yyuuttaaoo yyuuttaaoo changed the title support configServer V2 [WIP] support configServer V2 Jul 8, 2024
@PalanQu
Copy link

PalanQu commented Jul 8, 2024

请问配置同步功能是否可以支持在ilogtail agent启动的时候指定一些环境变量的key,然后将key与环境变量的值作为一组label上传到config server,config server可以通过这些key对group进行管控?

@quzard
Copy link
Collaborator Author

quzard commented Jul 10, 2024

请问配置同步功能是否可以支持在ilogtail agent启动的时候指定一些环境变量的key,然后将key与环境变量的值作为一组label上传到config server,config server可以通过这些key对group进行管控?

有个FillAttributes,可以重载该函数来自定义实现这部分

core/pipeline/PipelineManager.cpp Show resolved Hide resolved
core/config/provider/CommonConfigProvider.cpp Outdated Show resolved Hide resolved
core/config/provider/CommonConfigProvider.cpp Outdated Show resolved Hide resolved
core/config/provider/CommonConfigProvider.cpp Outdated Show resolved Hide resolved
core/config/provider/CommonConfigProvider.cpp Outdated Show resolved Hide resolved
filesystem::create_directories(mSourceDir, ec);
ConfigWatcher::GetInstance()->AddSource(mSourceDir, &mMux);
filesystem::create_directories(mPipelineSourceDir, ec);
ConfigWatcher::GetInstance()->AddPipelineSource(mPipelineSourceDir, &mMux);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

看看这个锁能不能删掉,感觉作用不大

core/config/feedbacker/ConfigFeedbackReceiver.cpp Outdated Show resolved Hide resolved
core/config/provider/CommonConfigProvider.h Outdated Show resolved Hide resolved
core/config/provider/CommonConfigProvider.cpp Outdated Show resolved Hide resolved
core/config/provider/CommonConfigProvider.cpp Outdated Show resolved Hide resolved
core/config/provider/CommonConfigProvider.cpp Outdated Show resolved Hide resolved
unordered_map<string, Config*>& configMap = ConfigManager::GetInstance()->mNameConfigMap;
unordered_map<string, Config*>::iterator it = configMap.find("commonreg.com");
unordered_map<string, PipelineConfig*>& configMap = ConfigManager::GetInstance()->mNameConfigMap;
unordered_map<string, PipelineConfig*>::iterator it = configMap.find("commonreg.com");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
这两个文件名?

LOG_WARNING(sLogger,
("failed to create dir for local config",
"manual creation may be required")("error code", ec.value())("error msg", ec.message()));
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这部分代码下一步抽离到LocalProvider的Init里。

@messixukejia messixukejia merged commit c3252b1 into alibaba:main Jul 16, 2024
11 of 12 checks passed
@henryzhx8 henryzhx8 added core Core feature feature request New feature request labels Jul 23, 2024
@henryzhx8 henryzhx8 added this to the v2.2 milestone Jul 23, 2024
@yyuuttaaoo yyuuttaaoo changed the title [WIP] support configServer V2 support configServer V2 Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core feature feature request New feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants