Skip to content
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

Merged
merged 1 commit into from Mar 9, 2021

Conversation

sumo-drosiek
Copy link
Contributor

Description

vagrant: add script to get kubeconfig for vagrant cluster


Testing performed
  • Redeploy fluentd and fluentd-events pods
  • Confirm events, logs, and metrics are coming in

readonly CONFIG_PATH="${ROOT_DIR}/tmp/config"
readonly KUBECONFIG_PATH=~/.kube/config

pushd "${ROOT_DIR}"
Copy link
Contributor

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}/../../"
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check it now

Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
clean_up
exit 1
}
trap 'err_report $LINENO' ERR
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
trap 'err_report $LINENO' ERR
trap clean_up INT
trap 'err_report $LINENO' ERR

?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't work 😞

@sumo-drosiek sumo-drosiek merged commit 8f59342 into main Mar 9, 2021
@sumo-drosiek sumo-drosiek deleted the drosiek-get-kubeconfig branch March 9, 2021 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants