Skip to content

Commit 0a87c5a

Browse files
committed
Move to kubernetes python client 9.0.0
This version [0] makes the adal package optional [1], which also removes its dependency on the cryptography package. It also fixes a thread pool issue [2] allowing us to remove the workaround we had in place. [0]: https://github.com/kubernetes-client/python/blob/master/CHANGELOG.md#v900 [1]: kubernetes-client/python-base#108 [2]: kubernetes-client/gen#91 Change-Id: I55aa8b97483b118fbde7e11df817ad8330da9bf1
1 parent c7d9e21 commit 0a87c5a

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

armada/handlers/k8s.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@
1717
from kubernetes import client
1818
from kubernetes import config
1919
from kubernetes import watch
20-
from kubernetes.client import api_client
2120
from kubernetes.client.rest import ApiException
22-
from unittest.mock import Mock
2321
from oslo_config import cfg
2422
from oslo_log import log as logging
2523

@@ -29,12 +27,6 @@
2927
CONF = cfg.CONF
3028
LOG = logging.getLogger(__name__)
3129

32-
# TODO: Remove after this bug is fixed and we have uplifted to a fixed version:
33-
# https://github.com/kubernetes-client/python/issues/411
34-
# Avoid creating thread pools in kubernetes api_client.
35-
_dummy_pool = Mock()
36-
api_client.ThreadPool = lambda *args, **kwargs: _dummy_pool
37-
3830

3931
class K8s(object):
4032
'''

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ grpcio==1.16.0
44
jsonschema>=2.6.0
55
keystoneauth1==2.21.0
66
keystonemiddleware==4.9.1
7-
kubernetes>=6.0.0
7+
kubernetes>=9.0.0
88
Paste>=2.0.3
99
PasteDeploy>=1.5.2
1010
protobuf>=3.4.0

0 commit comments

Comments
 (0)