-
Notifications
You must be signed in to change notification settings - Fork 99
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
Fix up use of helmette.SafeLookup calls #1526
Conversation
I don't think I understand the issue that we're attempting to solve here. What situation do we need to authenticate to Kubenernetes with mTLS and how is it being misconfigured? IIUC all the configuration for TLS/auth/etc should be present in the |
@chrisseto So, it could be that I'm initializing the
And sorry, it's potentially not the client-side TLS certificate, it looks like it could just be the root CA is getting pulled from the |
Oh, I'd actually be suspicious of |
@chrisseto yeah, so there's some potential fields that could affect this and some other stuff, namely Cluster seems to have file-based fields that point to cert data. I wouldn't be surprised if something in the What are you thinking the way to proceed is? Trying to jump in an figure out exactly how we need to change |
I lean towards fixing existing paths if at all possible as this will very likely come and bite us again. Hopefully it's just a matter of reading a few certs from the disk! If it's not as simple as that, I'd vote to remove this method entirely so we don't have to fight these issues again and see if we could update |
Got it, sounds good, I'll take a pass at modifying the
So it does seem to be leveraging the on-disk files along with JWT tokens due to being from a service account, so we'll need to handle all of that. |
…n using controller-runtime
345fb20
to
21d7a15
Compare
@chrisseto ok, so I just force updated with the fix for the |
Make RestToConfig work with file-system based rest.Config such as when using controller-runtime.
redpanda-data/redpanda-operator#226 helped me discover that the clients initialized using a
rest.Config
passed in adot
context weren't being initialized properly when that config comes from the controller-runtime, namely since the operator service was using a service account, all of its CA/certificate/authentication settings were being pulled from disk. This fixes theRestToConfig
method to properly initialize aclientcmdapi.Config
object from arest.Config
containing parameters pulled from disk.