beacon-biosignals / julia_pod

k8s native julia development
MIT License
10 stars 3 forks source link

add username (or other identifier) to pod name and/or label by default #3

Open kolia opened 3 years ago

kolia commented 3 years ago

from @hannahilea

...when doing kubectl get pods it can be hard to know which pods are ones that I've started (and can therefore kill) vs ones other people might be running. Throwing a username into the name could alleviate this.

from @kolia

Could use a particular env var such as JULIA_POD_USERNAME and default to "$(whoami)" if that is not set? That way usage stays terse (just julia_pod.)

from @soulshake

(Extra credit if this can be made a label on the created pods so you can use a selector to filter them for deletion etc)

kolia commented 3 years ago

Partially addressed by #12, which adds git_repo, git_branch and git_sha labels to the job and pod.

For convenience, the label selectors you can use get logged before dropping into the julia repl.