-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
add labels for notebook so that gcp credentials will be injected by webhook #2853
Conversation
@@ -283,6 +284,14 @@ func generateStatefulSet(instance *v1alpha1.Notebook) *appsv1.StatefulSet { | |||
}, | |||
}, | |||
} | |||
|
|||
// Inject GCP credentials | |||
if os.Getenv("GCP_CREDENTIALS") != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about generalizing this?
Take an environment variable that is a comma separated list of labels to apply to the pods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 4 files reviewed, 1 unresolved discussion (waiting on @lluunn and @zabbasi)
components/notebook-controller/pkg/controller/notebook/notebook_controller.go, line 289 at r1 (raw file):
Previously, lluunn (Lun-Kai Hsu) wrote…
done
How about changing the environment variable name? Maybe something like POD_LABELS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 4 files reviewed, 1 unresolved discussion (waiting on @jlewi and @zabbasi)
components/notebook-controller/pkg/controller/notebook/notebook_controller.go, line 289 at r1 (raw file):
Previously, jlewi (Jeremy Lewi) wrote…
How about changing the environment variable name? Maybe something like POD_LABELS?
sounds good, updated
yes, thanks |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: jlewi 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 |
…ebhook (kubeflow#2853) * add labels for gcp cred * kfctl set flag * review comment * review comment
* add labels for notebook so that gcp credentials will be injected by webhook (#2853) * add labels for gcp cred * kfctl set flag * review comment * review comment * Update image tags for katib (#2875) * Style guide added, with supporting docs (#2878) * Let jupyter service account list/get/create secret (#2887) The jupyter service account can already create a deployment with a secret mounted and read it that way, so its just more of a hassle to not let it explicitly list secrets. * add auth cmd (#2873) * remove profile from v0.5 (#2877) * remove profile from v0.5 * remove from test check list * remove namespace selector (#2893) * delete endpoints (#2838) * add new function deleteEndpoints * test import works * fix * revert test-worker tag * get_endpoints_list * break test * add error msg * message * fix * finish deleteEndpoints * use member var * not bail out if retry error * add description * A script to reset the basic auth secret. (#2662) * A script to reset the basic auth secret. * Fix the script. * Resolve comments. * Update the Jupyter UI for 0.5 (#2848) * Add polling logic * Get pvcs * Return more info in Notebooks * Update Makefile, update css/html * Update Rok UI * Minor fixes on html and flask debug mode * Update add-notebook.js in Rok * Add html for new notebook in ROK * Make UI to poll the Backend for State Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> * Update the GCB script Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> * Organize file structure and refactor imports Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> * Sync Notebook name with Workspace Volume Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> * Use different warning if no DefStorClass Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> * Make backend REST Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> * Change Notebook status Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> * Misc changes Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> * Scroll on top to show the error Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> * Clean notebook table Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> * Add dialogs If a user wants to delete a notebook, provide a confirm dialog Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> * Use term Namespace instead of Project Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> * Fix CSS rendering Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> * Make the polling exponential The frontend will stop polling the backend exponentially. If the state doesn't change, reduce the retries counter. If the retries counter goes to zero, then double the time between requests and reset the retries counter. Maximum poll time is 16 seconds. If the state changes, or the user creates/deletes a Notebook or selects a different namespace; reset the polling mechanism Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> * Handle no Status in Notebook CR Signed-off-by: Kimonas Sotirchos <kimwnasptd@arrikto.com> * Create a minimal release process for kfctl. (#2894) * Create a minimal release process for kfctl. * Instructions for building binaries and uploading to GitHub release page. * We need to figure out if/how we cross-compile for linux. Related to: #2383 * * Add make rules to build and push the binary. * tar and gzip the binary * Add separate binaries for linux and Darwin. * update notebook image (#2895) * fix patch string for admission webhook (#2903) * fix patch string * cleanup
…ebhook (kubeflow#2853) * add labels for gcp cred * kfctl set flag * review comment * review comment
…ebhook (kubeflow#2853) * add labels for gcp cred * kfctl set flag * review comment * review comment
…ebhook (kubeflow/kubeflow#2853) * add labels for gcp cred * kfctl set flag * review comment * review comment
…ebhook (kubeflow/kubeflow#2853) * add labels for gcp cred * kfctl set flag * review comment * review comment
…ebhook (kubeflow/kubeflow#2853) * add labels for gcp cred * kfctl set flag * review comment * review comment
…ebhook (kubeflow/kubeflow#2853) * add labels for gcp cred * kfctl set flag * review comment * review comment
…ebhook (kubeflow/kubeflow#2853) * add labels for gcp cred * kfctl set flag * review comment * review comment
Fix #2770
/cc @jlewi @zabbasi
This change is