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
|
return task
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -94,8 +94,9 @@ func createFileBasedConfigMaps(stackName string, globalConfigs map[string]compos
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
configMap := toConfigMap(stackName, name, fileName, content)
|
if _, err := configMaps.Create(toConfigMap(stackName, name, fileName, content)); err != nil {
|
||||||
configMaps.Create(configMap)
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
@ -124,8 +125,9 @@ func createFileBasedSecrets(stackName string, globalSecrets map[string]composeTy
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
secret := toSecret(stackName, name, fileName, content)
|
if _, err := secrets.Create(toSecret(stackName, name, fileName, content)); err != nil {
|
||||||
secrets.Create(secret)
|
return err
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue