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

feat: legacy config provider #1549

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shunjiazhu
Copy link
Contributor

@shunjiazhu shunjiazhu commented Jun 18, 2024

  1. 调整 iLogtail 的 config provider 的结构,允许私有实现 config provider
  2. 为iLogtail 2.0添加一个兼容1.0配置的config provider,名为LegacyCommonConfigProvider:
    每隔10s检查user_yaml_config.d/下的yaml文件,如果发生变动,修改格式之后复制到config/legacy/目录下:

旧文件simple.yaml:

enable: true
inputs:
  - Type: file_log         
    LogPath: .             
    FilePattern: simple.log
    MaxDepth: 10
flushers:
  - Type: flusher_stdout
    OnlyStdout: true

新文件simple.yaml:

enable: true
inputs:
  - Type: input_file
    MaxDirSearchDepth: 10
    FilePaths:
      - ./**/simple.log
flushers:
  - Type: flusher_stdout
    OnlyStdout: true

同时,如果有version:v2字段,也会改成global: StructureType: v2.
旧文件yaml:

enable: true
version: v2
inputs:
  - Type: service_uds_server

新文件yaml:

enable: true
global:
  StructureType: v2
inputs:
  - Type: service_uds_server

@henryzhx8 henryzhx8 added the feature request New feature request label Jun 18, 2024
@henryzhx8 henryzhx8 added this to the v2.0 milestone Jun 18, 2024
@henryzhx8 henryzhx8 removed this from the v2.0 milestone Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants