This commit is contained in:
@@ -115,10 +115,10 @@ def backup_job_yaml(request):
|
||||
config.load_kube_config(config_file='/code/kubeconfig')
|
||||
v1 = client.BatchV1Api()
|
||||
|
||||
with urllib.request.urlopen("https://gitea.tryton.geeraert.eu/pi-ux-ce/Backup_kube/raw/branch/main/Django/pod.yaml") as fo:
|
||||
with urllib.request.urlopen(https://gitea.tryton.geeraert.eu/pi-ux-ce/Backup_kube/raw/branch/main/Infrequent_access/pod.yaml") as manifest_url:
|
||||
|
||||
# with open('/code/pod.yaml') as fo:
|
||||
job = yaml.safe_load(fo)
|
||||
# with open('/code/pod.yaml') as :
|
||||
job = yaml.safe_load(manifest_url)
|
||||
v1.create_namespaced_job(
|
||||
job['metadata']['namespace'], job, pretty=True
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user