Skip to content

Commit

Permalink
adding cluster connection check
Browse files Browse the repository at this point in the history
Signed-off-by: Mohammed Abdi <[email protected]>
  • Loading branch information
Mohammed Abdi authored and Mohammed Abdi committed Feb 13, 2024
1 parent c8e19b5 commit 7199e2a
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions deployment/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,22 @@
# Deploy SusQL controller using helm charts
#

# Check if kubectl is installed
if ! command -v kubectl &> /dev/null; then
echo "Error: kubectl is not installed. Please install kubectl to interact with Kubernetes clusters."
exit 1
fi

# Check if there is a current context
current_context=$(kubectl config current-context)
if [[ -z $current_context ]]; then # exit
echo "Error: You are not currently signed into any Kubernetes cluster."
exit 1
else # continue
echo "You are currently signed into the following Kubernetes cluster:"
echo "$current_context"
fi

export SUSQL_NAMESPACE="openshift-kepler-operator"

if [[ -z ${PROMETHEUS_PROTOCOL} ]]; then
Expand Down

0 comments on commit 7199e2a

Please sign in to comment.