omrikiei / ktunnel

A cli that exposes your local resources to kubernetes
GNU General Public License v3.0
975 stars 75 forks source link

Use current time when waiting for injector to be ready #48

Closed sjones512 closed 3 years ago

sjones512 commented 3 years ago

Re: #47

I'm not too familiar with the k8 api, so I don't know if there is a way to get the updated time for the deployment, but the creation time did not appear to be changing when updated. Using the current time seems to achieve the desired effect.

omrikiei commented 3 years ago

Hey @sjones512 , this is actually a recent change in ktunnel.. using the current time caused an issue because of undesired offset between the client and server. I'll take a deeper look in the next couple of days to establish a better behaviour.

omrikiei commented 3 years ago

more reference: https://github.com/omrikiei/ktunnel/commit/89d9e1daa3c9789ca83c01e8a2612ffa31d39bed

sjones512 commented 3 years ago

Hi @omrikiei,

I'm not surprised that it isn't as simple as I hoped. Thanks for the additional information.

Looks like you probably have some other solutions in the works. I decided to mess around with it a little more. I borrowed some of the code from kubectl rollout status for determining when a rollout is complete.

Not sure if this is a direction you would want to go, but thought I'd share. It's kind of a WIP.

kubectl rollout status code for reference: kubectl rollout status

omrikiei commented 3 years ago

looks great, going to test it today! many thanks @sjones512!