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

enable system controller config #345

Merged
merged 1 commit into from
Feb 7, 2023

Conversation

changweige
Copy link
Member

  1. move system controller config to a dedicated struct
  2. capable of configuring daemon cpu profile duration

Signed-off-by: Changwei Ge gechangwei@bytedance.com

@codecov-commenter
Copy link

Codecov Report

Base: 28.25% // Head: 28.21% // Decreases project coverage by -0.04% ⚠️

Coverage data is based on head (d651b4c) compared to base (13a9e05).
Patch coverage: 19.23% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #345      +/-   ##
==========================================
- Coverage   28.25%   28.21%   -0.04%     
==========================================
  Files          37       37              
  Lines        3667     3672       +5     
==========================================
  Hits         1036     1036              
- Misses       2510     2515       +5     
  Partials      121      121              
Impacted Files Coverage Δ
config/global.go 32.65% <0.00%> (-2.91%) ⬇️
pkg/manager/daemon_adaptor.go 0.00% <0.00%> (ø)
config/config.go 19.29% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@sctb512 sctb512 left a comment

Choose a reason for hiding this comment

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

Others, LGTM

enable = true

[system.debug]
daemon_cpu_profile_duration_secs = 5
Copy link
Member

Choose a reason for hiding this comment

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

Shall we add a comment for this item in toml file?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added

@@ -122,7 +122,7 @@ func NewSnapshotter(ctx context.Context, cfg *config.SnapshotterConfig) (snapsho
}()
}

if cfg.EnableSystemController {
if config.SystemControllerEnabled() {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe IsSystemControllerEnabled or GetSystemControllerEnabled is better to understand?

Copy link
Member Author

Choose a reason for hiding this comment

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

Renamed

# Whether tp enable stargz support
enable_stargz = false
# Whether snapshotter should try to clean up resources when it is closed
cleanup_on_close = false

[system]
# Snapshotter's debug and trace HTTP server interface
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can the interface address be configurated? Should be documented here.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. This PR now includes changes that add the config entry to customize the system controller address path

1. move system controller config to a dedicated struct
2. capable of configuring daemon cpu profile duration.
3. capable of configuring system controller address path

Signed-off-by: Changwei Ge <gechangwei@bytedance.com>
Copy link
Member

@sctb512 sctb512 left a comment

Choose a reason for hiding this comment

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

LGTM

@imeoer imeoer merged commit 36e00c2 into containerd:main Feb 7, 2023
@changweige changweige deleted the enhance-system-controller branch February 27, 2023 08:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants