Add kaniko service account to image builder configs #357
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
Similar to how caraml-dev/merlin#352 introduced a Kubernetes service account to be used for Kaniko jobs orchestrated by Merlin, this PR similarly introduces a similar change for Turing in its API server so that it is able to pass a configured Kaniko service account name to all the Kaniko jobs it orchestrates.
Note that not a lot of changes (if any) were made to the unit tests, despite the addition of a new service account (name) field, unlike in the Merlin repo. This is normal since Merlin is currently testing the image job creation workflows much more extensively in its unit tests, which isn't the case in Turing (we are only ascertaining that no error gets returned and the correct container image name gets returned). While it would be nice to introduce more extensive unit tests for Turing (so as to exhaustively test all the transformations performed in order to generate a K8s job manifest), this is out of scope of this PR and will probably be taken on at a later time.