Commit Graph

379 Commits

Author SHA1 Message Date
Oz Tiram
0779fc9c66 Fix collection of execptions when applying yaml
This fixes of all tests and keeps the original API.

 It's the users responsiblility to do something the execptions
 when using `create_from_dict`, no air bag or breaks are supplied here.
2019-04-05 08:20:57 +02:00
Oz Tiram
18f45c9cec Fix wrong import name 2019-04-05 06:30:43 +02:00
Oz Tiram
50ef8746a9 Merge branch 'master' into util-improvements 2019-04-05 00:23:34 +02:00
Haowei Cai
b603b4a9c4 generated client change for 10.0.0-snapshot 2019-04-03 13:53:46 -07:00
Haowei Cai
52ba6399c4 update python-base submodule 2019-04-03 10:25:21 -07:00
Oz Tiram
cee4e49eda Rename create_from_map to create_from_dict, add tests 2019-03-26 23:54:34 +01:00
Oz Tiram
aa28bc7067 Allow create from string or from dict
This is a fix for #722
2019-03-26 23:26:08 +01:00
Johannes M. Scheuermann
15d36c9688 Use optional parameter for method 2019-03-26 21:45:14 +01:00
Johannes M. Scheuermann
06776ced35 Rebase code and add namespaced method 2019-03-25 16:17:12 +01:00
Xianglong Wang
9b989ddc2d Add rbac support for yaml 2019-03-20 17:54:33 -05:00
Kubernetes Prow Robot
84c057bfac
Merge pull request #673 from micw523/yaml-list
Extend YAML load functionality to *LIST and multi-resources
2019-03-19 13:22:24 -07:00
micw523
c0f71c3ba6 Add list / multi resource support 2019-03-19 00:36:32 -05:00
chowmean
8c9494ecf9 adding proxy headers settings for proxy_manager 2019-03-16 00:20:12 +05:30
Haowei Cai
e35611ca62 remove patch backup 2019-02-06 17:20:12 -08:00
Haowei Cai
1496a21b5e generated client change for 9.0.0b1 release 2019-02-06 15:20:25 -08:00
Haowei Cai
af3f77fed9 update python-base submodule 2019-02-06 15:09:47 -08:00
Kubernetes Prow Robot
ed18ea8d70
Merge pull request #724 from xvello/xvello/safe-yaml
Update python-base ref to include yaml security fix
2019-01-14 11:58:46 -08:00
Xavier Vello
fb73617f61 Update python-base ref to include yaml security fix 2019-01-09 11:27:33 +01:00
ramnes
3240b45c46 Use yaml.safe_load
See #718 for rationale.
2019-01-09 10:10:48 +01:00
Haowei Cai
cd411d2707 generated client change for 9.0.0-snapshot version constant update 2018-12-07 16:43:15 -08:00
Haowei Cai
524b0f7b11 Update python-base submodule 2018-12-07 16:34:29 -08:00
k8s-ci-robot
4d4ce21265
Merge pull request #677 from micw523/track-utils
Track utils with pycodestyle
2018-11-02 14:56:14 -07:00
Xianglong Wang
725687038f Add codestyle tracking, fix codestyle 2018-11-02 16:00:47 -05:00
Haowei Cai
c09023843c Update python-base submodule, pick up change:
use pycodestyle as pep8 has been deprecated (rename)
2018-11-01 16:06:11 -07:00
micw523
5a92ba65aa Add kubectl create -f feature 2018-10-31 19:34:18 -05:00
Haowei Cai
9484a106f2 generated snapshot client for 8.0.0b1 release
against kubernetes 1.12.1 release (temp 1.12.2 openapi spec)
2018-10-15 14:58:13 -07:00
Haowei Cai
8b36900ba9 Update python-base submodule
to pick up changes:
- Replace encodestring and decodestring for standard_b64encode and standard_b64decode
- Update ExecProvider to use safe_get(); Update unit tests to use ConfigNode() instead of dict()
2018-10-15 13:45:14 -07:00
Haowei Cai
316509b32a generated client change for 8.0.0 snapshot on master branch
against kubernetes release-1.12 branch
2018-09-28 14:16:18 -07:00
Haowei Cai
c63c069ca8 Update python-base submodule
in preparation for 8.0.0a1 release.
Changes picked:
  - fix: read config data with bytes (python3)
2018-09-28 12:58:32 -07:00
Will Thames
1de41f1c8b Update python-base to latest for exec-based clients
Include https://github.com/kubernetes-client/python-base/pull/75
2018-09-08 13:07:11 +10:00
Haowei Cai
17db994abc generated client update
pick up change in kubernetes-client/gen: add custom object status
and scale api.
2018-08-13 18:16:44 -07:00
Haowei Cai
34bbe6988a Update python-base, CHANGELOG and README
pick up python-base change: Add support for refreshing Azure tokens.
update CHANGELOG and README to prepare for 7.0.0 release.
2018-08-13 17:36:35 -07:00
Haowei Cai
20c782da57 Update python-base submodule
Add Azure support to authentication loading
2018-07-23 11:01:50 -07:00
Haowei Cai
b10c7b6a17 Rename parameter async into async_req to support Python 3.7
as Python 3.7 treats async as a reserved keyword.
2018-07-11 14:28:45 -07:00
Haowei Cai
5f81a65909 Generated client change for Kubernetes 1.11 2018-07-11 13:31:26 -07:00
Haowei Cai
fd1d1d1eea Update python-base submodule to pick up:
remove required idp-certificate-authority-data in kubeconfig for oidc
token refresh;
Watch properly decodes resourceVersion from custom object response.
2018-07-10 12:21:03 -07:00
Haowei Cai
46a0e10d8c Update python-base submodule 2018-04-10 16:20:56 -07:00
Haowei Cai
a5ad719bcf Fix e2e test to reflect service storage refactoring 2018-03-12 15:21:38 -07:00
Haowei Cai
71b5abce5a Generated API change for kubernetes 1.10 2018-03-12 11:11:47 -07:00
Haowei Cai
003f933df4 Update python-base submodule 2018-03-09 13:08:29 -08:00
Haowei Cai
f603fd6fad Generated API change for v6.0.0b1
add PATCH to custom_objects_api
documentation update: never let cluster-scoped resources skip webhooks
2018-03-09 11:09:40 -08:00
Haowei Cai
9bcdc2bbb7 Update python-base submodule 2018-02-12 17:24:54 -08:00
Haowei Cai
ed052519da Update org and repo name 2018-01-26 15:41:55 -08:00
Haowei Cai (Roy)
12d0bcb04a
Merge branch 'master' into master 2018-01-26 14:03:35 -08:00
Haowei Cai (Roy)
87a8354c3d
Merge branch 'master' into master 2018-01-26 13:49:29 -08:00
Haowei Cai
3abfdf9ebd Update master to kubernetes 1.9 2018-01-26 13:44:27 -08:00
Haowei Cai
284e9d05bf Api change v1beta2 adding required controller spec selector fields 2018-01-25 15:29:54 -08:00
Jeremy Dartigalongue
f91732612c Update python-base 2018-01-16 21:41:06 +00:00
Yu Liao
e5ea1cf223 api change V1PersistentVolumeSpec to V1ScaleIOPersistentVolumeSource 2017-11-17 17:19:45 -08:00
mbohlool
7c1819373f Change IntOrString field types from string to object 2017-10-17 07:52:35 -07:00
mbohlool
6b1a80c67f Updte master to kubernetes 1.8 2017-10-09 17:56:32 -07:00
mbohlool
19359213b5 Update CHANGELOGS and final touch ups 2017-10-09 17:32:19 -07:00
mbohlool
1d27f7e71b Fix end to end tests 2017-10-09 17:15:34 -07:00
mbohlool
789e37464b Fix (hack) rest client for patch 2017-10-09 17:15:34 -07:00
mbohlool
bc2aac4897 Update base to get fixes to utility functions because of using new generated client 2017-10-09 17:15:05 -07:00
mbohlool
4782543825 Remove config, apiClient, and restClient from ignore list of swagger-codegen and regenerate client using HEAD of the generator 2017-10-09 17:15:05 -07:00
mbohlool
63d667a45e Update generated client first 2017-10-09 17:15:04 -07:00
mbohlool
27ba35aa81 Use stream module to call exec/attach calls 2017-09-22 11:42:59 -07:00
mbohlool
55ef46b6cf Update base to latest commit with stream module added 2017-09-22 11:42:59 -07:00
Jochen Breuer
3b66dde057 Changes from update-client.sh 2017-08-16 08:11:47 +02:00
Jochen Breuer
1054f10c6d Introducing __version__ and __project__ variables
Version information comes from scripts/constants.py and is hard-coded to
kubernetes/__init__py by scripts/update-client.sh.

__project__ is just hard-coded.

Fixes #317
2017-08-16 08:11:47 +02:00
mbohlool
b4f852a9d9 update generated client to get https://github.com/kubernetes/kubernetes/pull/49357 2017-08-10 17:33:39 -07:00
Jean Raby
c3d3ea82d2 Support for v4 stream protocol
- Set Sec-WebSocket-Protocol header from cfg param
- Add ERROR and RESIZE websocket channels
  As defined in pkg/kubelet/server/remotecommand/websocket.go
- Adjust tests to show v4 behavior wtr to status message
- Tweak read_all() to return only data from stdout and stderr.
2017-07-26 15:31:25 -04:00
mbohlool
d518be4ad3 Update base submodule 2017-07-25 13:03:18 -07:00
yuvipanda
1d2369e15d Submodule bump for kubernetes-client/python-base#18 2017-07-09 00:31:31 -07:00
Mehdy Bohlool
f6d80b06cf Merge pull request #287 from dims/use-latest-localkube
Test with latest localkube version
2017-07-07 11:35:01 -07:00
Davanum Srinivas
ebb23b7ca1 Test with latest localkube version
Oops! we are using a really old version, let's switch over to v1.7.0
2017-07-07 13:41:12 -04:00
Mehdy Bohlool
917ec63d51 Support both TPR and CRD with custom objects spec (#283)
* Add ability to use local gen repo for testing

* Update generated client
2017-07-07 10:26:25 -07:00
Spyros Trigazis
afe706d63a Remove oauth2client requirement (#286)
In #278 google-auth was added in requirements and in [1]
python-base stopped using it.

Remove oauth2client requirement and update submodule commit.

[1] https://github.com/kubernetes-client/python-base/pull/16

Related-Issue: #275

Signed-off-by: Spyros Trigazis <spyridon.trigazis@cern.ch>
2017-07-07 10:26:06 -07:00
mbohlool
5900a4c8c5 Fix Travis CI failure 2017-06-30 14:15:10 -07:00
mbohlool
ef558a5ce4 Update generated client 2017-06-29 01:34:59 -07:00
Ebbe Elsborg
b0bc0beac4 Generate client with 'name' and 'namespace' swapped for TPRs 2017-06-23 09:17:58 +02:00
Ebbe Elsborg
1849b1fe56 Generate client with 'version' parameter 2017-06-21 13:42:34 +02:00
Ebbe Elsborg
2e67319b97 Run update-client.sh 2017-06-21 13:42:34 +02:00
Sergi Almacellas Abellana
9cd0b3dc9a Use urlparse to generate websocket url
Fixes #246
2017-06-15 09:30:37 +02:00
Sergi Almacellas Abellana
cf2e8408f5 Update submodule to user config fixes
Closes #236
2017-06-09 10:15:29 +02:00
mbohlool
8a3b2bae14 Update generated client for TPR fix 2017-05-21 22:58:45 -07:00
mbohlool
e7a257a9ee Update client (only version changes) 2017-05-21 22:36:27 -07:00
mbohlool
5eee265f25 Update base submodule 2017-05-19 16:52:18 -07:00
mbohlool
23b0f8c008 Update generated client 2017-05-19 15:27:35 -07:00
mbohlool
8980d48039 Add kubernetes-client/python-base as submodule to this repo 2017-05-19 00:24:39 -07:00
mbohlool
dd30fe6a70 Remove base folder to prepare for submodule model 2017-05-19 00:21:35 -07:00
mbohlool
1ebceb6460 Move manual code to a base folder to prepare for repo splitting. 2017-05-09 16:26:27 -07:00
mbohlool
c1ad663ca0 Update generated client 2017-05-04 10:56:04 -07:00
Benjamin Sherman
eaf781c787 fix for #187 failure when using RFC 6902 json-patch operation 2017-05-03 17:08:24 -07:00
mbohlool
f5ec773830 Update generated client 2017-04-25 14:11:04 -07:00
Mehdy Bohlool
a0577b03cb Merge branch 'master' into config 2017-04-24 10:35:55 -07:00
mbohlool
318e551e37 BUGFIX: token file should not be decoded 2017-04-24 10:33:50 -07:00
Mehdy Bohlool
c8374eb409 Merge branch 'master' into inline 2017-04-18 11:15:00 -07:00
mbohlool
cbc4a6d467 Fix datatime parsing bug in api_client 2017-04-18 10:58:59 -07:00
Miguel Angel Rasero
5a590f8b55 add support for attach api call using websockets. 2017-04-18 19:08:05 +02:00
mbohlool
cfc0ff1a0d Update client 2017-04-17 16:37:09 -07:00
mbohlool
35ca453a47 Update client code 2017-04-05 15:24:07 -07:00
mbohlool
94861c777e Add close method to websocket client 2017-02-27 12:34:53 -08:00
mbohlool
fc8a31b2d1 Remove channel id from exec response in blocking mode 2017-02-24 14:11:29 -08:00
mbohlool
4e593a7530 Improvements on ws_client. Now the client can returns an object to interact with websocket server and reach each channel separately 2017-02-21 12:55:37 -08:00
Davanum Srinivas
353e8ccdc8 Switch to minikube/localkube
* Drop the old Kubernetes on docker containers method as it
  did not have a SSL enabled port
* Use localkube component from minikube instead. This enables
  us to drop the hitch TLS proxy as well.
* E2E tests should be easy to run locally and pick up configuration
  from ~/.kube/config
* Consolidate the urls in one spot (base.py), also consolidate the
  SkipTest in one spot.
* For local testing, just run minikube and run the py27 or py34 tox
  target, that should run all the tests including the e2e tests.
* Fix the connect_post_namespaced_pod_exec and add a e2e test for it

Fixes #122
2017-02-09 15:49:04 -05:00
Davanum Srinivas
066bba1802 Implementation for /exec using websocket
inspired by the POC from @chekolyn

* Adds a new requirement on websocket-client
* Add a new class WSClient that uses WebSocketApp from
  the websocket-client.
* Make sure we pass Authorization header
* Make sure we honor the SSL settings in configuration
* Some of the code will get overwritten when we generate
  fresh classes from swagger definition. To remind us
  added a e2e test so we don't lose the changes
* Added a new configuration option to enable/disable failures
  when hostnames in certificates don't match

Fixes #58
2017-02-07 16:48:26 -05:00
Davanum Srinivas
96cfceb2f0 Run e2e tests against against https url
Use hitch tls proxy to listen on 8443 port and forward the
traffic to 8080. Add a configuration option to ignore any
issues with host names as we don't generate the cert on the
fly.
2017-02-03 12:16:58 -05:00
Davanum Srinivas
38aaec0f47 Refactor tests
* separate batch, extensions and the regular apis into separate
* added delete for some tests
* drop '_' for is_k8s_running
* remove comments that do not add value
2017-01-26 09:11:07 -05:00
Davanum Srinivas
03731f1003 Add e2e for deployment and daemonsets 2017-01-25 17:00:05 -05:00
Davanum Srinivas
cf5d796cf4 Ability to run e2e tests multiple times 2017-01-25 16:02:06 -05:00
mbohlool
8fc978e49f Support insecure-skip-tls-verify config flag 2017-01-24 14:47:20 -08:00
Davanum Srinivas
1e48433b15 Fix ValueError in list_namespaced_config_map
Make sure we set an empty dict/list if we don't get
any data from the server

Fixes #104
2017-01-23 11:41:48 -05:00
Davanum Srinivas
9c6c96564b Fix for patch_* to work
Hack/workaround to get patch_namespaced_config_map and patch_namespaced_service
etc to work by essentially switching over the content-type from:
application/json-patch+json
to:
application/strategic-merge-patch+json

Fixes #93
2017-01-20 21:41:59 -05:00
mbohlool
c05b50c4ff Bugfix: kubernetes/client/__init__.py was not updated resulting in not exported models 2017-01-19 13:58:20 -08:00
mbohlool
98dc69105f Update client with no change. Mostly formatting update in generator code 2017-01-19 13:36:07 -08:00
Davanum Srinivas
28181d7ee9 cleanup: rename k8sclient->client 2017-01-16 14:45:02 -05:00
Davanum Srinivas
5c82309840 tox target to enforce pep8 2017-01-12 16:47:45 -05:00
Davanum Srinivas
010af62b76 Add functional test
Port a bunch of tests from python-k8sclient repository. There
is a script that starts a real instance of kubernetes and
the tests are executed against it.

Note, if you just have k8s accessible in your localhost:8080, the
tests still run. so you don't really need to run "py27-functional"
which runs the kube-init.sh

Also, 2 API calls fail currently, i've added a TODO so we can
dig into them and fix them
2017-01-12 06:26:16 -05:00
mbohlool
b971b6b5d1 Update generated client after bugfix kubernetes/kubernetes#39465 2017-01-10 13:20:19 -08:00
mbohlool
aac5d71b39 Bugfix: Bearer token should have 'bearer ' prefix 2016-12-27 16:48:52 -08:00
mbohlool
8c26b4b75b Support connecting to multiple clusters 2016-12-16 01:50:07 -08:00
mbohlool
4d14edb757 Add default kube config location 2016-12-15 14:47:24 -08:00
mbohlool
a429afe91d Resolving cert files relative path using kube-config file path. 2016-12-15 14:20:48 -08:00
mbohlool
69d0d5c5bb Update generated client 2016-12-12 23:37:17 -08:00
mbohlool
41490c80cb Update client 2016-12-08 13:21:07 -08:00
mbohlool
b888000b4a - Add context switch to kube config loader
- Refactor kube config loader to be able to test it
- Add test for kube config loader
2016-12-01 16:08:14 -08:00
mbohlool
acc07d720b incluster_config loader should fail on empty host/port or cert/token file 2016-12-01 16:08:13 -08:00
mbohlool
66e4f5ff70 Move ConfigException out of incluster_config and in it's own file 2016-12-01 16:07:14 -08:00
mbohlool
000c873f75 Update version to alpha.2 as alpha.1 is used for a failed release 2016-11-23 14:07:43 -08:00
mbohlool
bc301e25cf Set package version in generated code 2016-11-23 13:59:44 -08:00
mbohlool
b2f2f5ad23 Update formatting with scripts/update-pep8.sh 2016-11-23 13:35:35 -08:00
mbohlool
d42d43d539 Update generated client with changed spec version 2016-11-23 12:18:53 -08:00
mbohlool
ba3e22a7ac Add incluster config support 2016-11-23 10:31:22 -08:00
mbohlool
26ac2c4a12 Separate package util into config and watch package 2016-11-22 17:52:46 -08:00
mbohlool
b715e998b0 Export util and client modules in top level kubernetes module 2016-11-22 17:23:41 -08:00
mbohlool
47340d13d0 Move k8sutil to kubernetes/util and update imports 2016-11-22 17:23:41 -08:00
mbohlool
c120630aa3 Update/move generated client 2016-11-22 17:23:41 -08:00