forked from kubeflow/kubeflow
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvements and bug fixes in DM config. (kubeflow#904)
* Improvements and bug fixes in DM config. * Create a service account to be used to authorize TFJobs and other work within the cluster. * Create a helper script to download service account keys and turn them into K8s keys * Fix some bugs in the docs. * Fix kubeflow#878 create a GCP service account for the user. * IAP script needs a GCP service account with network admin privileges. * Add network admin privileges to the admin service account. * Name the secrets in K8s so that be default the names are the same across the deployments. This way there's one less parameter to set for every deployment. * VM service account should have a unique name per deployment so deployments are isolated. * Need to grant the VM service account logs and monitoring access to support monitoring. * I don't think there's any reason to allow user to specify name of the VM service account in the YAML file right now. * Address comments. * Autoformat jsonnet.
- Loading branch information
1 parent
8a73fd3
commit 91d07f5
Showing
7 changed files
with
104 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
# | ||
# A simple helper script to download secrets for Kubeflow service | ||
# accounts and store them as K8s secrets. | ||
set -ex | ||
export SA_EMAIL=${DEPLOYMENT_NAME}-admin@${PROJECT}.iam.gserviceaccount.com | ||
|
||
# TODO(jlewi): We should name the secrets more consistently based on the service account name. | ||
# We will need to update the component configs though | ||
gcloud --project=${PROJECT} iam service-accounts keys create ${SA_EMAIL}.json --iam-account ${SA_EMAIL} | ||
kubectl create secret generic --namespace=kubeflow admin-gcp-sa --from-file=admin-gcp-sa.json=./${SA_EMAIL}.json | ||
|
||
export USER_EMAIL=${DEPLOYMENT_NAME}-user@${PROJECT}.iam.gserviceaccount.com | ||
export USER_SECRET_NAME=${DEPLOYMENT_NAME}-user | ||
gcloud --project=${PROJECT} iam service-accounts keys create ${USER_EMAIL}.json --iam-account $USER_EMAIL | ||
# We want the secret name to be the same by default for all clusters so | ||
# that users don't have to set it manually. | ||
kubectl create secret generic --namespace=kubeflow user-gcp-sa --from-file=user-gcp-sa.json=./${USER_EMAIL}.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters