Commit Graph

121 Commits

Author SHA1 Message Date
Kavish Dahekar
dac8a5c7a5
Update kube_config_test.py
fix missing method invocation
2024-08-27 13:21:57 +02:00
Kubernetes Prow Robot
9f9bec2739
Merge pull request #2076 from bobh66/watch_named_object
Fix dynamic client watch of named resource
2024-04-23 15:25:23 -07:00
showjason
07c94fbee1 fix time format 2024-03-30 22:21:42 +08:00
showjason
1e472043ec replace utcnow with now, due to utcnow will be deprecated 2024-03-30 22:11:48 +08:00
Kubernetes Prow Robot
851dc2a0b1
Merge pull request #2194 from meln5674/feature/binary-wsclient
Enable binary support for WSClient
2024-02-28 21:00:27 -08:00
Andrew Melnick
488518d957 Enable binary support for WSClient
Currently, under python 3, the WSClient decodes all data via UTF-8. This
will break, e.g. capturing the stdout of tar or gzip.
This adds a new 'binary' kwarg to the WSClient class and websocket_call
function. If this is set to true, then the decoding will not happen, and
all channels will be interpreted as binary.
This does raise a slight complication, as the OpenAPI-generated client
will convert the output to a string, no matter what, which it ends up
doing by (effectively) calling repr(). This requires a bit of magic to
recover the orignial bytes, and is inefficient. However, this is only
the case when using the default _preload_content=True, setting this to
False and manually calling read_all or read_channel, this issue does not
arise.
2024-02-28 15:41:24 -07:00
Kubernetes Prow Robot
d36ec43f06
Merge pull request #1968 from FlorianJDF/custom_client_config_new_client
kube-config: add custom client configuration injection
2024-02-19 07:59:00 -08:00
Kubernetes Prow Robot
7712421cdc
Merge pull request #2187 from tomplus/fix/mergin-current-context
Fix merging current-context in kube-configs
2024-02-12 10:32:16 -08:00
Kubernetes Prow Robot
09bab99914
Merge pull request #2178 from bnavigator/patch-1
Replace deprecated assertEquals call
2024-02-12 09:40:40 -08:00
Kubernetes Prow Robot
4c9c058f0c
Merge pull request #2153 from jxdv/update-ioerror
remove deprecated IOError
2024-02-12 09:37:31 -08:00
Tomasz Prus
69cfcda963 Fix merging current-context in kube-configs 2024-01-31 23:48:15 +01:00
Ben Greiner
346e28acab
Replace deprecated assertEquals call 2024-01-13 22:25:26 +01:00
Kubernetes Prow Robot
1193741609
Merge pull request #2100 from davidopic/master
Fix UTF-8 failures in Watch
2023-12-21 00:20:41 +01:00
gopal
51944266f3 Return empty list when there is no matching resource instsnce items to return 2023-11-28 14:02:58 +05:30
jxdv
50f9dd45d8 remove deprecated IOError 2023-11-26 16:51:49 +01:00
David E
934d026788
Handled UTF-8 edge cases in Watch 2023-08-07 12:20:31 -07:00
Kubernetes Prow Robot
76ec6f5ce5
Merge pull request #2095 from dbasunag/master
fix split call to handle apis of the format a/b/c
2023-07-31 11:00:38 -07:00
dbasunag
6875510e78 fix split call to handle apis of the format a/b/c 2023-07-31 09:44:38 -04:00
Tiago Silva
68fe8eea41
Adds support for custom Server Name Indication (SNI) 2023-06-27 14:26:50 +01:00
Bob Haddleton
cb2aa4ef80 Fix dynamic client watch of named resource
Signed-off-by: Bob Haddleton <bob.haddleton@nokia.com>
2023-06-16 10:46:05 -05:00
Peter Horsley
b5b39b378e Fix exception in ExecProvider when no console is attached. 2023-05-08 08:11:56 +10:00
Kubernetes Prow Robot
2f546b9dcb
Merge pull request #1966 from blackstorm/lee/fix-load-config
Fix load_kube_config unexpected `kube_config_path` keyword argument
2023-04-10 12:57:15 -07:00
Yu Liao
854672a93a
Merge pull request #1998 from kianmeng/fix-typos
Fix typos
2023-02-24 20:36:00 -08:00
Kubernetes Prow Robot
0c6714abef
Merge pull request #1886 from 0xFelix/resource-field-to-dict
Add to_dict method to ResourceField
2023-02-24 18:06:05 -08:00
Kubernetes Prow Robot
f81c7281cf
Merge pull request #1976 from t-yrka/inconsistent-timeout
Convert timeout to milliseconds when using poll method
2023-01-30 15:16:49 -08:00
Kian-Meng Ang
2d299b7a57 Fix typos
Found via `codespell -S CHANGELOG.md,*.json,*.unprocessed -L querys,couldn`
2023-01-27 11:10:29 +08:00
Kubernetes Prow Robot
2a27133f7e
Merge pull request #1949 from arrikto/feature-in-cluster-token-refresh
Improve the refreshing of tokens from inside the cluster
2023-01-17 09:06:33 -08:00
Kubernetes Prow Robot
8f80cf444e
Merge pull request #1947 from arrikto/feature-out-of-cluster-token-refresh
Fix the refreshing of tokens from outside the cluster
2023-01-16 11:28:09 -08:00
Tomasz Spyrka
fd13fc8c71 Convert timeout to ms when using poll method 2022-12-23 23:41:44 +01:00
6764e8d7dd keep config_file value 2022-12-21 06:58:51 +00:00
ab478a309f remove config_file arg check 2022-12-12 06:59:59 +00:00
6da7447d3a separte weak relate condtions 2022-12-12 06:54:17 +00:00
b648cb918e fix load_config unexpected keyword argument 2022-12-12 06:41:57 +00:00
Florian Teissedre
0bb2314578 kube-config: add custom client configuration injection 2022-12-11 18:31:28 +01:00
Fabian von Feilitzsch
1ac54eff7b Only use usedforsecurity if supported
Fixes #1944

This was only added in Python 3.9, will fall back to the old behavior if
`usedforsecurity` is not available.
2022-11-22 09:55:19 -05:00
Alexis Zamanis
392a8c1d07 Improve the refreshing of tokens from inside the cluster
Requests from inside the cluster misuse the API to refresh tokens.

Signed-off-by: Alexis Zamanis <alexiszam@arrikto.com>
2022-11-10 11:48:31 +02:00
Alexis Zamanis
a07531b932 Fix the refreshing of tokens from outside the cluster
Requests from outside the cluster may have stale tokens and fail with
status code `401`.

Signed-off-by: Alexis Zamanis <alexiszam@arrikto.com>
2022-11-08 17:13:24 +02:00
Felix Matouschek
2630bfaba7 Add to_dict method to ResourceField
This allows to recursively convert ResourceFields to dicts.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
2022-10-17 09:01:20 +02:00
Kubernetes Prow Robot
e36a91be6b
Merge pull request #1912 from ramvikrams/%1
decoding a not safe url in load_kube_config
2022-10-13 15:21:01 -07:00
Kubernetes Prow Robot
a4c43ede69
Merge pull request #1922 from yliaog/master
mock.call_args.kwargs was added after python 3.7, switched to the old…
2022-10-13 10:59:01 -07:00
Yu Liao
f8f6d11058 mock.call_args.kwargs was added after python 3.7, switched to the old way to allow 3.7 and below pass 2022-10-13 17:28:54 +00:00
Vibhor Gupta
f740c634ec add testcases 2022-10-12 00:12:25 +05:30
Vibhor Gupta
94dbbf9118 Add support for using oidc CA certificate file while refreshing token 2022-10-11 19:01:26 +05:30
ram vikram singh
9152c48f0a
decoding a not safe url in load_kube_config
for issue #1911 fixing load_kube_config for decoding unsafe url token
2022-10-11 00:07:09 +05:30
Kubernetes Prow Robot
1693503625
Merge pull request #1858 from akalenyu/base-rsc-lookup-missing
Add base_resource_lookup to ResourceList to avoid logging error
2022-09-05 08:12:36 -07:00
Kubernetes Prow Robot
e3c0042e0f
Merge pull request #1804 from harshitasao/issue-1790
Instead of mock, used unittest.mock
2022-08-15 15:05:55 -07:00
xiaoaxiao
e5ca5aeeea
fix issue #1782 Resolve load_kube_config TMP file issue 2022-08-03 23:06:50 +08:00
Alex Kalenyuk
3af3fee84b Add base_resource_lookup to ResourceList to avoid logging error
As seen in https://github.com/openshift/openshift-restclient-python/issues/430
We are hitting a bunch of these logging errors:
```bash
load cache error: __init__() got an unexpected keyword argument 'base_resource_lookup'
```
Which seem like they could be fixed by expecting this arg.

We might be off here so would appreciate any pointers,
but kept it simple at this point without adding the actual client request support.

Signed-off-by: Alex Kalenyuk <akalenyu@redhat.com>
2022-07-18 14:05:27 +03:00
Kubernetes Prow Robot
2c5f775c0b
Merge pull request #1854 from efussi/master
Add 'usedforsecurity=False' parameter to md5 call
2022-07-13 09:59:38 -07:00
Kubernetes Prow Robot
64a108606f
Merge pull request #1833 from brendandburns/master
Add interactive configuration to exec provider.
2022-07-10 22:07:48 -07:00