Conversation
3ee3ad6 to
d238940
Compare
There was a problem hiding this comment.
Pull request overview
This PR parameterizes the reloader configuration by allowing the namespace selector, target environment variable, termination grace period, and debounce period to be set via environment variables or command-line flags. Previously, these settings were hardcoded or only available through environment variables.
Key changes:
- Introduced a
ProcessManagerConfigstruct to hold all configuration parameters - Replaced hardcoded constants with configurable flags and environment variables with defaults
- Refactored the
runfunction to accept a configuration object instead of individual parameters
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| main.go | Added flag parsing for configuration parameters, helper functions for reading environment variables with defaults, and copyright header |
| reloader.go | Introduced ProcessManagerConfig struct, refactored ProcessManager to use configuration, updated UpdateNamespaces to accept a slice instead of a string, and added copyright header |
| reloader_test.go | Updated test to use new ProcessManagerConfig struct instead of environment variables and added copyright header |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Ladicle
left a comment
There was a problem hiding this comment.
Could you please update README.md as well?
d238940 to
5da7d5a
Compare
Done. I left the note about the |
Allow setting the namespace selector, target environment variable, termination grace period, and debounce period via environment variables or flags. A new `--kubeconfig` flag is added to specify the path to the `kubeconfig` file. Signed-off-by: Ian Lewis <ianlewis@preferred.jp>
5da7d5a to
25d5c85
Compare
Allow setting the namespace selector, target environment variable, termination grace period, and debounce period via environment variables or flags.
Fixes #2