Skip to content

Commit

Permalink
run hello world containers
Browse files Browse the repository at this point in the history
  • Loading branch information
Deltachaos committed Aug 31, 2024
1 parent 7eeaeab commit c44f724
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ def add_job(job):
job["serviceAccountName"] = get_serviceaccount_name()

configmap = v1.read_namespaced_config_map(name=configmap_name, namespace=namespace)

if "data" not in configmap:
configmap["data"] = {}

configmap.data["job-" + str(lastjob) + ".yaml"] = json.dumps({"spec": {"template": {"spec": job}}})
v1.patch_namespaced_config_map(name=configmap_name, namespace=namespace, body=configmap)
lastjob = lastjob + 1
Expand Down

0 comments on commit c44f724

Please sign in to comment.