-
Notifications
You must be signed in to change notification settings - Fork 183
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
vagrant: add script to get kubeconfig for vagrant cluster #1487
Conversation
vagrant/scripts/get-kubeconfig.sh
Outdated
readonly CONFIG_PATH="${ROOT_DIR}/tmp/config" | ||
readonly KUBECONFIG_PATH=~/.kube/config | ||
|
||
pushd "${ROOT_DIR}" |
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.
add a popd
, ideally in a trap
# This script replaces kubeconfig with configuration for vagrant cluster | ||
|
||
readonly DIR="$(realpath "$(dirname "${BASH_SOURCE[0]}")")" | ||
readonly ROOT_DIR="${DIR}/../../" |
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.
Wouldn't it be better to operate in /tmp/
instead of littering the repo?
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.
Thats an idea 🤔
REPO_ROOT/tmp
is gitignored
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.
It may be gitignored but still it adds "one-use" junk to repo dir.
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.
check it now
c5ef206
to
99abc56
Compare
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
99abc56
to
242132d
Compare
clean_up | ||
exit 1 | ||
} | ||
trap 'err_report $LINENO' ERR |
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.
trap 'err_report $LINENO' ERR | |
trap clean_up INT | |
trap 'err_report $LINENO' ERR |
?
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.
It doesn't work 😞
Description
vagrant: add script to get kubeconfig for vagrant cluster
Testing performed