change the config file
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 27s

This commit is contained in:
pierre geeraert
2025-06-02 22:38:26 +01:00
parent 60af5e87ce
commit cb49bfba58
+2 -2
View File
@@ -18,7 +18,7 @@ def hello(request):
return HttpResponse('<h1>Hello k8s!</h1>')
def scale_up(request,namespace_name,deploy_name):
config.load_kube_config(config_file='/code/kubeconfig')
config.load_kube_config(config_file='/kubeconfig')
api = client.AppsV1Api()
deployment = api.read_namespaced_deployment(name=deploy_name, namespace=namespace_name)
deployment.spec.replicas = 2
@@ -29,7 +29,7 @@ def scale_up(request,namespace_name,deploy_name):
def scale_down(request,namespace_name,deploy_name):
config.load_kube_config(config_file='/code/kubeconfig')
config.load_kube_config(config_file='/kubeconfig')
api = client.AppsV1Api()
deployment = api.read_namespaced_deployment(name=deploy_name, namespace=namespace_name)
deployment.spec.replicas = 0