Commit Graph

260 Commits

Author SHA1 Message Date
Moshe Shitrit
698299af9d isort 2021-03-22 00:22:04 -04:00
Moshe Shitrit
b5aa2dd371 Address remarks from pycodestyle 2021-03-22 00:16:52 -04:00
Moshe Shitrit
cf2f312fd0 Applied autopep8 properly this time. This should work 2021-03-21 23:59:43 -04:00
Moshe Shitrit
0a5b04feea Revert black and only try autopep8 this time 2021-03-21 23:44:32 -04:00
Moshe Shitrit
34b8304d5f autopep8 2021-03-21 23:38:48 -04:00
Moshe Shitrit
0395a10718 Run black linter to make update-pycodestyle happy 2021-03-21 23:27:47 -04:00
Moshe Shitrit
9bce8696ff Switching print statement to use legacy .format() method, in order to maintain backwards-compatibility with pre-3.6 Python versions 2021-03-21 23:01:35 -04:00
Moshe Shitrit
8e4c5ebe4f Merge branch 'master' into m3e-issue-1005 2021-03-21 22:38:33 -04:00
Kubernetes Prow Robot
fb425a3bec
Merge pull request #229 from mthaddon/master
Fix trivial typo in error messages
2021-03-19 10:44:35 -07:00
Tom Haddon
ed98daeae9 Fix trivial typo in error messages - 'does not exist' vs. 'does not exists' 2021-03-19 05:56:27 +01:00
Kubernetes Prow Robot
93aa318705
Merge pull request #228 from mrbobbytables/owners
Remove inactive members from OWNERS
2021-03-01 11:33:26 -08:00
Bob Killen
2ea3efbc62
Remove inactive members from OWNERS
As a part of cleaning up inactive members (those with no activity within
the past 18 months) from OWNERS files, this commit moves mbohlool from
an approver to emeritus_approver.
2021-02-28 15:05:02 -05:00
Kubernetes Prow Robot
060cac10e5
Merge pull request #227 from chrisayoub/fix_watch_bug
Fix bug with Watch and 410 retries
2021-02-25 15:48:15 -08:00
Chris Ayoub
ebea7e3430 Fix Watch retries with 410 errors 2021-02-25 00:27:33 -05:00
Kubernetes Prow Robot
04feb9ff90
Merge pull request #223 from MridulS/empty_file_error
raise exception when an empty config file is passed to load_kube_config
2021-02-09 09:26:22 -08:00
Kubernetes Prow Robot
6e2e494725
Merge pull request #226 from jamesgetx/fix_cache_not_work
fix: load cache error when CacheDecoder object is not callable
2021-02-01 22:26:28 -08:00
Mridul Seth
3c719874c6 fix typo in test file 2021-02-01 19:13:29 +01:00
jamesgetx
e09312a31e
test: self._cache = json.load(f, cls=partial(CacheDecoder, self.client)) 2021-02-01 21:20:19 +08:00
jamesgetx
ec1e85ec10
test: self._cache = json.load(f, cls=partial(CacheDecoder, self.client)) 2021-02-01 21:18:40 +08:00
jamesgetx
18a5ccc3ef
fix: load cache error when CacheDecoder object is not callable 2021-01-29 17:27:01 +08:00
Mridul Seth
76d8fbda28 fix codestyle 2021-01-25 13:43:26 +01:00
Mridul Seth
8a3bdb8ebe take care of empty kube_config files 2021-01-23 19:23:45 +01:00
Kubernetes Prow Robot
4bf72d7f0d
Merge pull request #206 from Invictus17/master
Leader Election issue #434
2021-01-14 17:17:50 -08:00
Sumant
4d29af161b Leader Election issue #434
changed file naming style consistent with the existing go client code

Update example.py

Changed file and folder names

Rename LeaderElection.py to leaderelection.py

Rename threadingWithException.py to threadingwithexception.py

Rename ConfigMapLock.py to configmaplock.py

LeaderElection to leaderelection

Added boiler plate headers, updated variable and function names consistent with the guidelines, removed the ctypes dependency by using traces to kill threads, changed logic for leader now it gives up and doesn't re-join as a follower if it fails to update lease

added correct boiler plate year

Rename threadingWithTrace.py to threadingwithtrace.py

Update leaderelection.py

Update example.py

Changes based on review - logging, OnStoppedLeading is not killed abruptly, OnStartedLeading is not run in a separate thread, adding README

Update example.py

updated comments

set threads as daemon

Update README.md

Code made consistent with other clients.

Update example.py

Update leaderelection.py

Error & exception handling for the annotation, reduced indentation

Adding serializing functions for serializing & de-serializing locks, leader_election_record as a class

Adding a test

Adding boilerplate header

Rename leaderelectiontest.py to leaderelection_test.py

Updated boiler plates

handling imports for pytest

handling 'HTTP not found' compatibility with python 2 & 3, & handling relative imports

Update leaderelection.py

to check tests for tox

assertEquals -> assertEqual

Update leaderelection_test.py

making Threading compatible for Python 2

changing datetime.timestamp for backward compatibility with Python 2.7

Adding comments for test_Leader_election_with_renew_deadline & making
candidates run in parallel for test_leader_election

remove redundant daemon = True reassignment

common thread lock for MockResourceLock
2021-01-13 19:47:43 -05:00
Haowei Cai (Roy)
b002110430
Merge pull request #222 from roycaihw/configmap-e2e/labels
configmap e2e: use labels and label selector
2021-01-05 09:49:08 -08:00
Moshe Shitrit
2c9ddf94b6 Revert switch to pathlib, to maintain Python2 support 2021-01-04 23:58:25 -05:00
Haowei Cai
3f05359afc configmap-e2e: use labels 2021-01-04 17:47:34 -08:00
Moshe Shitrit
10db259908 Document kwargs param 2020-12-25 12:59:27 -05:00
Moshe Shitrit
0c662bb33d Adding load_config wrapper method to have a more generic way of initializing the client config 2020-12-25 12:22:38 -05:00
Moshe Shitrit
7199c14a8d Change KUBE_CONFIG_DEFAULT_LOCATION to use pathlib.Path.home instead of hard-coded "~". This is a more "Pythonic" way of setting that value. 2020-12-25 12:11:42 -05:00
Kubernetes Prow Robot
fdc9907ff0
Merge pull request #217 from gliptak/python1
Add Python 3.9 to build
2020-12-13 18:29:27 -08:00
Gábor Lipták
3412151aa9
Add Python 3.9 to build
Signed-off-by: Gábor Lipták <gliptak@gmail.com>
2020-12-04 22:06:53 -05:00
Kubernetes Prow Robot
2da2b981ca
Merge pull request #215 from roycaihw/fix/dynamic-e2e-exception
dynamic-e2e: fix the error expectation in the discovery retry logic
2020-10-14 14:43:50 -07:00
Haowei Cai
acdd0588f7 restore discovery client exception handling 2020-10-14 14:34:17 -07:00
Kubernetes Prow Robot
a5e529df63
Merge pull request #187 from fabianvf/dynamic-ignore-unavailable
Prevent 503s from killing the client during discovery
2020-09-14 18:49:25 -07:00
Kubernetes Prow Robot
fd322f70aa
Merge pull request #208 from ryphon/207-config-as-string
Support file-ish objects in config loading
2020-09-09 10:37:09 -07:00
Dylan Shepard
0559445cb4
unused io import, pre-setting pycodestyle 2020-09-09 07:28:51 -07:00
Dylan Shepard
9f4775f43f
trying to fix pycodestyle problems 2020-09-09 07:22:04 -07:00
Dylan Shepard
49cbb1de99
replace inside the parens 2020-09-09 07:07:13 -07:00
Dylan Shepard
bfa968140c
supporting 2.7, reading works fine, writing reqs unicode 2020-09-09 07:03:45 -07:00
Kubernetes Prow Robot
3dc7fe0b92
Merge pull request #210 from iciclespider/port-forward
Implement port forwarding.
2020-09-08 10:05:44 -07:00
Patrick J. McNerthney
5d39d0d5f0 Support both python 2.7 and 3.x. 2020-09-07 21:04:32 -10:00
Patrick J. McNerthney
2e86b71334 Better handling of error channel reponse, and comment typo. 2020-09-07 13:06:44 -10:00
Patrick J. McNerthney
ce3a1a298a Rework loop which collects the local python sockets for read and writing. 2020-09-07 11:56:01 -10:00
Patrick J. McNerthney
7bf04b384b Rework how the PortForward._proxy thread determines when and how to terminate. 2020-09-06 09:25:58 -10:00
Patrick J. McNerthney
72e372599d Rework the parsing of the requested ports to support both a local port and a remote port. 2020-09-01 18:33:33 -10:00
Patrick J. McNerthney
cc9ae10549 Address the following PR issues:
* Rename `_Port.error` to be `_Port.error_channel`.
* Correct comment about where setsockopt is being called.
* Add comments clarifying why the double call to the same methods to setup channel information.
* Allow for ports specified with both local and remote port numbers.
2020-08-31 15:53:59 -10:00
Dylan Shepard
f85a41fa31
renaming functions and setting to internal 2020-08-31 12:01:11 -07:00
Patrick J. McNerthney
74d0e292b8 Implement port forwarding. 2020-08-28 13:55:00 -10:00
Kubernetes Prow Robot
471a67844e
Merge pull request #211 from iciclespider/refactor-for-port-forward
Refactor stream package to enable common method helpers for other streaming api classes.
2020-08-28 15:45:19 -07:00