Skip to content

Commit

Permalink
Remove some scripting in migration script (#1230)
Browse files Browse the repository at this point in the history
Co-authored-by: Automatic Update <[email protected]>
  • Loading branch information
sveinpj and Automatic Update authored Mar 6, 2024
1 parent 9ce7eba commit e89d30c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
6 changes: 3 additions & 3 deletions scripts/grafana/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ verify_cluster_access
### Create namespace
###

if [[ ! $(kubectl get namespace --output jsonpath='{.items[?(.metadata.name=="monitor")]}') ]]; then
kubectl create namespace monitor --dry-run=client -o yaml | sed '/^metadata:/a\ \ labels: {"purpose":"radix-base-ns"}' | kubectl apply -f -
fi
# if [[ ! $(kubectl get namespace --output jsonpath='{.items[?(.metadata.name=="monitor")]}') ]]; then
# kubectl create namespace monitor --dry-run=client -o yaml | sed '/^metadata:/a\ \ labels: {"purpose":"radix-base-ns"}' | kubectl apply -f -
# fi

#######################################################################################
### Create secret required by Grafana
Expand Down
8 changes: 8 additions & 0 deletions scripts/install_base_components.sh
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,14 @@ if [[ $(kubectl get namespace flux-system 2>&1) == *"Error"* ]]; then
printf "...Done"
fi

#######################################################################################
### Create monitor namespace
###

if [[ ! $(kubectl get namespace --output jsonpath='{.items[?(.metadata.name=="monitor")]}') ]]; then
kubectl create namespace monitor --dry-run=client -o yaml | sed '/^metadata:/a\ \ labels: {"purpose":"radix-base-ns"}' | kubectl apply -f -
fi

#######################################################################################
### Add priority classes
###
Expand Down
18 changes: 9 additions & 9 deletions scripts/migrate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,11 @@ if ! [[ -x "$INSTALL_BASE_COMPONENTS_SCRIPT" ]]; then
echo "ERROR: The install base components script is not found or it is not executable in path $INSTALL_BASE_COMPONENTS_SCRIPT" >&2
fi

PROMETHEUS_CONFIGURATION_SCRIPT="$WORKDIR_PATH/prometheus-operator/configure.sh"
if ! [[ -x "$PROMETHEUS_CONFIGURATION_SCRIPT" ]]; then
# Print to stderror
echo "ERROR: The prometheus configuration script is not found or it is not executable in path $PROMETHEUS_CONFIGURATION_SCRIPT" >&2
fi
# PROMETHEUS_CONFIGURATION_SCRIPT="$WORKDIR_PATH/prometheus-operator/configure.sh"
# if ! [[ -x "$PROMETHEUS_CONFIGURATION_SCRIPT" ]]; then
# # Print to stderror
# echo "ERROR: The prometheus configuration script is not found or it is not executable in path $PROMETHEUS_CONFIGURATION_SCRIPT" >&2
# fi

RESTORE_APPS_SCRIPT="$WORKDIR_PATH/velero/restore/restore_apps.sh"
if ! [[ -x "$RESTORE_APPS_SCRIPT" ]]; then
Expand Down Expand Up @@ -515,10 +515,10 @@ while [[ "$(kubectl get deploy prometheus-operator-operator --namespace monitor
done
printf " Done.\n"

echo ""
printf "%s► Execute %s%s\n" "${grn}" "$PROMETHEUS_CONFIGURATION_SCRIPT" "${normal}"
(RADIX_ZONE_ENV="${RADIX_ZONE_ENV}" USER_PROMPT="${USER_PROMPT}" CLUSTER_NAME="${DEST_CLUSTER}" source "${PROMETHEUS_CONFIGURATION_SCRIPT}")
wait
# echo ""
# printf "%s► Execute %s%s\n" "${grn}" "$PROMETHEUS_CONFIGURATION_SCRIPT" "${normal}"
# (RADIX_ZONE_ENV="${RADIX_ZONE_ENV}" USER_PROMPT="${USER_PROMPT}" CLUSTER_NAME="${DEST_CLUSTER}" source "${PROMETHEUS_CONFIGURATION_SCRIPT}")
# wait

# Wait for operator to be deployed from flux
echo ""
Expand Down

0 comments on commit e89d30c

Please sign in to comment.