aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/sdnc/resources/geo/bin/sdnc.isPrimaryCluster
blob: 8e816c41532987b66ec63a6602c69b8be0bdaf61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash

OOM_HOME=${OOM_HOME:-$HOME}

IS_PRIMARY_CLUSTER=`awk '/isPrimaryODLCluster/ {print $2}' ${OOM_HOME}/oom/kubernetes/sdnc/values.yaml`

if [ "$?" -eq "2" ]; then
      echo "Make sure you are ubuntu user." >&2
fi

case $IS_PRIMARY_CLUSTER in
true|false)
	echo $IS_PRIMARY_CLUSTER
	;;
*)
	echo "NOT CLUSTERED"
	exit 1
	;;
esac