Closed collivier closed 3 years ago
This patch is key for Functest as latest OpenStack upper-constraints ask for kubernetes 12.0.1. We do falsy override kubernetes to 11.0.0 to please xrally_kubernetes.
@prazumovsky @andreykurilin @jukosone I noted xrally_kubernetes leverages on the deprecated API too. diff --git a/xrally_kubernetes/service.py b/xrally_kubernetes/service.py index 5d60070..8108d03 100644 --- a/xrally_kubernetes/service.py +++ b/xrally_kubernetes/service.py @@ -16,11 +16,11 @@ import re
from kubernetes import client as k8s_config from kubernetes.client import api_client -from kubernetes.client.apis import apps_v1_api -from kubernetes.client.apis import batch_v1_api -from kubernetes.client.apis import core_v1_api -from kubernetes.client.apis import storage_v1_api -from kubernetes.client.apis import version_api +from kubernetes.client.api import apps_v1_api +from kubernetes.client.api import batch_v1_api +from kubernetes.client.api import core_v1_api +from kubernetes.client.api import storage_v1_api +from kubernetes.client.api import version_api from kubernetes.client import rest from kubernetes.stream import stream from rally.common import cfg
Thank you in advance for a quick merge
@andreykurilin please let me know if the new patchset fills your expectations. thank you in advance
As highlighted by [1], kubernetes v12.0.0 and newer asks for the use of Configuration.get_default_copy() [2].
It detects if Configuration.get_default_copy() is defined to preserve the backward compatibility.
[1] https://github.com/kubernetes-client/python/issues/1284 [2] https://github.com/kubernetes-client/python/commit/b4d11b02a3479e63957a729614a616002f13e9c4#diff-59aff6ce4d28aa662f8b411b9d0dfe4f3e949c32a5edaf8e08905b58e7a41ee3L69-R71
Signed-off-by: Cédric Ollivier cedric.ollivier@orange.com