Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make cronJob work without a service account #320

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

TomyLobo
Copy link

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
Copy link
Author

TomyLobo commented Jul 4, 2024

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

Copy link
Collaborator

@d3adb5 d3adb5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the problem with the CI workflow is infrastructure (configuration) related. I don't have access to the runners these jobs are running on, but given the error message (missing versions of dynamic glibc) I assume the runner is perhaps on CentOS 7 while the new oc binary was built with RHEL9 in mind --- hence the newer versions of glibc required. Can you guys take a look, @rasheedamir? This is affecting ALL builds. 😅

{{- if $.Values.rbac.enabled }}
{{- if $.Values.rbac.serviceAccount.enabled }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we still keep the if $.Values.rbac.enabled line? If RBAC for this chart has been completely disabled, it shouldn't in theory matter if rbac.serviceAccount.enabled is true, is my thinking.

Copy link
Author

@TomyLobo TomyLobo Jul 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same goes for the deployment, then.
I didn't check if there are other parts as well, which would be equally affected.
I'm just building on your reasoning for the deployment :)

@d3adb5
Copy link
Collaborator

d3adb5 commented Jul 6, 2024

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
Copy link
Collaborator

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

Copy link

github-actions bot commented Jul 12, 2024

@rasheedamir validation successful`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants