-
Notifications
You must be signed in to change notification settings - Fork 244
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
WIP set service account for dev container via component attributes #6111
Conversation
Today, the devfile API does not allow you to set the Service Account for a Container component, so attributes are being used instead. Signed-off-by: Vinny Sabatini <vincent.sabatini@kohls.com>
Hi @vinny-sabatini. Thanks for your PR. I'm waiting for a redhat-developer member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
✅ Deploy Preview for odo-docusaurus-preview ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Kudos, SonarCloud Quality Gate passed!
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/ok-to-test |
Hi @vinny-sabatini, earlier this week, there was a discussion on one of the devfile issues. And the solution that was proposed there would also address the "ServiceAccount" issue as well but in a more generic way. You can see what is being proposed here devfile/api#920 (comment) |
@kadel thanks for the info! That solution looks much more flexible than trying to key every single customization and overloading the devfile API spec. I can work on updating this PR to follow the convention mentioned in that issue |
@vinny-sabatini: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
odo uses devfile/library for generating k8s resources from devfile. I think that this logic should be implemented in the devfile/library. There is a set of functions in the |
This was done in #6512 |
Signed-off-by: Vinny Sabatini vincent.sabatini@kohls.com
What type of PR is this:
/kind feature
What does this PR do / why we need it:
Allow users to specify what Kubernetes service account the pod should run as for an
odo dev
session.This is generally useful if you want your workload to have additional permissions within a Kubernetes cluster
and you do not want to grant additional access to the default service account.
If the attribute is not set, the
default
service account will be used.Which issue(s) this PR fixes:
Fixes #5977
PR acceptance criteria:
Unit test
Integration test
Documentation
How to test changes / Special notes to the reviewer:
.components.attributes.serviceAccountName
for your container component to the name of the service account you createdodo dev
.spec.template.spec.serviceAccountName
on the deployment, or.spec.serviceAccountName
of the running pod