forked from LaconicNetwork/kompose
Support compose global deploy mode to daemonset
This commit is contained in:
1 parent
1a2928eb47
commit
84b419c7ef
7 files changed
+167
-11
No files matched your search
@@ -626,8 +626,14 @@ func (k *Kubernetes) CreateKubernetesObjects(name string, service kobject.Servic
|
||||
|
||||
// Check to see if Docker Compose v3 Deploy.Mode has been set to "global"
|
||||
if service.DeployMode == "global" {
|
||||
log.Warning("Global mode not yet supported, containers will only be replicated once throughout the cluster. DaemonSet support will be added in the future.")
|
||||
replica = 1
|
||||
//default use daemonset
|
||||
if opt.Controller == "" {
|
||||
opt.CreateD = false
|
||||
opt.CreateDS = true
|
||||
} else if opt.Controller != "daemonset" {
|
||||
log.Warnf("Global deploy mode service is best converted to daemonset, now it convert to %s", opt.Controller)
|
||||
}
|
||||
|
||||
}
|
||||
if opt.CreateD || opt.Controller == "deployment" {
|
||||
objects = append(objects, k.InitD(name, service, replica))
|
||||
|
||||
Reference in new issue
Block a user