Skip to content
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

Enable to add Service Account Name in Katib config #1092

Conversation

andreyvelich
Copy link
Member

@andreyvelich andreyvelich commented Mar 16, 2020

Fixes: #1079.

I added functionality to add Service Account Name using Katib config.

We can add Validation part, for example here: https://github.com/kubeflow/katib/blob/master/pkg/webhook/v1alpha3/experiment/validation_webhook.go#L88, to Validate Katib config.

For example, users can't submit Experiment with Service Account, if they don't have appropriate Service Account in Experiment Namespace. I don't know if it useful or not for us.

What do you think @gaocegege @johnugeorge @hougangliu ?

/cc @nrchakradhar.


This change is Reviewable

@nrchakradhar
Copy link

Can you also please update one example to show how to use this. Is it possible to use different service accounts for different experiments.

@andreyvelich
Copy link
Member Author

@nrchakradhar In the current implementation it is not possible to use different Service Account for different Experiment. You need to change katib-config every time you want to change service account for the algorithm.
We can add service account to Experiment API. In that case, each Experiment will have their own service account.
What do you think @johnugeorge @gaocegege @hougangliu ?

@gaocegege
Copy link
Member

In the current implementation it is not possible to use different Service Account for different Experiment.

The main problem is that suggestion does not support serviceaccount, right?

@andreyvelich
Copy link
Member Author

In the current implementation it is not possible to use different Service Account for different Experiment.

The main problem is that suggestion does not support serviceaccount, right?

Yes, suggestion Deployment for some cases can have Service Account.

@gaocegege
Copy link
Member

Then

We can add service account to Experiment API. In that case, each Experiment will have their own service account.

LGTM.

@andreyvelich
Copy link
Member Author

/hold

Hold until we decide the solution for this.

@johnugeorge
Copy link
Member

One problem I see is that Suggestions are hidden to a normal user. If it is just used for suggestion deployments, do we need to expose it?

@nrchakradhar
Copy link

Service accounts are subjects. So even if some CRs are hidden, is it better they run as part of that service account providing greater isolation.

@johnugeorge
Copy link
Member

@nrchakradhar I meant, putting service account parameter in Experiment API vs Katib config.

@andreyvelich
Copy link
Member Author

For now, we can merge this implementation with katib-config changes. In the future, if more users need to have serviceAccount per Experiment, we will change it.
What do you think @gaocegege @johnugeorge ?

@nrchakradhar I will add documentation about parameters in katib-config.

@johnugeorge
Copy link
Member

Sounds good
/lgtm
/approve

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: johnugeorge

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@andreyvelich
Copy link
Member Author

/hold cancel

@andreyvelich
Copy link
Member Author

/retest

1 similar comment
@andreyvelich
Copy link
Member Author

/retest

@k8s-ci-robot k8s-ci-robot merged commit 25cdf1c into kubeflow:master Mar 23, 2020
sperlingxx pushed a commit to sperlingxx/katib that referenced this pull request Jul 9, 2020
* Enable to add service account name to katib config

* Fix test
@andreyvelich andreyvelich deleted the issue-1079-suggestion-sa-katib-config branch October 6, 2021 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to specify service account for an experiment
5 participants