Allow to pass option 'verify'=false to Guzzle
Closed this issue · 6 comments
Hi,
First thanks for this Kubernetes PHP client, it's great!
In our project we need to be able to deactivate SSL certificate verification (CURLOPT_SSL_VERIFYPEER=false).
This is possible in Guzzle by passing option 'verify'=false: https://github.com/guzzle/guzzle/blob/master/src/Handler/CurlFactory.php#L327.
But for now it seems that Kubernetes PHP Client does not allow to pass 'verify'=false to Guzzle config: https://github.com/allansun/kubernetes-php-client/blob/master/src/Client.php#L63.
Would it be possible to fix that, maybe by allowing to pass 'false' for 'caCert' or adding a 'verify' option to Authentication info?
Thanks!
Regards
Hi @mleroi
After seeing recent issues reported by the community, I realised it was my fault to not have the core lib in a standalone project, at the moment any changes required in the core means I had to delete all previous tags and regenerate the code, which is obviously a wrong way to do so....
Since you raised this issue (obviously it's a easy one to fix), I've been working on the abstraction of the lib, which should be finished within this weekend, if not today.
Things gone smoother than I expected, the change has successfully been made.
I have re-generated the following major stable versions:
v1.9.11
v1.10.12
v1.11.6
v1.12.4
v1.13.2
You should use one of these specific versions and do a composer update
.
If you found nothing has changed, do a composer clearcache
and then composer update
.
I have moved previous 'Abstract' classes out of 'kubernetes/php-client' package into 'kubernetes/php-runtime' package.
You can find the old 'Kubernetes\Client' under 'KubernetesRuntime\Client' now. It allows a third parameter to pass whatever options into guzzle, and overwrite any existing settings the class might have done.
Great, thanks for your answer, seems a good idea to extract the core lib indeed :)
Oh didn't see your last answer, I am going to try this new version :)
Works like a charm!
Thanks a lot for the quick fix.
Again, great lib :)
Glad to hear it works, I’m closing this issue.