Skip to content

Commit 9e27fc2

Browse files
authored
Merge pull request #110 from fydai/updated_kubernetes_deploy
Don't fail when secrets missing
2 parents ba71e2e + 0b27e2e commit 9e27fc2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

staff/sys/ocf-kubernetes-deploy

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,11 @@ def main():
8585
else:
8686
filename = os.path.join(args.secrets, args.appname + '.yaml')
8787

88-
with open(filename, 'r') as stream:
89-
bindings.update(yaml.safe_load(stream))
88+
try:
89+
with open(filename, 'r') as stream:
90+
bindings.update(yaml.safe_load(stream))
91+
except FileNotFoundError:
92+
print('Secrets file not found')
9093

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

0 commit comments

Comments
 (0)