-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JWT as secret, fix commands, first milestone
- Loading branch information
Showing
7 changed files
with
85 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
REPO_ROOT=$(git rev-parse --show-toplevel) | ||
|
||
if [ $? -ne 0 ]; then | ||
echo "Not inside a Git repository" | ||
exit 1 | ||
fi | ||
|
||
if [[ ! -f $REPO_ROOT/temp/jwt ]] | ||
then | ||
mkdir -p $REPO_ROOT/temp | ||
openssl rand -hex 32 | tr -d "\n" | tee > $REPO_ROOT/temp/jwt | ||
else | ||
echo "$REPO_ROOT/temp/jwt already exists!" | ||
fi | ||
|
||
kubectl create secret generic jwt-secret --from-file=$REPO_ROOT/temp/jwt | ||
|
||
# Clean up temp file | ||
rm -r $REPO_ROOT/temp |