Skip to content

Commit

Permalink
update cronjob api
Browse files Browse the repository at this point in the history
Signed-off-by: Jimil Desai <[email protected]>
  • Loading branch information
jimil749 committed Nov 24, 2023
1 parent 7f9e2d2 commit 040bf3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
from kubernetes import client, config

config.load_incluster_config()
api = client.BatchV1beta1Api()
secretAPI = client.CoreV1Api()
batchAPI = client.BatchV1Api()

# get buckets from the cronjob specs
buckets = os.environ.get("BUCKET_LIST")
s3_buckets = buckets.split(",")
Expand Down Expand Up @@ -211,7 +211,7 @@ def backup(bucket_name):
)

# get cronjob uid
cronjob = api.read_namespaced_cron_job(
cronjob = batchAPI.read_namespaced_cron_job(
name=os.environ["PARENT_NAME"], namespace=os.environ["NAMESPACE"]
)
cronjob_uid = cronjob.metadata.uid
Expand Down

0 comments on commit 040bf3b

Please sign in to comment.