Skip to content

Commit

Permalink
make heketi admin and user keys mandatory
Browse files Browse the repository at this point in the history
Heketi has changed its default mode to authenticated and won't start if
the config file OR env does not have them set. gk-deploy should fail
early if keys are not provided than failing later.

Signed-off-by: Raghavendra Talur <rtalur@redhat.com>
  • Loading branch information
raghavendra-talur authored and jarrpa committed Jul 18, 2019
1 parent 14017ac commit 7246eb4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions deploy/gk-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ Options:
--admin-key ADMIN_KEY
Secret string for heketi admin user. heketi admin has access to
all APIs and commands. Default is to use no secret.
all APIs and commands. This is a required argument.
--user-key USER_KEY
Secret string for general heketi users. heketi users have access
to only Volume APIs. Used in dynamic provisioning. Default is to
use no secret.
to only Volume APIs. Used in dynamic provisioning. This is a
required argument.
--daemonset-label DAEMONSET_LABEL
Controls the value of the label set on nodes which will host pods
Expand Down Expand Up @@ -598,6 +598,11 @@ END
fi
fi

if [[ "x${ADMIN_KEY}" == "x" || "x${USER_KEY}" == "x" ]]; then
output "heketi admin and user keys are required!"
exit 1
fi

if [[ "x${CLI}" == "x" ]]; then
kubectl=$(type kubectl 2>/dev/null | awk '{print $3}')
oc=$(type oc 2>/dev/null | awk '{print $3}')
Expand Down

0 comments on commit 7246eb4

Please sign in to comment.