Skip to content

Commit

Permalink
Merge pull request #110 from fydai/updated_kubernetes_deploy
Browse files Browse the repository at this point in the history
Don't fail when secrets missing
  • Loading branch information
fydai authored Jun 1, 2019
2 parents ba71e2e + 0b27e2e commit 9e27fc2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions staff/sys/ocf-kubernetes-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,11 @@ def main():
else:
filename = os.path.join(args.secrets, args.appname + '.yaml')

with open(filename, 'r') as stream:
bindings.update(yaml.safe_load(stream))
try:
with open(filename, 'r') as stream:
bindings.update(yaml.safe_load(stream))
except FileNotFoundError:
print('Secrets file not found')

# Created with 600 perms
with tempfile.NamedTemporaryFile(suffix='.json') as bindings_file:
Expand Down

0 comments on commit 9e27fc2

Please sign in to comment.