Python flask web app to view/manage helm releases.
Go to file
2021-04-06 15:27:58 +08:00
routes Update 'routes/kube_helm_routes.py' 2021-01-04 03:05:29 +00:00
static Loaded with hockey files so web server loads: 2020-09-11 21:02:04 +08:00
templates Remove TESTING banner 2021-04-06 15:27:34 +08:00
.gitignore Update to support helm2 2020-09-14 10:29:30 +08:00
app.py Updated with correct code 2020-09-12 23:51:12 +08:00
Dockerfile Update 'Dockerfile' 2021-01-04 03:11:45 +00:00
forms.py Started to use python client 2020-12-15 22:58:35 +08:00
LICENSE Update code 2020-12-15 11:24:37 +08:00
main.py 'pklk 2020-12-28 15:48:07 +08:00
README.md Update code 2020-12-15 11:24:37 +08:00
requirements.txt Added kubernetes python module 2020-12-15 14:34:52 +08:00
tables.py Fix rollback to use helm3 2020-12-16 13:53:47 +08:00

Python Flask web application for helm releases

This flask based web application will allow a user to select an existing helm revision to rollback or forward to.

Basic Requirements

The expectation is that the application will run in a pod on a kubernetes cluster. As such the pod will run with a service account that provides sufficient privileges to perform helm commands based upon the helm releases that it finds.

The initial (front) page should look similar to the image below. For helm version 2, the namespace selector does not require a value, as managing helm 2 revisions does not require a namespace to be provided.

The code itself downloads kubectl and helm (version 2.13.1) and will perform commands against these utilities. The tiller namespace dropdown is populated by the following command in the code: kubectl get deploy --all-namespaces -l name=tiller The Chart dropdown is then filled with the helm charts deployed by the tiller instance that is selected in the Tiller Namespace dropdown. Some Javascript code is executed to detect that the elementID for the tiller namespace has changed, and the code then populates the Chart dropdown.

Upon hitting submit the application will then execute a helm history against the selected Chart, and a table is constructed which should look similar to the below image

The Namespace has been added to the usual output that the 'helm history' command would return. A hidden field containing the Chart name is also included.

At the moment, the namespace field is unnecessary, however when/if the application is deployed against a helm version 3 environment, the namespace will be important.

Each deployment revision is displayed, with the most recent revision displayed at the bottom of the table. Hitting the 'Deploy' button will trigger helm to rollback (or forward) to the revision selected.