Closed lemonsrc closed 6 years ago
Nice, thanks for the contribution @lemonsrc - looks like a use case I missed when trying to improve the mix config support lately.
I do wonder if it would be better to convert your map to the appropriate Auth
struct at the point it's read from the mix config. Would that work for your use case, or do you sometimes pass a map in as the server
parameter to the run
functions as well?
@obmarg Talking with @lemonsrc, for our use case, we only use it this way. So whatever implementation that you think needs to come in or take place, it won't affect anything we're doing so long as we can continue to use this token config in the mix config still. If you have some direction on how you'd like us to solve that for the purposes of this PR, we can do that in here too.
@jeremytregunna ok, cool.
So I put together a WIP implementation of a fix last night in this commit. I just need to get some tests of the Server.from_map
function written. Happy to do this myself, but it may take a day or two. Though if either of you guys have free time to do it before then, that'd also be good. Just let me know I guess...
Thanks for the contribution here @lemonsrc & @jeremytregunna but I've ended up merging my implementation from #41 for this. Pretty sure it should cover your use case, but let me know if I've got that wrong.
@obmarg Cool, thank you. We've made that change, and we'll file a new issue if there are problems.
When using Kazan in our projects, we tend to use an auth token as opposed to passing the kubeconfig path like it is mentioned in the Kazan README. The issue we have had is that the auth header is not added to requests when using the following config because it does not match when building the list of headers.
We have been using these changes [in the PR] to use an auth token from the config. Is there a better/preferred way to accomplish this or should we consider merging this in to allow for this use case?