Skip to content

Commit

Permalink
add user-project option
Browse files Browse the repository at this point in the history
  • Loading branch information
HughNhan committed Mar 27, 2024
1 parent 02d3e1b commit 1f3b9b1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions endpoints/k8s/k8s
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ pod_prefix="rickshaw"
project_name="crucible-rickshaw"
hypervisor_host="none"
unique_project="0"
user_project=""
hostNetwork="0"
hugepage="0"
osruntime[default]="pod"
Expand Down Expand Up @@ -421,8 +422,14 @@ function process_k8s_opts() {
val=`echo $opt | sed -e s/^$arg://`
case "$arg" in
unique-project)
# This option auto-generates a project name. CLI option '--unique-project=1'
unique_project=${val}
;;
user-project)
# This option allows a user-defined project name. CLI option '--user-project=my-k8s-project'
# unique-project option has higher precedence.
user_project=${val}
;;
kubeconfig)
kubeconfig=$val
;;
Expand Down Expand Up @@ -517,6 +524,8 @@ function process_k8s_opts() {

if [ "${unique_project}" == "1" ]; then
project_name+="--${run_id}-${endpoint_label}"
elif [ ! -z "${user_project}" ]; then
project_name="${user_project}"
fi
}

Expand Down

0 comments on commit 1f3b9b1

Please sign in to comment.