-
Notifications
You must be signed in to change notification settings - Fork 373
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
Antrea should take into account changes to the configmap without requiring agent restart #723
Comments
@antoninbas Currently Antrea agent loads its config map (antrea-agent.conf) as subpath volume.
Does it make sense to have a separate config map called antrea-agent-updatable.conf and mount it as a volume with no subpath? In Antrea agent, we need to create a poll that keeps on checking this file and various keys for updates and act accordingly. In addition, I am trying to understand why antrea-agent.conf is considered as subPath volume. Do you have any insights? |
I think we can stick with a single ConfigMap, but use different volumes, instead of a single volume with
Then we can have another volume for the other files (controller, cni). I haven't tried it, but I feel like it should work. Maybe @tnqn can also provide some insight. |
@antoninbas @srikartati I don't know a real reason why we used subPath volume, guess it was just straightforward to use subPath to mount a single key of a ConfigMap and we didn't consider dynamic config reloading at that time. |
Ya that would work i guess - from my perspective the reason i was thinking it would be awesome to have this,
|
You also could just have the agent crash immediately on configmap hash changes probably without having to make any other major changes.... |
@antoninbas Any idea what release this is now planned for? |
@mrporcles I am not actively working on this at the moment and it is not scoped for any release. |
The "immutable ConfigMap approach" is described here: #1427 (comment) |
Hi @antoninbas @jianjuns @tnqn I would like propose a new way to detect configmap change: |
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment, or this will be closed in 90 days |
Describe the bug
When updating the antrea-agent.conf in the Antrea YAML manifest and re-applying the manifest, all changes are ignored. One possible solution is to update the ConfigMap name (or update
build/yamls/base/conf/antrea-agent.conf
and rungenerate-manifest.sh
again, which will take care of consistently updating the ConfigMap name); however, this requires an Agent restart.I believe that we should have the following:
enablePrometheusMetrics
, we should be able to update the value without having to restart Agents. On a related note, should we have the ability to turn metrics on/off easily on a per-Agent basis (e.g. using antctl)?To Reproduce
Apply "vanilla" Antrea manifest, uncomment
enablePrometheusMetrics
in the configuration and set it totrue
, then apply the manifest again: metrics will not be enabled.Versions:
Confirmed with Antrea v0.6.0
The text was updated successfully, but these errors were encountered: