Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

ThorstenHans
Copy link
Contributor

With this PR, users are able to specify the ServiceAccountName for underlying pods

closes #226

closes spinframework#226

Signed-off-by: Thorsten Hans <thorsten.hans@fermyon.com>
Copy link
Contributor

@michelleN michelleN left a comment

Choose a reason for hiding this comment

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

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?

@ThorstenHans
Copy link
Contributor Author

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 ServiceAccountName in the current namespace, before it starts with creating underlying Kubernetes primitives

@ThorstenHans
Copy link
Contributor Author

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?

Copy link
Contributor

Choose a reason for hiding this comment

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

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.

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.

Spin App: Support ServiceAccountName for underlying Pods

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.