Kopf Versions Save

A Python framework to write Kubernetes operators in just few lines of code.

0.23rc1

4 years ago

TL;DR: Massive refactoring, renames, code moves. Generally, should be backward-compatible.

RISKY CHANGES (can be BREAKING, should be not):

  • Authentication and API talking are fully reworked: pykube-ng and kubernetes clients are now piggybacked by default to extract the endpoints and credentials, but are not used for the API communication. This can break API connectivity in some cases. #226 #227
  • In-memory containers introduced to carry the technical information/objects/flags for individual resources. This can lead to increased memory usage in huge clusters with thousands of monitored resources. #230
  • @kopf.on.resume() handlers were fixed, and can now execute when previously they were not executed by mistake, but this could be taken as an expected behaviour. This can lead to massive patches of all objects on every operator startup. #230
  • Massive internal renames and code moves; not exposed publicly, unless hacks or monkey-patching were used. #209 #210 #211
  • cause.event is renamed to cause.reason to avoid terminology conflicts. #201

New features:

  • @kopf.on.startup() handlers for operator initialisation. #225
  • @kopf.on.cleanup() handlers for operator shutdown. #225
  • @kopf.on.login() custom authentication handlers. #226
  • @kopf.on.probe() handlers for liveness metrics. #226
  • Pod's liveness probes with kopf run --liveness. #228
  • Explicit owner is not needed in kopf.adopt() and hierarchy methods, current object is used by default. #203
  • retries= limiter for handlers in addition to timeout=. #222
  • errors=TEMPORARY, errors=PERMANENT, errors=IGNORED modes for handlers. #222

Bugfixes:

  • @kopf.on.resume() handlers are not repeated every few minutes for no reason. #229 #230
  • @kopf.on.resume() are executed if they go after the on-create/on-update handlers. #230
  • @kopf.on.resume() can be retried in case of temporary or arbitrary errors. #230
  • @kopf.on.resume() can have sub-handlers. #230
  • There can be 2+ of the@kopf.on.resume() handlers. #230
  • spec, status, metadata fields are not added to the body when absent. #198
  • Ignore asyncio signal handlers on Windows. #220

Internal changes:

  • Fully type-annotated in the code (not in the tests). #195 #196 #197 #200 #201
  • Fully asynchronous internally (asyncio/aiohttp); synchronous pykube-ng client is removed. #217 #227
  • Handler outcomes and persistent state management separated from each other. #221
  • E2E tests are now isolated from each other, preventing false-positives. #205
  • The latest k8s & minikube versions are used in e2e tests. #193

0.22

4 years ago

Bugfixes:

  • Implicit logging events obey the configured level. #192 #188
  • Field-changes detect the sub-fields of change's dict-containers. #191 #190

Internal changes:

  • Diffs are turned from tuples to classes, diff ops — from strings to enums. #191

0.22rc1

4 years ago

Bugfixes:

  • Implicit logging events obey the configured level. #192 #188
  • Field-change detects sub-fields of change dict-containers. #191 #190

Internal changes:

  • Diffs are turned from tuples to classes, diff ops — from strings to enums. #191

0.21

4 years ago

New features:

Improvements:

  • kopf --version added. #175
  • More logs on reasons of exiting/termination. #179
  • Wake up immediately on new changes of the object if currently sleeping for delayed handlers. #162
  • Speed up the deletion (finalizer removal) of the objects with failed creation/update handlers. #162
  • Terminate the operator better, with graceful period for clean shutdown. #156
  • K8s-events for cluster-scoped objects are posted to the current namespace, not "default". #165
  • Kopf's handler errors renamed to kopf.PermanentError/kopf.TemporaryError. #159
  • Kopf's permanent/temporary errors (and these only) will not dump strack-traces anymore. #159

Bugfixes:

  • Do not add a finalizer to objects excluded by labels/annotations filters. #173
  • Fixed failing with 404 if object was removed too fast or within the handler. #160
  • Fixed implicitly forced peering mode for embeddable operator. #174

Internal changes:

  • CodeCov PR comments disabled (to prevent spamming). #170
  • Some modules were moved around and split. #155

0.21rc5

4 years ago

Reverted:

  • Removed "Ensure eventual consistency for all handlers" feature of 0.21rc3. #182 ~#163~

0.21rc4

4 years ago

Improvements:

  • More logs on reasons of exiting/termination. #179

0.21rc3

4 years ago

Improvements:

  • kopf --version added. #175

Bugfixes:

  • Do not add a finalizer to objects excluded by labels/annotations filters. #173
  • Ensure eventual consistency for all handlers even with intermediate object changes. #163

0.21rc2

4 years ago

Improvements:

  • Wake up immediately on new changes of the object if currently sleeping for delayed handlers. #162
  • Speed up the deletion (finalizer removal) of the objects with failed creation/update handlers. #162

Bugfixes:

  • Fixed failing with 404 if object was removed too fast or within the handler. #160
  • Fixed implicitly forced peering mode for embeddable operator. #174

0.21rc1

4 years ago

New features:

Improvements:

  • Terminate the operator better, with graceful period for clean shutdown. #156
  • K8s-events for cluster-scoped objects are posted to the current namespace, not "default". #165
  • Kopf's handler errors renamed to kopf.PermanentError/kopf.TemporaryError. #159
  • Kopf's permanent/temporary errors do not dump strack-traces anymore. #159

Internal changes:

  • CodeCov PR comments disabled (to prevent spamming). #170
  • Some modules were moved around and split. #155

0.20

4 years ago

New feature:

  • Decorator-level filtering of the objects by labels/annotations existence or values. #123