Skip to content

Commit

Permalink
Move to kubernetes python client 9.0.0
Browse files Browse the repository at this point in the history
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
  • Loading branch information
seaneagan committed Apr 5, 2019
1 parent c7d9e21 commit 0a87c5a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
8 changes: 0 additions & 8 deletions armada/handlers/k8s.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
from kubernetes import client
from kubernetes import config
from kubernetes import watch
from kubernetes.client import api_client
from kubernetes.client.rest import ApiException
from unittest.mock import Mock
from oslo_config import cfg
from oslo_log import log as logging

Expand All @@ -29,12 +27,6 @@
CONF = cfg.CONF
LOG = logging.getLogger(__name__)

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


class K8s(object):
'''
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ grpcio==1.16.0
jsonschema>=2.6.0
keystoneauth1==2.21.0
keystonemiddleware==4.9.1
kubernetes>=6.0.0
kubernetes>=9.0.0
Paste>=2.0.3
PasteDeploy>=1.5.2
protobuf>=3.4.0
Expand Down

0 comments on commit 0a87c5a

Please sign in to comment.