[1.19+] Not able to use Ingress API v1 models.
Closed this issue · 2 comments
The Ingress API has been available since 1.19 under the v1 api version. However the ingress API class still requires the v1beta1 model version. Is this an error in the swagger spec or something the generation code could account for?
kubernetes-php-client/src/API/Ingress.php
Line 233 in ac99b73
Hi @leroy sorry about this late reply, I've been away dealing with family affairs.
After looking into the generated code and the K8S swagger file, I think it's neither the fault of the code generator nor the Swagger file.
Even though the Ingress API class requires the v1beta1 model in the header, it also provides methods for the new Networking namespace API endpoint access, with the correct V1 model required.
kubernetes-php-client/src/API/Ingress.php
Lines 233 to 245 in ac99b73
kubernetes-php-client/src/API/Ingress.php
Lines 1128 to 1140 in ac99b73
The reason default list
method is still pointing v1beta1 endpoint I believe should be for backward compatibility. I am sure when such endpoint is fully deprecated it should be updated to the new Networking endpoint.
If you are eager to use the new Networking API, you can use the method with NetworkingV1
postfix. Though I think you'd better off still use the default list/ read/ create/ delete methods so you don't have to change your code again when the v1beta1 is deprecated.
Hey man, thanks for the response!
I'll look into the NetworkingV1 methods!
Never apologize for responding "late" on something you created for free for others to enjoy.
Thank you for your time and effort! ✨