Skip to content

Commit

Permalink
change crd name from Backup to s3-Backup to avoid collision with cnpg…
Browse files Browse the repository at this point in the history
… backup crd

Signed-off-by: Jimil Desai <[email protected]>
  • Loading branch information
jimil749 committed Jul 25, 2024
1 parent 785da7f commit a7ed532
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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"]
Expand Down

0 comments on commit a7ed532

Please sign in to comment.