-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more empty necessary empty folders with .gitignore. Also generate…
… generate_firewall_pki.sh script which will automatically copy the created certs to the correct path.
- Loading branch information
henrikr3
committed
Jan 28, 2020
1 parent
63c193d
commit 034d7b2
Showing
7 changed files
with
73 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
|
||
set -eux | ||
|
||
ABS_PATH=$(readlink -f "$0") | ||
DIR=$(dirname "$ABS_PATH") | ||
|
||
checkStatus () { | ||
local status=$1 | ||
if [ $status -eq 0 ] | ||
then | ||
echo "." | ||
else | ||
echo "The previous step failed" | ||
exit 1 | ||
fi | ||
return 0 | ||
} | ||
|
||
ensureFileExistsAndCopy () { | ||
FROM=$1 | ||
TO=$2 | ||
if [ -f "$FROM" ] | ||
then | ||
if [ ! -f "$TO" ] | ||
then | ||
cp -f $FROM $TO | ||
else | ||
echo "Existing certificate already existed, skipping copying as a safe-guard: $TO" | ||
exit 1 | ||
fi | ||
else | ||
echo "File did not exist, probably an issue with certificate creation: $FROM" | ||
exit 1 | ||
fi | ||
} | ||
|
||
ensureFileExistsAndCopy $DIR/pki-firewall/certs/trust.jks $DIR/../helm/files/certificates/firewall_tunnel/trust.jks | ||
ensureFileExistsAndCopy $DIR/pki-firewall/certs/float.jks $DIR/../helm/files/certificates/firewall_tunnel/float.jks | ||
ensureFileExistsAndCopy $DIR/pki-firewall/certs/bridge.jks $DIR/../helm/files/certificates/firewall_tunnel/bridge.jks | ||
|
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,23 @@ | ||
#!/bin/bash | ||
|
||
set -eux | ||
|
||
ABS_PATH=$(readlink -f "$0") | ||
DIR=$(dirname "$ABS_PATH") | ||
|
||
checkStatus () { | ||
local status=$1 | ||
if [ $status -eq 0 ] | ||
then | ||
echo "." | ||
else | ||
echo "The previous step failed" | ||
exit 1 | ||
fi | ||
return 0 | ||
} | ||
|
||
$DIR/pki-firewall/generate_pki.sh | ||
checkStatus $? | ||
$DIR/copy_certs_to_helm_files.sh | ||
checkStatus $? |
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 |
---|---|---|
|
@@ -17,5 +17,5 @@ checkStatus () { | |
return 0 | ||
} | ||
|
||
source $DIR/helm/helm_compile.sh | ||
$DIR/helm/helm_compile.sh | ||
checkStatus $? |
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,2 @@ | ||
* | ||
!.gitignore |
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