Explorar o código

Add a warning for unsupported secret fields.

Signed-off-by: Daniel Nephin <[email protected]>
Daniel Nephin %!s(int64=8) %!d(string=hai) anos
pai
achega
0d609b68ac
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      compose/project.py

+ 6 - 0
compose/project.py

@@ -575,6 +575,12 @@ def get_secrets(service, service_secrets, secret_defs):
                      "docker-compose.".format(service=service, secret=secret.source))
             continue
 
+        if secret.uid or secret.gid or secret.mode:
+            log.warn("Service \"{service}\" uses secret \"{secret}\" with uid, "
+                     "gid, or mode. These fields are not supported by this "
+                     "implementation of the Compose file".format(
+                        service=service, secret=secret.source))
+
         secrets.append({'secret': secret, 'file': secret_def.get('file')})
 
     return secrets