Created
February 21, 2018 15:42
-
-
Save cmattoon/62e3c1ec985eb1dc14d86527043f90fd to your computer and use it in GitHub Desktop.
Configure Fission Router
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# fission.io router config for CoreOS | |
# v0.1.0 | |
# | |
# Usage: | |
# source fission_router_config.sh | |
# Or: | |
# eval $(./fission_router_config.sh) | |
ports=$(kubectl -n fission get svc | grep -e 'controller\|router' | cut -d: -f 2 | cut -d/ -f 1 | xargs echo) | |
export FISSION_URL=http://$COREOS_PRIVATE_IPV4:$(echo $ports | cut -d' ' -f1) | |
export FISSION_ROUTER=$COREOS_PRIVATE_IPV4:$(echo $ports | cut -d' ' -f2) | |
# If this was exec'd, echo the statements for `eval` | |
if [ "${0}" != "-bash" ]; then | |
echo "export FISSION_URL=$FISSION_URL" | |
echo "export FISSION_ROUTER=$FISSION_ROUTER" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment