From 58e5fe05f8ae0eb87a48c0f8749735190cc66f87 Mon Sep 17 00:00:00 2001 From: Patrice Ferlet Date: Wed, 25 May 2022 07:46:36 +0200 Subject: [PATCH] Return when `len(crons) == 0` --- generator/crontabs.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/generator/crontabs.go b/generator/crontabs.go index e8f76b5..4066866 100644 --- a/generator/crontabs.go +++ b/generator/crontabs.go @@ -43,6 +43,10 @@ func buildCrontab(deployName string, deployment *helm.Deployment, s *types.Servi log.Fatalf("error: %v", err) } + if len(crons) == 0 { + return + } + // create a serviceAccount sa := helm.NewServiceAccount(deployName) // create a role