-
Notifications
You must be signed in to change notification settings - Fork 593
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
KIC 2.0: handle dump-config flag #1308
Comments
Yeah, that's the rough plan, probably under The other thing I'd like to add is a short history of the last few generated configurations rather than only recording the latest good/bad config: we've found that one of the most common use cases for this is to figure out why the controller is updating configuration when we wouldn't expect it to. Getting several iterations of config updates with the single dumps is possible by just copying it out multiple times, but you have to time it manually, which is annoying. |
I like to work on this. I am thinking of providing the option to dump the config using the flag and also serving through an interface. and can we later deprecate the flag? WDYT @rainest |
@tharun208 sure, go ahead. We do want to leave the flag in place since enabling these can expose sensitive info within the config somewhere it wouldn't normally be accessible, and it should only be on temporarily when collecting diagnostic info though, so please don't remove that. |
@rainest, is it okay to extend the |
Yes with some caveats. You'll note that the dump handling there doesn't always use the original generated config. Dumping supports both a redacted mode (omitting credentials and certificates) and full/sensitive mode. The redacted mode needs to regenerate configuration by passing |
started working on this. |
I don't see any particularly good place to stick it. Originally we added the dir to the user config struct and passed that (which already included the dump mode) to They arguably shouldn't go into the As-is, I think these should be new fields in The latter's signature is getting unwieldy at this point. @shaneutt do you think it'd make sense to refactor it to accept a new struct containing static config (probably |
@rainest, also I am planning to expose the config on the web interface, can I include the same in this pr or? |
Yep, that's fine. It'd be an additional part of https://github.com/Kong/kubernetes-ingress-controller/blob/next/railgun/internal/diagnostics/server.go To implement that you'd presumably add a channel to ship the config blob from the update loop to the diagnostics server. |
@tharun208 hey, checking in on this again. We'd like to put out a feature complete 2.x beta by the end of July, so we plan to take over development of this to get it out on time for that. Did you have any draft code for this already in progress that you wanted to publish for us to try and work on collaboratively, or was it as of yet not started? |
@rainest I haven't started working on this. I am un-assigning myself from this issue. |
--dump-config
enables a diagnostic dump of generated configuration. It is disabled by default.The text was updated successfully, but these errors were encountered: