forked from LaconicNetwork/kompose
Merge will include deploy resources (#1214)
This commit is contained in:
parent
a3a82f55fe
commit
d2d0d61cf2
@ -555,6 +555,14 @@ func mergeComposeObject(oldCompose *types.Config, newCompose *types.Config) (*ty
|
||||
if service.Deploy.Mode != "" {
|
||||
tmpOldService.Deploy = service.Deploy
|
||||
}
|
||||
if service.Deploy.Resources.Limits != nil {
|
||||
tmpOldService.Deploy.Resources.Limits = service.Deploy.Resources.Limits
|
||||
}
|
||||
|
||||
if service.Deploy.Resources.Reservations != nil {
|
||||
tmpOldService.Deploy.Resources.Reservations = service.Deploy.Resources.Reservations
|
||||
}
|
||||
|
||||
if len(service.Devices) != 0 {
|
||||
tmpOldService.Devices = service.Devices
|
||||
}
|
||||
|
||||
@ -2,6 +2,12 @@ version: '3'
|
||||
|
||||
services:
|
||||
web:
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: "1" # as opposed to 0.1 (default)
|
||||
reservations:
|
||||
cpus: "1"
|
||||
environment:
|
||||
- ERRORS=1
|
||||
- HIDE_NGINX_HEADERS=0
|
||||
|
||||
@ -68,7 +68,14 @@
|
||||
"image": "richarvey/nginx-php-fpm",
|
||||
"imagePullPolicy": "",
|
||||
"name": "web",
|
||||
"resources": {}
|
||||
"resources": {
|
||||
"limits": {
|
||||
"cpu": "1"
|
||||
},
|
||||
"requests": {
|
||||
"cpu": "1"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"restartPolicy": "Always",
|
||||
|
||||
Loading…
Reference in New Issue
Block a user