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

Apply once when WatchInterval == 0 #3994

Conversation

zsuzhengdu
Copy link
Contributor

Changes

Fix prometheus-operator/prometheus-operator#3061 (comment)

Verification

Manually tested. Working on unit tests.

Signed-off-by: Du Zheng <zsuzhengdu@gmail.com>
@zsuzhengdu zsuzhengdu force-pushed the f/Added-flag-one-off-to-run-process-once-instead-of-watching branch from b3a3939 to fe63040 Compare March 31, 2021 13:52
Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

Makes sense to me, thanks.

However, I have a small suggestion. What about doing one-off if WatchInterval time.Duration is 0? This makes sense logically and will allow us to have consistent API for reloader. 🤗 WDYT?

Signed-off-by: Du Zheng <zsuzhengdu@gmail.com>
@zsuzhengdu zsuzhengdu force-pushed the f/Added-flag-one-off-to-run-process-once-instead-of-watching branch from 0fe6904 to 29e2804 Compare April 1, 2021 13:38
Signed-off-by: Du Zheng <zsuzhengdu@gmail.com>
@zsuzhengdu zsuzhengdu force-pushed the f/Added-flag-one-off-to-run-process-once-instead-of-watching branch from 3b82659 to 5a4a378 Compare April 2, 2021 22:34
Signed-off-by: Du Zheng <zsuzhengdu@gmail.com>
@zsuzhengdu zsuzhengdu force-pushed the f/Added-flag-one-off-to-run-process-once-instead-of-watching branch from a648cac to 463f9dd Compare April 2, 2021 22:41
Signed-off-by: Du Zheng <zsuzhengdu@gmail.com>
@zsuzhengdu zsuzhengdu force-pushed the f/Added-flag-one-off-to-run-process-once-instead-of-watching branch from 7169f2b to bff5822 Compare April 3, 2021 03:12
@zsuzhengdu zsuzhengdu changed the title Added option OneOff to run the process once instead of watching Apply once when WatchInterval == 0 Apr 3, 2021
@zsuzhengdu
Copy link
Contributor Author

@bwplotka Would you please help to give another review on this PR? Thanks!

bwplotka
bwplotka previously approved these changes Apr 6, 2021
Copy link
Member

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

Solid. Thanks!

pkg/reloader/reloader.go Outdated Show resolved Hide resolved
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.

Prometheus pod cannot find prometheus.env.yaml on start
2 participants