-
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.
Finish ingress and related scripts, update README and tests
- Loading branch information
1 parent
96f629b
commit b5c4872
Showing
13 changed files
with
101 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/sh | ||
|
||
# Turn on the nginx ingress controller in the local minikube cluster | ||
# This will automatically connect Ingress resources in the cluster to | ||
# Minikube's IP on the host, accessible via $(minikube ip) | ||
|
||
echo "Enabling the NGINX ingress controller in the minikube cluster" | ||
minikube addons enable ingress |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
|
||
# create a hosts entry to allow accessing a hostname via the minikube IP address | ||
|
||
HOSTNAME=$1 | ||
ETC_HOSTS=/etc/hosts | ||
|
||
if [ -z "$HOSTNAME" ] | ||
then | ||
echo "ERROR: Please provide a hostname as the first argument" | ||
echo "e.g. update-minikube-hosts-entry.sh test-review-app-678.review.local" | ||
exit 1 | ||
fi | ||
|
||
IP=$(minikube ip) | ||
if [ -z "$IP" ] | ||
then | ||
echo "Minikube IP could not be found. Aborting" | ||
exit 1 | ||
else | ||
echo "Minikube IP is $IP" | ||
fi | ||
|
||
EXISTING=$(grep $HOSTNAME $ETC_HOSTS) | ||
HOSTS_LINE="$IP $HOSTNAME" | ||
if [ "$EXISTING" == "$HOSTS_LINE" ] | ||
then | ||
echo "Hosts file already configured. Nothing to do." | ||
exit 0 | ||
fi | ||
|
||
echo "Editing file $ETC_HOSTS. You may be asked for your 'sudo' password." | ||
|
||
if [ -n "$EXISTING" ] | ||
then | ||
echo "Entry '$EXISTING' will be replaced"; | ||
echo "A backup will be created at $ETC_HOSTS.bak"; | ||
sudo sed -i".bak" "/$HOSTNAME/d" $ETC_HOSTS | ||
fi | ||
|
||
sudo -- sh -c -e "echo '$HOSTS_LINE' >> $ETC_HOSTS"; |
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 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 |
---|---|---|
|
@@ -9,7 +9,7 @@ req_extensions = v3_req | |
subjectAltName = @alt_names | ||
|
||
[alt_names] | ||
DNS.1 = *.local | ||
DNS.1 = *.review.local | ||
|
||
[dn] | ||
C=US | ||
|
@@ -18,4 +18,4 @@ L=New Orleans | |
O=Revelry Labs | ||
OU=Development | ||
emailAddress[email protected] | ||
CN=*.local | ||
CN=*.review.local |
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