-
Notifications
You must be signed in to change notification settings - Fork 795
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
fix(daemonset): Allow the definition a ServiceAccount in DaemonSets #3441
Conversation
Hey @manics could you take a look at this? |
@manics check this again when you can, everything is working as expected |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than a couple of queries this looks good to me, thanks for working on this.
@consideRatio would you mind reviewing this? I'm not fully confident about all the changes.
@consideRatio please take a look when you can :) |
@manics can you push this to have the second review and be merged? |
I'll make time to review this this PR this week |
I failed to make time for this, but it remains on my todo list. |
Thanks! Please don't forget to review this since it's open since June :) |
Thank you for engaging and trying to figure things out here @samyuh!! Background and overviewThere are two "pre puller" machineries:
Both involve a daemonset to ensure each node gets images pulled, but the hook pre puller needs to stop, so it includes a k8s job that starts and finishes. The k8s job pod needs k8s api permissions, because it needs to read the state of the daemonset that was created, so it can say if all its pods are ready etc. Its just waiting for that to happen and then shuts down. Anyhow, this is why the daemonset pods doesn't have a service account, they haven't needed one. The one used for the hook pre puller's k8s job pod is specifically for that k8s job pod and comes with relevant permissions, re-using it for daemonset's pods won't be the correct call no matter what as it provides irrelevant permissions to those pods. DecisionI'll opt to close this pull request in its current form for now as I don't want to have the hook pre puller machinery's k8s job's service account re-used for the daemonsets' pods, however: If there a need to configure the pre-puller pods with a k8s Service Account, and possibly also have it be created by the chart as well, it could be considered. For this, please describe what is to be accomplished by configuring the daemonset pod's serviceAccountName and optionally also if there is value in getting a blank k8s ServiceAccount created by the chart. |
Hey @consideRatio, thanks for your detailed response.
We really need to have every component in our deployment with a specific service account due to security compliance. In this merge request, I used the existing pre-puller service account as I thought there would be no problem. We can just go with the option of setting the Thanks again :) |
This pull request introduces the option to define a ServiceAccount in DaemonSets used in the prepuller.
Closes #3442