Skip to content

Commit

Permalink
Merge pull request #237 from NDLANO/adapt-to-kubernetes
Browse files Browse the repository at this point in the history
adapt to kubernetes
  • Loading branch information
narhen authored Jan 31, 2019
2 parents df3682a + 84d3e55 commit f6dd75e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion run-learningpath-frontend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

APPLICATION_NAME="learningpath-frontend"

function is_kubernetes {
[ -e "/var/run/secrets/kubernetes.io" ]
}

function setup_environment {
secretsfile="/tmp/secrets"
aws s3 --region eu-central-1 cp s3://$NDLA_ENVIRONMENT.secrets.ndla/$APPLICATION_NAME.secrets $secretsfile
Expand All @@ -18,7 +22,7 @@ function setup_environment {
fi
}

if [ $NDLA_ENVIRONMENT != "local" ]; then
if [ $NDLA_ENVIRONMENT != "local" ] && [ ! is_kubernetes ]; then
setup_environment
fi

Expand Down

0 comments on commit f6dd75e

Please sign in to comment.