Commit Graph

188 Commits

Author SHA1 Message Date
Graham Reed
5424e17c85 Update python base
To get auth plugin support for client certificates, ref. kubernetes-client/python-base#205
2020-07-30 18:22:48 +01:00
Nabarun Pal
9a20c56cd5
Updates python-base submodule
Update from 49ec06096e to fb86b8acb6

Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2020-07-17 04:06:00 +05:30
Nabarun Pal
dae8285878
Cherry pick test for API client context manager
The implementation and tests were already picked up by the upstream OpenAPI
generator [here](https://github.com/OpenAPITools/openapi-generator/pull/5094).
Patching in the tests here for correctness and clarity.

Reference: https://github.com/kubernetes-client/python/pull/1073

Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2020-07-16 13:42:40 +05:30
Nabarun Pal
146119213c
Add kubernetes.client.apis as an alias to kubernetes.client.api
Reference: https://github.com/kubernetes-client/python/issues/974

Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2020-07-16 13:42:40 +05:30
Nabarun Pal
b78f5cfd6e
Fix custom objects API to preserve backward compatibility
Reference:
- [#866](https://github.com/kubernetes-client/python/issues/866)
- [#959](https://github.com/kubernetes-client/python/pull/959)

Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2020-07-16 13:42:40 +05:30
Nabarun Pal
ec9c944f07
Remove tests since they have syntactical issues and are noop
Reference: https://github.com/OpenAPITools/openapi-generator/issues/5377

Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2020-07-16 13:42:39 +05:30
Nabarun Pal
b4d11b02a3
Update client with OpenAPI generator v4.3.0
Signed-off-by: Nabarun Pal <pal.nabarun95@gmail.com>
2020-07-16 13:42:39 +05:30
ACXLM
17dc22ed58 update python base 2020-06-26 12:23:41 +08:00
Shihang Zhang
f7d0f126b4 update python-base 2020-05-13 15:45:49 -07:00
Nabarun Pal
739665e677
Apply hotfixes 2020-04-03 01:47:30 +05:30
Nabarun Pal
c206745dcd
Generate updated client 2020-04-03 01:46:00 +05:30
Nabarun Pal
86f3a8ec96
Update the base submodule
CHANGELOG
---
- Logs are no longer unmarshalled when streaming [kubernetes-client/python-base#185](https://github.com/kubernetes-client/python-base/pulls/185)
2020-03-30 22:03:19 +05:30
dasydong
2f34a1ce94 Run spell check tools to fix typos:
gihub > github
hehavior > behavior
quanity > quantity
2020-03-24 15:53:59 +08:00
Kubernetes Prow Robot
1fa9f89c39
Merge pull request #1087 from roycaihw/watch-e2e
add basic watch configmap e2e test
2020-03-02 13:43:38 -08:00
Haowei Cai
f452d0cef6 add basic watch configmap e2e test 2020-03-02 13:34:01 -08:00
Nigel Foucha
4d1896cb52
Merge apiserver_id get fix from python-base 2020-02-23 14:04:23 -05:00
Fabian von Feilitzsch
13dffb8976 Add test to ensure kubernetes client threadpool is cleaned up 2020-02-06 12:55:39 -05:00
Fabian von Feilitzsch
18d21df367 Cleanup ThreadPool with atexit rather than __del__
This removes the __del__ function from the generated Python client,
and replaces it with a cleanup function. When a ThreadPool is created,
the cleanup function is registered with the atexit module.

This PR also allows the client to be used as a context manager, which
will automatically clean up after itself rather than having to wait til
process exit.

This fixes issue #1037, where the API client could hang indefinitely at
garbage collection.
2020-02-06 12:08:51 -05:00
Kubernetes Prow Robot
96766c2d59
Merge pull request #1035 from micw523/enable-dynamic
Enables the use of dynamic client
2020-01-06 10:16:17 -08:00
Kubernetes Prow Robot
3634a72ddc
Merge pull request #1007 from cclauss/patch-1
Use ==/!= to compare str, bytes, and int literals
2019-12-23 11:23:33 -08:00
Kubernetes Prow Robot
b871710b8b
Merge pull request #1036 from micw523/api
Fix deprecation warning in e2e tests
2019-12-18 14:27:12 -08:00
micw523
02232a2e22 Change apis to api 2019-12-18 15:38:27 -06:00
micw523
6a27be5cd2 enable dynamic client 2019-12-18 15:18:20 -06:00
micw523
5be6868304 Remove .swagger-codegen 2019-12-18 14:04:05 -06:00
Christian Clauss
5b94a9a5da
Use ==/!= to compare str, bytes, and int literals
Identity is not the same thing as equality in Python so use ==/!= to compare str, bytes, and int literals. On n Python >= 3.8, these instances will raise SyntaxWarnings so it is best to fix them now. https://docs.python.org/3.8/whatsnew/3.8.html#porting-to-python-3-8
2019-11-16 14:12:46 +01:00
Haowei Cai
b3164930dd turn on warning filter to print deprecation warning by default 2019-11-12 12:51:22 -08:00
Haowei Cai
9959273625 hotfix for patching custom objects issue#866 2019-11-11 12:02:41 -08:00
Haowei Cai
dee078639b Add alias package kubernetes.client.apis with deprecation warning 2019-11-11 12:02:41 -08:00
Haowei Cai
5cddbde0bf generated client change for 11.0.0-snapshot 2019-11-11 12:02:41 -08:00
Haowei Cai
778b25d87f update base submodule, update CHANGELOG and include CHANGELOG from 11.0.0a1 2019-11-11 12:02:38 -08:00
Nigel Foucha
f1339b864d
Merge azure refresh fix from python-base 2019-10-09 13:18:10 -04:00
Richard Godden
67bac5d22b support false values and missing fields in configs 2019-09-25 10:53:41 +01:00
micw523
fd9de42bab Fix deprecations introduced in v1.16 2019-09-24 16:30:10 -04:00
Oz Tiram
752373b1f9 Test getting the returncode of execution in a pod
This tests demonstrate how to execute a command in a pod and
what behavior is expected. As discussed in the commit
bf367ed6ddc63369f76df0a07b248a6711328605 in python-base this
behavior would be familiar to Python users, as `subprocess.Popen`
has the same property.
2019-09-19 10:03:43 +02:00
Julian Taylor
8b385a87dc add function to parse canonical quantities (e.g. resources)
This utility function is useful to parse values like the 200m or 300Gi
memory and cpu resources stored in kubernetes manifests.
It uses Decimal as output format as it usually represents typical input
values more accurately and reduces rounding errors.
2019-08-26 21:49:58 +02:00
Richard Godden
3f8d583ee0 update submodule to include parsing microseconds 2019-08-01 22:16:00 +01:00
Kubernetes Prow Robot
41971cc6ea
Merge pull request #888 from micw523/update-nginx
Deprecate extensions/v1beta1 deployment
2019-07-30 15:15:53 -07:00
Xianglong Wang
dd72deaec2 Deprecate extensions/v1beta1 deployment 2019-07-23 21:28:04 -04:00
Kubernetes Prow Robot
1ad4afff35
Merge pull request #824 from tnqn/verbose
Fix AttributeError in create_from_yaml
2019-07-23 12:48:14 -07:00
Oz N Tiram
e867c294bb Merge branch 'master' into util-improvements 2019-07-23 07:38:20 +02:00
Oz N Tiram
6100392c47 Add optional namespace to create_from_dict
This follows up on the addition to create_from_yaml, the behavior is the
same.
2019-07-23 05:33:40 +02:00
Oz N Tiram
ab002f760d Remove obsolete test
The current PR no longer support creating from string
2019-07-23 05:33:40 +02:00
Haowei Cai
8622ac4be4 generated client update for 10.0.0-snapshot 2019-07-01 15:20:01 -07:00
Haowei Cai
14f97fcdce update python-base submodule 2019-07-01 14:49:26 -07:00
Oz N Tiram
9e40421bcc create_from_yaml function deals with files only
Adding the ability to deal with strings containing yaml seems to repel
to much. So we stay with create_from_yaml with a bad name.

This removes the need fro StringIO to wrap strings.
Also note:

```
with open('foo.txt') as f:
    y = yaml.safe_load_all(f)

for i in y:
    print(i)

\# raises ValueError: I/O operation on closed file.
```

Hence, we indent the whole method body into the open block.

with open('foo.txt') as f:
    y = yaml.safe_load_all(f)
    for i in y:
        print(i)
2019-06-20 23:02:41 +02:00
Oz N Tiram
ed67d89f9b Remove un-necessary if block 2019-06-20 19:53:28 +02:00
Oz N Tiram
5c912f986f Throw exception from create_from_dict
This is instead of doing this in create_from_yaml
2019-06-20 18:37:58 +02:00
Oz N Tiram
4fa0e87bd7 Correct the documentation for create_from_dict
The function can create one or more Kuberenetes objects
based on the content of data. It can handle all API objects
incuding `List` type, which by itself can contain more than
one Kuberenetes API objects.
2019-06-20 14:30:27 +02:00
Oz N Tiram
34898387c3 Merge remote-tracking branch 'upstream/master' into util-improvements 2019-06-20 14:06:00 +02:00
Oz N Tiram
f6566ee5e6 Rename yml_document paramter and update documentation
Renaming `yml_document` in `create_from_dict` to data. This is a bit
 clearer that this it a data item and not a string (usually document
 read from the file system).
 Also update the documentation to describe better what the functions
 `create_from_dict` and `create_from_yaml` do.
2019-06-20 13:27:33 +02:00