Commit Graph

603 Commits

Author SHA1 Message Date
Christian Clauss
eace0bd3fe
Travis CI: The sudo: tag is now fully deprecated in Travis 2019-07-25 15:19:35 +02:00
Kubernetes Prow Robot
4a204fa4cd
Merge pull request #732 from tomplus/feat/mvn
feat: remove dependency on mvn from updating script
2019-07-23 16:50:14 -07: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
Kubernetes Prow Robot
b8cb6e8de7
Merge pull request #795 from oz123/util-improvements
Allow creation from dict
2019-07-23 12:36:15 -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
Kubernetes Prow Robot
693f11586d
Merge pull request #889 from micw523/docs
Update docs python version for Travis CI
2019-07-22 18:36:53 -07:00
Xianglong Wang
2eb2c8dc81 update docs python version 2019-07-22 21:14:40 -04:00
Kubernetes Prow Robot
b519de15c2
Merge pull request #873 from TomasTomecek/fix-die
kube-init.sh: die is not a command
2019-07-18 10:16:11 -07:00
Tomas Tomecek
3543417fb0 kube-init.sh: die is not a command
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
2019-07-18 09:47:02 +02:00
Kubernetes Prow Robot
02358ec60f
Merge pull request #883 from scottilee/incubator
#877: Remove reference to incubator
2019-07-16 20:02:34 -07:00
Scott Lee
2af7c631bd #877: Remove reference to incubator 2019-07-16 17:48:13 -07:00
Kubernetes Prow Robot
da8c843bda
Merge pull request #807 from oz123/drop-python-34
Drop Python3.4
2019-07-08 17:28:00 -07:00
Kubernetes Prow Robot
c488354146
Merge pull request #861 from roycaihw/release-10.0.0
Prepare master branch for 10.0.0 release
2019-07-01 17:27:08 -07:00
Haowei Cai
38e35af5cc add changelog for python repo changes; update readme 2019-07-01 15:29:41 -07:00
Haowei Cai
8622ac4be4 generated client update for 10.0.0-snapshot 2019-07-01 15:20:01 -07:00
Haowei Cai
13394b0cc7 add changelog for python-base update 2019-07-01 14:55:31 -07:00
Haowei Cai
14f97fcdce update python-base submodule 2019-07-01 14:49:26 -07:00
Kubernetes Prow Robot
c4c18d930c
Merge pull request #856 from oz123/test-suite-change-k8s-version
Don't use latest stable version for minikube
2019-06-25 12:33:59 -07:00
Oz N Tiram
d7300db66d Don't use latest stable version for minikube
Sometimes, minikube lags behind kubernetes which can lead
to a breakage of the test suite, since minikube will fail to start
with the latest kubernetes version.
See for example [this issue](https://github.com/kubernetes/minikube/issues/4371).

This change defaults to leave the decision of which k8s version to use,
to minikube itself. This is defined in:

https://github.com/kubernetes/minikube/master/pkg/minikube/constants/constants.go

However, if one really desires it is still possible to pass

`--kubernetes-version=X.Y.Z`

to minikube initialization start command via an environment variable
before invoking the test suite:

export $MINIKUBE_ARGS="--kubernetes-version=X.Y.Z"

This allows ofcourse passing other flags to minikube also.
2019-06-25 21:22:31 +02: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
Kubernetes Prow Robot
c86e4898fb
Merge pull request #782 from johscheuer/create-from-yaml-namespaced
Add method to dynamically set namespace in yaml files
2019-06-18 13:23:51 -07:00
Kubernetes Prow Robot
05c1a432d9
Merge pull request #816 from Ark-kun/patch-1
Fix broken dependencies.
2019-06-18 09:46:23 -07:00
Quan Tian
7ac1070077 Fix AttributeError in create_from_yaml
Some models don't have attribute 'status', like V1ConfigMap,
V1ClusterRole, and V1NetworkPolicy. AttributeError would be raised if
these resources are created via create_from_yaml with verbose enabled.

This patch checks if attribute 'status' exists before accessing it.
2019-05-03 10:41:00 -07:00
Kubernetes Prow Robot
5e512ff564
Merge pull request #820 from scottilee/docs
Correct inconsistent spacing and typos
2019-04-27 09:04:21 -07:00
Scott Lee
89de1fa321 Correct inconsistent spacing and typos 2019-04-26 21:30:42 -07:00
Alexey Volkov
a579f15868
Fix broken dependencies.
All our libraries that depended on `kubernetes` started breaking today.
The reason is that pip does not do a good job properly resolving the compatible package versions.
It just install packages in order without caring about the incompatibilities.
The urllib3 package installed is incompatible with the `requests` package that's getting installed later.

Changing the order fixes the issue.
2019-04-22 18:09:08 -07:00
Oz N Tiram
139848efcb Relax pycodestyle: import only allowed at the top
While this is a really good convention, sometimes one must import
stuff inside a try except block. This block is still at the top, but pycodestyle
treats like it isn't, because it's in an idented block, and the outeer scope.
2019-04-09 23:42:01 +02:00
Oz N Tiram
38894cc397
Fix import for StringIO
This is embarrassing.
2019-04-09 23:03:02 +02:00
Oz Tiram
408d405704 Handle StringIO for Python2 properly 2019-04-09 22:51:54 +02:00
Kubernetes Prow Robot
7fb3a25176
Merge pull request #809 from axelsteingrimsson/add_email_scope_to_gcp_credentials_refresh_submodule
Updating Submodule for GCP Email Scope Addition
2019-04-09 10:00:45 -07:00
axelsteingrimsson
914b6aacf6 Updating Submodule for GCP Email Scope Addition 2019-04-09 10:20:59 +02:00
Oz Tiram
8d41478ed8 Explicitly use other deployment names for test
Using `nginx-app` deployment multiple times, is problematic because we get
conflicts or not found error.

Instead of trying to handle all cases, explicit different names
are used now. The tests now runs more reliably
2019-04-08 13:54:26 +02:00
Oz Tiram
2b83c683f8 Fix for a flaky test failing because k8s is slow
We create a deployment and do the following:

```
self.assertIsNotNone(dep)
```

Which does not fail, and then the code proceeds to deletion
and fails with a 404 execption in 80% of the time, but sometimes
it works. The deployment is there, but for some reason not available for
deletion.
Travis CI also showed inconsitent behaviour on this. Python3.5 passed
but all other version failed.
With this commit we wait for the deployment to become available for
deletion and only then continue.
2019-04-08 13:17:25 +02:00
Johannes M. Scheuermann
80339ef3f7 Add more documentation to new namespace parameter 2019-04-08 07:52:01 +02:00
Oz N Tiram
e8fd4b9af9 Drop Python3.4
Python3.4 become EOL on 2019.03.18.

 https://www.python.org/dev/peps/pep-0429/
2019-04-05 21:20:48 +02:00
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
Kubernetes Prow Robot
6d4587e180
Merge pull request #804 from roycaihw/10.0.0-snapshot
Update python-base submodule and re-generated client to 10.0.0-snapshot
2019-04-03 18:42:48 -07:00
Haowei Cai
292b04b298 update changelog and readme in preparation for 10.0.0a1 2019-04-03 16:47:51 -07:00
Haowei Cai
b603b4a9c4 generated client change for 10.0.0-snapshot 2019-04-03 13:53:46 -07:00
Haowei Cai
f55d981346 update version constant for 10.0.0-snapshot 2019-04-03 13:03:29 -07:00
Haowei Cai
35c06bb509 update changelog for changes from python-base submodule 2019-04-03 12:58:51 -07:00