Skip to content

Reload config file without restarting the pod #644

Open

Description

@syd20

To build upon feature request in #484, it would be helpful to have cloudprober read changes to the config file and update without the need to restart the pod. Currently I have a dynamic setup on EKS where I have multiple probes defined and changes to one requires me to regenerate the config file and then also restart the pod for the changes to take effect.

The option of using targets is not beneficial in this case but the underlying logic behind the targets file is what I would like to see for config files. With the option of reading from S3 scheduled for some upcoming release, it would be good to have a way where cloudprober reads the updated config and reloads (without a restart). Filebeat does something similar

Activity

  1. added
    enhancement
    on Dec 14, 2023
  2. self-assigned this
    on Dec 17, 2023
  3. manugarg commented on Dec 17, 2023

    @manugarg
    Contributor

    Copying from what I said on #484...

    Live reload has come up a few times before. I've been reluctant of adding it because clearing a probe's (and other) state cleanly on its removal was not very well implemented. We've certainly improved in that area quite a bit and can look at it again.

  4. JasonWBrown commented on Jan 3, 2026

    @JasonWBrown

    @manugarg we've been using cloudprober for a bit at my company for a bit primarily because it is extendable, however this feature "live reload of config changes" comes up quite a bit. We've been working around the issue of reload by killing containers/pods on config change. Each team has its own flavor of watcher/restart mechanism. Its starting to get unwieldily.

    I'd like to bring this back up as a first class feature request. I could build the feature out. If you would like we could start with the clean up first. Reply with what state needs to be cleaned up and I can take a crack at the probe state clean up and live reload in 2026.

  5. JasonWBrown commented on Jan 15, 2026

    @JasonWBrown

    @manugarg took a stab at implementing this feature. Happy to make any changes, we're looking to use this project in a multi tenant environment and requiring restart has the side effect of impacting customers not changing their probes.

    I've looked at the stale probes and it looks like prometheus metrics are still exposed on stale probes. Counts still exist.

    My first thought is to add a new function on the probe interface.

    type Probe interface {
    	Init(name string, opts *options.Options) error
    	Start(ctx context.Context, dataChan chan *metrics.EventMetrics)
    	//Cleanup removes any state. 
    	CleanUp(ctx context.Context, opts *options.Options, , dataChan chan *metrics.EventMetrics) 
    }
    

    If I'm missing any details let me know.

  6. manugarg commented on Jan 15, 2026

    @manugarg
    Contributor

    Sorry @JasonWBrown your message got lost. I actually had a working implementation of the reload already. The reason I didn't push it was mainly:

    1. Very few users need it. I've deployed Cloudprober in small-to-large settings and it's usually not needed, unless you're doing something extreme.
    2. It's been a while that someone asked for it.

    For example, what we do at my current company is to configure pods with "reloader.stakater.com: true" which reloads pods automatically on configmap change.

    I understand it's not the same thing as "hot reload", but it covers most of the concerns people had in the beginning (and I guess that's why they started asking for this feature). I'll take a look at your PR and also what I had written some time back, but it will take me some time to get back. It's bit busy right now and I am prioritizing PRs based on urgency (bug-fixes), demand, and their size.

  7. conallob commented on Jan 16, 2026

    @conallob
    Contributor

    I wouldn't mind a reload functionality for cloudprober deployed outside of kubernetes

    Could adding it, but with a flag to enable the functionality be a reasonable middle ground?

  8. JasonWBrown commented on Jan 21, 2026

    @JasonWBrown

    Very few users need it. I've deployed Cloudprober in small-to-large settings and it's usually not needed, unless you're doing something extreme.

    I'm in this minority. I have teams running Cloudprober on prem VMs. They are running docker pure with no container orchestration. Meaning there are no docker compose or no docker swarm provisioning tools.

    The config is mapped via custom extension, the flavor is always a little different but generally is:

    1. boot
    2. Pull config from consul
    3. Watcher on remote consul config
    4. If config changes kill pod

    This is done either by 1. a side car, 2. the binary itself or 3, by a process within the container.

    note I'm also running this in Open Shift and doing something similar to the "if change bounce pod". I'm not using the "reloader.stakater.com: true" nor am I using a config map, but its the same concept.

    The problem with each of these approaches where we bounce the container/pod in my opinion every probe in that container is impacted. This problem persists on both VM and kubernetes deployments.

    IMO we should be able to change probe configurations without affecting other probes. Bouncing a pod when you only care about the small number of probes for your org seems trivial. Bouncing the pod at enterprise scale is a different problem.

    Ideally I shouldn't have to spin up a new cloudprober instance for every new probe configuration or domain. Running potentially vast quantities of probes should be doable in a single cloudprober instance.

    @manugarg happy to hear your thoughts or counter points here.

  9. manugarg commented on Apr 10, 2026

    @manugarg
    Contributor

    IMO we should be able to change probe configurations without affecting other probes. Bouncing a pod when you only care about the small number of probes for your org seems trivial. Bouncing the pod at enterprise scale is a different problem.

    Ideally I shouldn't have to spin up a new cloudprober instance for every new probe configuration or domain. Running potentially vast quantities of probes should be doable in a single cloudprober instance.

    @manugarg happy to hear your thoughts or counter points here.

    For the situations I've been in, I've been able to run one (or more) instance per team, where impact of one config change causing restart is minimal, because you're starting only one team's instances. But I can imagine situations where it doesn't make sense to shard by team. One model you can follow is to use some sort of Cloudprober controller that uses Cloudprober's gRPC interface to add/remove probes -- I know some companies follow that model.

  10. shivamgupta211-fx commented on Sep 8, 2026

    @shivamgupta211-fx

    +1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions