-
Notifications
You must be signed in to change notification settings - Fork 78
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
Script to generate kubeconfig secret and ClientConfig #89
Conversation
scripts/create-client-config.sh
Outdated
echo | ||
echo "Syntax: create-client-config.sh [options]" | ||
echo "Options:" | ||
echo "src-context The context for the source cluster that contains the service account. This or the src-kubeconfig option must be set." |
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.
Very minor: for a prettier output you could align the start of each description text.
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.
I tried a couple different approaches for formatting/wrapping the text into fixed width columns. Any suggestions on how best to do it?
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.
I'm no specialist in these things but I added a suggestion in another comment below:
https://github.com/k8ssandra/k8ssandra-operator/pull/89/files#r693825451
scripts/create-client-config.sh
Outdated
# script fetches the k8ssandra-operator service account from the remote cluster and | ||
# extracts the token and CA cert which are then added to a kubeconfig file. The script then | ||
# creates a secret with the contents of the kubeconfig file. Lastly, the script creates a | ||
# ClientObject that references the secret. |
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.
# ClientObject that references the secret. | |
# ClientConfig object that references the secret. |
scripts/create-client-config.sh
Outdated
mkdir -p $output_dir | ||
fi | ||
|
||
if [ ! -z "$namespace"]; then |
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.
if [ ! -z "$namespace"]; then | |
if [ ! -z "$namespace" ]; then |
e1470b5
to
4fdd21a
Compare
What this PR does:
Which issue(s) this PR fixes:
Fixes #83
Checklist