Commit Graph

16 Commits

Author SHA1 Message Date
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
gopal
51944266f3 Return empty list when there is no matching resource instsnce items to return 2023-11-28 14:02:58 +05:30
dbasunag
6875510e78 fix split call to handle apis of the format a/b/c 2023-07-31 09:44:38 -04: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
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
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
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
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
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
Erich Fussi
51badbcdbb Add 'usedforsecurity=False' parameter to md5 call
This allows to execute in a restricted environment, like a FIPS-enabled
Kubernetes cluster.
See https://docs.python.org/3/library/hashlib.html#hash-algorithms:
> False indicates that the hashing algorithm is [used] as a
> non-cryptographic one-way compression function.
2022-07-07 21:25:03 +00:00
Mitsuru Kariya
5529dedcb3
Fix DynamicClient.server_side_apply
DynamicClient.server_side_apply is designed to accept a dict or a
ResourceInstance as body.  However, if a dict or a ResourceInstance is
passed actually, an error occurs because RESTClientObject.rest cannot
interpret the Content-Type application/apply-patch+yaml.

So, modify RESTClientObject.rest to treat application/apply-patch+yaml
as other json-based Content-Types.
2022-07-06 01:16:57 +09:00
Philipp Sontag
943b0e7444
Support setting the _request_timeout parameter for the dynamic client 2022-04-20 10:23:16 +02:00
abikouo
3117c533b3 ResourceField class should allow defining any keyword
add unit tests
2022-03-07 10:00:03 +01:00
Venu Karnati
70ae7a8da8 Async fix for Dynamic Client 2022-02-09 15:52:02 -08:00
Yu Liao
9d176918a9 removed submodule 2022-01-07 16:17:39 -08:00