Skip to content
This repository has been archived by the owner on Sep 14, 2020. It is now read-only.

Commit

Permalink
Merge pull request #41 from nolar/docs-for-pypi
Browse files Browse the repository at this point in the history
Adapt the README for PyPI
  • Loading branch information
nolar authored Apr 25, 2019
2 parents fa4d772 + adc98ef commit 3a04596
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 21 deletions.
2 changes: 1 addition & 1 deletion LICENSE.md → LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) _currentyear_ Zalando SE
Copyright (c) 2019 Zalando SE

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
33 changes: 14 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# Kubernetes Operator Pythonic Framework (Kopf)

**Kopf** -- "Kubernetes Operator Pythonic Framework" -- a framework and a library
**Kopf** Kubernetes Operator Pythonic Framework— is a framework and a library
to make Kubernetes operators development easier, just in few lines of Python code.

The main goal is to bring the Domain-Driven Design to the infrastructure level,
with Kubernetes being an orchestrator/database of the domain objects (custom resources),
and the operators containing the domain logic (with no or minimal infrastructure logic).


## Documentation:
## Documentation

* https://kopf.readthedocs.io/


## Features:
## Features

* A full-featured operator in just 2 files: `Dockerfile` + a Python module.
* Implicit object's status updates, as returned from the Python functions.
Expand All @@ -27,15 +27,11 @@ and the operators containing the domain logic (with no or minimal infrastructure
* Handling of multiple CRDs in one process.
* The development instance temporarily suppresses the deployed ones.

Not yet, todos:

* ~~Multiple operators are automatically synced to avoid double-processing.~~
* ~~CLI commands to investigate the status of the handled objects in the cluster.~~


## Examples

See `./examples/` for the examples of the typical use-cases.
See [examples](https://github.com/zalando-incubator/kopf/tree/master/examples)
for the examples of the typical use-cases.

The minimalistic operator can look like this:

Expand All @@ -56,7 +52,7 @@ The keyword arguments available to the handlers:
* `patch` is a dict with the object changes to applied after the handler.
* `retry` (`int`) is the sequential number of retry of this handler.
* `started` (`datetime.datetime`) is the start time of the handler, in case of retries & errors.
* `runtime` (`datetime.timedelat`) is the duration of the handler run, in case of retries & errors.
* `runtime` (`datetime.timedelay`) is the duration of the handler run, in case of retries & errors.
* `diff` is a list of changes of the object (only for the update events).
* `old` is the old state of the object or a field (only for the update events).
* `new` is the new state of the object or a field (only for the update events).
Expand All @@ -71,12 +67,10 @@ and the existing handlers should accept them.

## Usage

### In-cluster

We assume that when the operator is executed in the cluster, it must be packaged
into a docker image with CI/CD tool of your preference.

```bash
```dockerfile
FROM python:3.7
ADD . /src
RUN pip install kopf
Expand All @@ -91,23 +85,24 @@ See `kopf run --help` for others ways of attaching the handlers.

## Contributing

Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details
on our process for submitting pull requests to us, and please ensure
you follow the [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
Please read [CONTRIBUTING.md](https://github.com/zalando-incubator/kopf/blob/master/CONTRIBUTING.md)
for details on our process for submitting pull requests to us, and please ensure
you follow the [CODE_OF_CONDUCT.md](https://github.com/zalando-incubator/kopf/blob/master/CODE_OF_CONDUCT.md).

To install the environment for the local development,
read [DEVELOPMENT.md](DEVELOPMENT.md).
read [DEVELOPMENT.md](https://github.com/zalando-incubator/kopf/blob/master/DEVELOPMENT.md).


## Versioning

We use [SemVer](http://semver.org/) for versioning. For the versions available,
see the [tags on this repository](https://github.com/zalando-incubator/kopf/tags).
see the [releases on this repository](https://github.com/zalando-incubator/kopf/releases).


## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details
This project is licensed under the MIT License —
see the [LICENSE](https://github.com/zalando-incubator/kopf/blob/master/LICENSE) file for details.


## Acknowledgments
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
LONG_DESCRIPTION = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
DESCRIPTION = LONG_DESCRIPTION.splitlines()[0].lstrip('#').strip()
PROJECT_URLS = {
'Documentation': 'https://github.com/zalando-incubator/kopf/blob/master/README.md',
'Documentation': 'https://kopf.readthedocs.io',
'Bug Tracker': 'https://github.com/zalando-incubator/kopf/issues',
'Source Code': 'https://github.com/zalando-incubator/kopf',
}
Expand All @@ -18,6 +18,7 @@
project_urls=PROJECT_URLS,
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,
long_description_content_type='text/markdown',
author='Sergey Vasilyev',
author_email='[email protected]',
maintainer='Sergey Vasilyev, Chiara Mezzavilla',
Expand Down

0 comments on commit 3a04596

Please sign in to comment.