-
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.
feat: add scripts for minikube checks and project directory validation
- Loading branch information
Showing
9 changed files
with
162 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
check_minikube() { | ||
# Check if minikube is running | ||
MINIKUBE_STATUS=$(minikube status --format '{{.Host}}' || echo "") | ||
if [ "$MINIKUBE_STATUS" != "Running" ]; then | ||
echo "Minikube is not running. Starting minikube..." | ||
minikube start --driver=docker | ||
eval $(minikube docker-env) | ||
kubectl config use-context minikube | ||
docker compose build | ||
fi | ||
} |
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,17 @@ | ||
#!/bin/bash | ||
|
||
check_project_dir() { | ||
PROJECT_DIR=$1 | ||
PROJECT_ENVIRONMENT=$2 | ||
if [ ! -d "$PROJECT_DIR" ]; then | ||
echo "Error: Project directory not found." | ||
exit 1 | ||
fi | ||
|
||
# Check if environment directory exists | ||
ENVIRONMENT_DIR="$PROJECT_DIR/environments/$PROJECT_ENVIRONMENT" | ||
if [ ! -d "$ENVIRONMENT_DIR" ]; then | ||
echo "Error: Environment directory not found." | ||
exit 1 | ||
fi | ||
} |
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,92 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
PROJECT_DIR=$1 | ||
PROJECT_ENVIRONMENT=$2 | ||
|
||
SCRIPT_DIR=$(dirname "$0") | ||
source "$SCRIPT_DIR/../common/check-minikube.sh" | ||
source "$SCRIPT_DIR/../common/check-project-dir.sh" | ||
|
||
check_project_dir "$PROJECT_DIR" "$PROJECT_ENVIRONMENT" | ||
check_minikube | ||
|
||
cd "$PROJECT_DIR/environments/$PROJECT_ENVIRONMENT" | ||
|
||
kubectl kustomize . -v 9 | ||
echo "" | ||
echo "Press any key to continue..." | ||
read -n 1 -s | ||
clear | ||
|
||
#kustomize edit fix | ||
|
||
echo " | ||
█████████████████████████████████████████████████████ █████████ | ||
█████████████████████████████████████████████████████ █████████ | ||
████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█████████████▓▓▓▓████ | ||
████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█████████████▓▓▓▓████ | ||
████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█████████████▓▓▓▓████ | ||
████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████ | ||
████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████ | ||
█████▓▓▓▓▓▓▓▓▓▓▓▓████░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████ | ||
█████▓▓▓▓▓▓▓▓▓▓▓▓████░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████ | ||
█████▓▓▓▓▓▓▓▓████░░░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████ | ||
█████▓▓▓▓▓▓▓▓████░░░░░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████ | ||
████▓▓▓▓████░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████ | ||
████▓▓▓▓████░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████ | ||
████▓▓▓▓████░░░░▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████ | ||
█████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████ | ||
█████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓████ | ||
█████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▒▓▓▓▓▓▓▓▓▓▓▓▓████ | ||
█████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ▒▓▓▓▓▓▓▓▓▓▓▓▓████ | ||
████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ████▓▓▓▓▒ ████ | ||
████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ████▓▓▓▓▒ ████ | ||
█████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ████▓▓▓▓▒ ████ | ||
█████████████████████████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ████▓▓▓▓▒ ████ | ||
████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ████░ ▒████████████ | ||
████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ████░ ▒████████████ | ||
████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ ████░ ▒████████████ | ||
█████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░ ░░░░░░░░░░░░░████ | ||
█████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░ ░░░░░░░░░░░░░████ | ||
█████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░████ | ||
█████▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░████ | ||
█████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒████ | ||
█████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒████ | ||
████░░░░█████████████████████████████████ | ||
████░░░░█████████████████████████████████ | ||
████░░░░█████████████████████████████████ | ||
████░░░░████████▓▓▓▓░░░░░░░░░░░░█████████████████ | ||
████░░░░████████▓▓▓▓░░░░░░░░░░░░█████████████████ | ||
████░░░░████ ████░░░░░░░░░░░░████░ ████ | ||
████░░░░████ ████░░░░░░░░░░░░████░ ████ | ||
████████ ████░░░░░░░░████░ ████ | ||
████████ ████░░░░░░░░████░ ████ | ||
████ ████████░░░░████░ ▒████ | ||
████ ████████░░░░████░ ▒████ | ||
████ ████████▓▓▓▓█████████████████ | ||
████ ████████▓▓▓▓█████████████████ | ||
████ ████████▓▓▓▓█████████████████ | ||
████████▓▓▓▓████████████ | ||
████████▓▓▓▓████████████ | ||
████████▓▓▓▓████▓▓▓▓▓▓▓▓█████████ | ||
████████▓▓▓▓████▓▓▓▓▓▓▓▓█████████ | ||
████████▓▓▓▓▓▓▓▓████████▓▓▓▓▓▓▓▓░ ▒████████ | ||
████████▓▓▓▓▓▓▓▓████████▓▓▓▓▓▓▓▓░ ▒████████ | ||
████▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓████████▓▓▓▓▓▓▓▓▓▓▓▓▓████ | ||
████▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓████████▓▓▓▓▓▓▓▓▓▓▓▓▓████ | ||
████▓▓▓▓▓▓▓▓▓▓▓▓ ▓▓▓▓████████▓▓▓▓▓▓▓▓▓▓▓▓▓████ | ||
████▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█████▓▓▓▓▓▓▓▓▓▓▓▓████ | ||
████▓▓▓▓▓▓▓▓ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓█████▓▓▓▓▓▓▓▓▓▓▓▓████ | ||
█████████████████████████████████████████████████████ | ||
█████████████████████████████████████████████████████ | ||
" | ||
|
||
echo "Applying kustomize build..." | ||
|
||
|
||
kustomize build . | kubectl apply -f - | ||
cd - | ||
|
||
echo "Deployments have been applied." |
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,27 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
ENVIRONMENT_TARGET=$1 || "zfgbb-develop" | ||
|
||
SCRIPT_DIR=$(dirname "$0") | ||
source "$SCRIPT_DIR/../common/check-minikube.sh" | ||
|
||
check_minikube | ||
|
||
kubectl describe deployments -n "$ENVIRONMENT_TARGET" | ||
|
||
echo "Press any key to continue..." | ||
read -n 1 -s | ||
clear | ||
|
||
kubectl describe services -n "$ENVIRONMENT_TARGET" | ||
|
||
echo "Press any key to continue..." | ||
read -n 1 -s | ||
clear | ||
|
||
kubectl describe pods -n "$ENVIRONMENT_TARGET" | ||
|
||
echo "Press any key to continue..." | ||
read -n 1 -s | ||
clear |
File renamed without changes.
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 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