Skip to content

Commit

Permalink
Merge pull request #39 from sustainable-computing-io/add-cluster-conn…
Browse files Browse the repository at this point in the history
…ection-check

adding cluster connection check
  • Loading branch information
mamy-CS authored Feb 13, 2024
2 parents c8e19b5 + 7199e2a commit 8b273a3
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

1 comment on commit 8b273a3

@trent-s
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent! Thank you!

Please sign in to comment.