Skip to content
Kubernetes operator example using Python metacontroller.app
Python Makefile
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config simplified and prepared the code for the article Mar 21, 2019
.gitignore
Makefile fixes and added tests Feb 27, 2019
README.md fixes and added tests Feb 27, 2019
requirements_test.txt
sync.py simplified and prepared the code for the article Mar 21, 2019
sync_test.py fixes and added tests Feb 27, 2019

README.md

Example Kubernetes operator using metacontroller.app

This repository implements an example Kubernetes operator using http://metacontroller.app and Python 3, called "ImmortalContainers". This operator enables the user to define, using custom resources, containers that must run and if terminated must be restarted.

Installing and trying the operator

make

Try it running

make example

Then run kubectl get pods -n immortalcontainers and check the pod is created. If you kill the pod it will be recreated.

Testing the code

First create and activate a virtualenv, then run:

make install_test_dependencies
make test

Remove the operator

Run the following command to remove operator, metacontroller.app, namespaces and CRD.

make remove_all
You can’t perform that action at this time.