Make cronJob work without a service account
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.
There's a check failing that has nothing to do with my changes. Not sure what to do. Help? :)
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.
@TomyLobo I just rebased the PR (pull with git pull --rebase next time). Tests are running!
@rasheedamir validation successful`
Superseeded by https://github.com/stakater/application/pull/363, which will soon be merged.