Tomasz Prus
cdfd750727
Fix snapshot version to be compliant with PEP440.
2023-02-26 12:01:40 +01: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
Yu Liao
a62a271aa4
Merge pull request #1902 from mostaphaRoudsari/patch-1
...
Fix small misspelling error
2023-01-30 21:05:45 -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
Yu Liao
356208a0f6
generated client change
2023-01-24 02:04:54 +00:00
Yu Liao
5f8455ae05
generated API change
2023-01-24 02:04:53 +00:00
Yu Liao
5b99d287de
generated client change for custom_objects
2023-01-24 02:04:53 +00: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
Kubernetes Prow Robot
8c8c15bd30
Merge pull request #1935 from Ark-kun/patch-1
...
Fixed double module imports
2023-01-16 11:18:10 -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
Kubernetes Prow Robot
5a96bbcbe2
Merge pull request #1956 from bentastic27/patch-1
...
duplicate configuration.host lines in example
2022-11-29 10:57:23 -08:00
Ben Healey
b25ead9390
duplicate configuration.host lines in example
2022-11-22 13:58:40 -05: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
Alexey Volkov
a4189ccf4e
Fixed double module imports
...
In Python, when you write `import foo.bar.baz` this means that the modules would be imported and the name `foo` will be bound locally and becomes available in the module. https://docs.python.org/3/reference/simple_stmts.html#import
So, doing `import kubernetes.client` leads to name `kubernetes` (not `client`) being added to the `kubernetes` module leading to a weird duplicate nesting. See:
```
>>> import kubernetes
>>> kubernetes
<module 'kubernetes' from 'C:\\Users\\Ark\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\kubernetes\\__init__.py'>
>>> kubernetes.kubernetes
<module 'kubernetes' from 'C:\\Users\\Ark\\AppData\\Local\\Programs\\Python\\Python310\\lib\\site-packages\\kubernetes\\__init__.py'>
```
We can solve this issues by using the `import ... from ...` syntax: Replace `import kubernetes.client` with `from kubernetes import client`.
I see that most modules already use relative imports, so I'm using relative imports here as well: `from . import client`.
2022-10-23 17:50:50 -07: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
Kubernetes Prow Robot
d1995299dc
Merge pull request #1916 from vgupta3/oidc-idp-ca-cert-file-support
...
Add support for using oidc CA certificate file while refreshing token
2022-10-12 17:43:01 -07:00
Yu Liao
beb98e076f
generated client change
Kubernetes Python Client - Validation / build (3.10) (push) Has been cancelled
Kubernetes Python Client - Validation / build (3.6) (push) Has been cancelled
Kubernetes Python Client - Validation / build (3.7) (push) Has been cancelled
Kubernetes Python Client - Validation / build (3.8) (push) Has been cancelled
Kubernetes Python Client - Validation / build (3.9, coverage) (push) Has been cancelled
2022-10-11 20:12:43 +00:00
Yu Liao
06e8a7216a
generated API change
2022-10-11 20:12:42 +00:00
Yu Liao
70b5364aee
generated client change for custom_objects
2022-10-11 20:12:42 +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
Mostapha Sadeghipour Roudsari
d83ab3e570
Fix small misspelling error
...
handly -> handle
2022-09-27 19:46:35 -04:00
Pedro Lopez Mareque
f7fc9deb18
remove old assertion and improve tests
2022-09-27 08:54:41 +02:00
Pedro Lopez Mareque
c8d814ddce
fix tests
2022-09-27 08:36:56 +02:00
Pedro Lopez Mareque
89730b40d4
Run autopep8 and fix style
2022-09-27 07:38:23 +02:00
Pedro Lopez Mareque
1da8a689dd
fechange e2e test strategy to add instead of replace
2022-09-26 22:42:24 +02:00
Pedro Lopez Mareque
2fd1b9469c
feat: add missing e2e test for json and merge patch strategies
2022-09-26 22:39:38 +02:00
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
Kubernetes Prow Robot
ada96faca1
Merge pull request #1871 from tobewithyou1996/master
...
fix issue #1782 Resolve load_kube_config TMP file issue
2022-08-15 09:50:14 -07:00
Goeun Kim
17372b78c5
Remove duplicate
2022-08-08 13:42:05 +09: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
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
Abhijeet Kasurde
13c4c7662e
Check availability of poll method before using
...
When eventlet is monkey patched, select.poll is removed since
it is not thread safe. So check availability of `poll` method
before using it.
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
2022-06-30 12:00:54 +05:30
Brendan Burns
c9ad88301e
Add interactive configuration to exec provider.
2022-06-17 15:11:26 +00:00
Brendan Burns
9c79d2b763
Revert "Add interactive configuration to exec provider."
...
This reverts commit e0dfc6b0da .
2022-06-16 22:14:43 +00:00
Brendan Burns
e0dfc6b0da
Add interactive configuration to exec provider.
2022-06-16 22:09:26 +00:00
Kubernetes Prow Robot
c76f0df7c4
Merge pull request #1785 from iciclespider/fix-port-forward-hang
...
Fix kubernetes port forwarding from hanging in certain edge cases.
2022-06-07 09:00:56 -07:00
Yu Liao
8e643c9cb1
generated client change
2022-06-06 21:11:30 +00:00
Yu Liao
0ef6b298fe
generated API change
2022-06-06 21:11:30 +00:00
Yu Liao
cd7cecda02
generated client change for custom_objects
2022-06-06 21:11:29 +00:00
Kubernetes Prow Robot
be9a47e573
Merge pull request #1781 from jeid64/je_fix_execprovider
...
Set cwd to None if empty string for ExecProvider
2022-05-25 14:35:23 -07:00
harshitasao
f1dfdbba45
used unittest.mock instead of mock
2022-05-23 14:35:09 +05:30
Julien Eid
35bcb7f20c
Update kubernetes/base/config/exec_provider.py
...
Co-authored-by: Patrick J. McNerthney <pat@mcnerthney.com>
2022-05-20 06:31:15 -04:00
Kubernetes Prow Robot
38ba743227
Merge pull request #1732 from philipp-sontag-by/dynamic-client-request-timeout
...
Support setting the _request_timeout parameter for the dynamic client
2022-05-09 09:05:19 -07:00
Haowei Cai
72b03a81f9
generated client change
2022-05-02 11:59:00 -07:00
Haowei Cai
28025cbb8d
generated API change
2022-05-02 11:58:59 -07:00
Patrick J McNerthney
7d0cd172bf
It turns out SSL sockets can buffer data such that the select method is not aware of it. See:
...
https://docs.python.org/3/library/ssl.html#notes-on-non-blocking-sockets
https://docs.python.org/3/library/ssl.html#ssl.SSLSocket.pending
2022-05-01 06:42:31 -10:00
Philipp Sontag
943b0e7444
Support setting the _request_timeout parameter for the dynamic client
2022-04-20 10:23:16 +02:00
Julien Eid
fe2546147c
Set cwd to None if empty string for ExecProvider
2022-04-18 11:30:45 -04:00
Kubernetes Prow Robot
c66a39108b
Merge pull request #1738 from abikouo/fix_resource_field
...
fix issue when trying to build ResourceField with argument name 'self'
2022-03-28 09:39:23 -07:00
yida.hu
be5e61c29e
Fix typo: kubenetes -> kubernetes
2022-03-28 19:52:37 +08:00
abikouo
3117c533b3
ResourceField class should allow defining any keyword
...
add unit tests
2022-03-07 10:00:03 +01:00
Yu Liao
ffceaa87d2
generated client change
2022-02-14 14:12:03 -08:00
Yu Liao
b227345fb2
generated API change
2022-02-14 14:12:02 -08:00
Yu Liao
bd5745ad1d
generated client change for custom_objects
2022-02-14 14:12:02 -08:00
Venu Karnati
70ae7a8da8
Async fix for Dynamic Client
2022-02-09 15:52:02 -08:00
Kubernetes Prow Robot
36fc46196e
Merge pull request #1683 from dingyiyi0226/master
...
feat: add create from directory support
2022-02-01 10:43:42 -08:00
Haowei Cai (Roy)
1271465acd
Merge pull request #1672 from yliaog/master
...
removed submodule
2022-01-31 10:31:49 -08:00
Huan-Ting,Chen
c9e11d02b0
add e2e_test for create_from_directory
2022-01-21 16:33:57 +08:00
Huan-Ting,Chen
18fb9a0915
feat: add create from directory support
2022-01-21 16:33:45 +08:00
toto
5a2b926c16
Remove duplicate code in documentation
2022-01-15 11:35:22 +01:00
Yu Liao
9d176918a9
removed submodule
2022-01-07 16:17:39 -08:00
Yu Liao
6ae9260e9e
Fixed test flakiness, added loop to wait for non-empty response line.
2022-01-04 12:14:02 -08:00
Yu Liao
26e6940d20
ApiregistrationV1beta1Api has been removed in 1.22 release, switch to
...
use ApiregistrationV1Api.
2022-01-04 11:27:47 -08:00
Yu Liao
443f4a5d07
generated client change
2022-01-04 09:43:10 -08:00
Yu Liao
1ee383e14a
generated API change
2022-01-04 09:43:09 -08:00
Yu Liao
349f42aff2
generated client change for custom_objects
2022-01-04 09:43:09 -08:00
Yu Liao
41d4886c08
updated base to the latest (e2e test in python repo would fail w/o the
...
base update)
2021-12-15 12:02:32 -08:00
Kubernetes Prow Robot
18daad2607
Merge pull request #1650 from AurelienGasser/fix-returncode-idempotent
...
test: WSClient.returncode idempotence
2021-12-14 15:20:51 -08:00
John Sun
c1a14438b3
generated python-base update
2021-12-14 16:52:43 +11:00
Aurélien Gasser
a24d1be63d
add comment
2021-12-13 19:43:29 -05:00
Aurélien Gasser
8da0080c7d
test: WSClient.returncode idempotence
2021-12-13 19:31:22 -05:00
Yu Liao
9c3891d40e
generated client change
2021-11-29 11:00:29 -08:00
Yu Liao
b8e0b3d083
generated API change
2021-11-29 11:00:28 -08:00
Yu Liao
d084739319
generated client change for custom_objects
2021-11-29 11:00:28 -08:00
Yu Liao
35a68b2e54
update version constants for 21.0.0-snapshot release
2021-11-29 10:59:46 -08:00
itaru2622
77ef217707
add no_proxy support to configuration and REST client.
2021-10-25 14:55:30 -07:00
Yu Liao
6d785aabd5
generated client change
2021-10-25 14:41:05 -07:00
Yu Liao
b0dbe417f2
generated API change
2021-10-25 14:41:04 -07:00
Yu Liao
1f2726d949
generated client change for custom_objects
2021-10-25 14:41:03 -07:00
itaru2622
0449056620
update python-base commithash
2021-10-19 07:35:25 +09:00