mirror of https://github.com/docker/cli.git
Check and return error while creating kubernetes secret and config maps.
Signed-off-by: Silvin Lubecki <silvin.lubecki@docker.com>
This commit is contained in:
parent
f1b116179f
commit
18c44e0829
|
@ -37,7 +37,6 @@ func podToTask(pod apiv1.Pod) swarm.Task {
|
|||
},
|
||||
}
|
||||
|
||||
pod.GetLabels()
|
||||
return task
|
||||
}
|
||||
|
||||
|
|
|
@ -94,8 +94,9 @@ func createFileBasedConfigMaps(stackName string, globalConfigs map[string]compos
|
|||
return err
|
||||
}
|
||||
|
||||
configMap := toConfigMap(stackName, name, fileName, content)
|
||||
configMaps.Create(configMap)
|
||||
if _, err := configMaps.Create(toConfigMap(stackName, name, fileName, content)); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
@ -124,8 +125,9 @@ func createFileBasedSecrets(stackName string, globalSecrets map[string]composeTy
|
|||
return err
|
||||
}
|
||||
|
||||
secret := toSecret(stackName, name, fileName, content)
|
||||
secrets.Create(secret)
|
||||
if _, err := secrets.Create(toSecret(stackName, name, fileName, content)); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
Loading…
Reference in New Issue