Skip to content

Kubernetes Functions

Revant Nandgaonkar edited this page Jun 1, 2021 · 5 revisions

check k8s.py

import frappe
from erpnext_feature_board.k8s import (
    create_build_image_job,
    create_helm_release,
    delete_helm_release,
)

improvement = frappe.get_doc("Improvement", "GH-IMP-2021-00082")

# Create job to build and push PR images to private registry
create_build_image_job(
    improvement_name=improvement.name,
    image_tag="version-13",
    git_repo=improvement.fork_url,
    git_branch=improvement.branch,
)

# Create helm release
# Creates site and ingress gh-imp-2021-00082.test-erpnext.org
create_helm_release("GH-IMP-2021-00082")

# Delete helm release
# Drops site gh-imp-2021-00082.test-erpnext.org and deletes ingress
delete_helm_release("GH-IMP-2021-00082")
Clone this wiki locally