Add podServiceAccountName to SpinApp CRD#228
Add podServiceAccountName to SpinApp CRD#228ThorstenHans wants to merge 1 commit intospinframework:mainfrom
Conversation
closes spinframework#226 Signed-off-by: Thorsten Hans <thorsten.hans@fermyon.com>
michelleN
left a comment
There was a problem hiding this comment.
Code looks good to me @ThorstenHans and seems like this a reasonable addition.
What does the failure scenario look like when a service account with the provided name doesn't exist?
@michelleN that's a good question. When a user tries to create a Pod and is referencing a non-existing ServiceAccountName, the Pod is not accepted at all and a corresponding error message is presented to the user. I would prefer our controller also checking for the specified |
|
Any tips how I could implement validation of the |
There was a problem hiding this comment.
Any tips how I could implement validation of the serviceAccountName in the controller in order to prevent the SpinApp from being created, if the user provides a non-existing serviceAccountName?
I would add a validation step in constructDeployment that ensures the service account exists before adding the service account name to the deployment spec. If the serviceaccount name was provided but doesn't exists, we should return an error / update the spinapp status.
With this PR, users are able to specify the
ServiceAccountNamefor underlying podscloses #226