Эх сурвалжийг харах

Update minio/plex migrations to use stdout/stdin

Waqar Ahmed 4 жил өмнө
parent
commit
7db9059e25

+ 12 - 0
test/minio/1.0.1/migrations/migrate.py → test/minio/1.0.1/migrations/migrate

@@ -1,3 +1,8 @@
+#!/usr/bin/python3
+import json
+import sys
+
+
 def migrate(values):
     values.update({
         'appVolumeMounts': {
@@ -8,3 +13,10 @@ def migrate(values):
         },
     })
     return values
+
+
+if __name__ == '__main__':
+    if len(sys.argv) != 2:
+        exit(1)
+
+    print(json.dumps(migrate(json.loads(sys.argv[1]))))

+ 12 - 0
test/plex/1.0.1/migrations/migrate.py → test/plex/1.0.1/migrations/migrate

@@ -1,3 +1,8 @@
+#!/usr/bin/python3
+import json
+import sys
+
+
 def migrate(values):
     values.update({
         'appVolumeMounts': {
@@ -17,3 +22,10 @@ def migrate(values):
         'updateStrategy': values.get('strategyType', 'Recreate'),
     })
     return values
+
+
+if __name__ == '__main__':
+    if len(sys.argv) != 2:
+        exit(1)
+
+    print(json.dumps(migrate(json.loads(sys.argv[1]))))