From a7ed53293e33d5c8ecd4fff835892245af2f4ef8 Mon Sep 17 00:00:00 2001 From: Jimil Desai Date: Thu, 25 Jul 2024 15:29:42 +0200 Subject: [PATCH] change crd name from Backup to s3-Backup to avoid collision with cnpg backup crd Signed-off-by: Jimil Desai --- backup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backup.py b/backup.py index 63842a6..a217363 100644 --- a/backup.py +++ b/backup.py @@ -155,7 +155,7 @@ def container_specs(client, spec, cronjob_name): return containers -@kopf.on.create("Backup") +@kopf.on.create("s3-Backup") def create_cronjob(spec, body, **kwargs): namespace = body["metadata"]["namespace"] create_service_account(v1, namespace) @@ -198,7 +198,7 @@ def create_cronjob(spec, body, **kwargs): return {"message": f"CronJob {cron_job_name} created"} -@kopf.on.update("Backup") +@kopf.on.update("s3-Backup") def update_cronjob(spec, body, **kwargs): cron_job_name = body["metadata"]["name"] + "-cronjob" namespace = body["metadata"]["namespace"]