* Document how to build the doumentation with sphinx
For convinience, I added a Makefile which spares one to memorize the
long sphinx command, or type python setup.py build_sphinx
You simply use `make html` and you will get the docs.
* Render README with markdown properly
conf.py includes some code to work around a bug in
common mark. The markdown is now properly converted to HTML.
* Fix rendering of CONTRIBUTING.md
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.
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)
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.
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.
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.