stakater / application

Generic helm chart for all kind of applications
http://stakater.com
MIT License
199 stars 85 forks source link

Make cronJob work without a service account #320

Open TomyLobo opened 2 months ago

TomyLobo commented 2 months ago

When using a cronJob without configuring a serviceAccount, I get the following error under "Events" in "kubectl describe":

  Warning  FailedCreate  5m33s (x534 over 2d4h)  job-controller  Error creating: pods "myapp-weekly-dst-28656480-" is forbidden: error looking up service account myapp/myapp: serviceaccount "myapp" not found

This PR fixes that by evaluating rbac.serviceAccount.enabled instead of rbac.enabled, bringing it into alignment with deployment.yaml.

TomyLobo commented 2 months ago

There's a check failing that has nothing to do with my changes. Not sure what to do. Help? :)

d3adb5 commented 2 months ago

FYI I opened an issue for this: #321. For now let's wait for that to be fixed so we don't merge anything without all the automated tests passing, @TomyLobo.

aslafy-z commented 2 months ago

@TomyLobo I just rebased the PR (pull with git pull --rebase next time). Tests are running!

github-actions[bot] commented 2 months ago

@rasheedamir validation successful`