forked from LaconicNetwork/kompose
Merge pull request #543 from surajnarwade/minor_fix
Moved cpu_shares and cpuset to unsupported keys
This commit is contained in:
commit
533df01ad5
@ -54,6 +54,8 @@ func checkUnsupportedKey(composeProject *project.Project) []string {
|
|||||||
"CapAdd": false,
|
"CapAdd": false,
|
||||||
"CapDrop": false,
|
"CapDrop": false,
|
||||||
"CgroupParent": false,
|
"CgroupParent": false,
|
||||||
|
"CPUSet": false,
|
||||||
|
"CPUShares": false,
|
||||||
"Devices": false,
|
"Devices": false,
|
||||||
"DependsOn": false,
|
"DependsOn": false,
|
||||||
"DNS": false,
|
"DNS": false,
|
||||||
@ -359,9 +361,6 @@ func (c *Compose) LoadFile(files []string) (kobject.KomposeObject, error) {
|
|||||||
|
|
||||||
// convert compose labels to annotations
|
// convert compose labels to annotations
|
||||||
serviceConfig.Annotations = map[string]string(composeServiceConfig.Labels)
|
serviceConfig.Annotations = map[string]string(composeServiceConfig.Labels)
|
||||||
|
|
||||||
serviceConfig.CPUSet = composeServiceConfig.CPUSet
|
|
||||||
serviceConfig.CPUShares = int64(composeServiceConfig.CPUShares)
|
|
||||||
serviceConfig.CPUQuota = int64(composeServiceConfig.CPUQuota)
|
serviceConfig.CPUQuota = int64(composeServiceConfig.CPUQuota)
|
||||||
serviceConfig.CapAdd = composeServiceConfig.CapAdd
|
serviceConfig.CapAdd = composeServiceConfig.CapAdd
|
||||||
serviceConfig.CapDrop = composeServiceConfig.CapDrop
|
serviceConfig.CapDrop = composeServiceConfig.CapDrop
|
||||||
|
|||||||
@ -49,8 +49,6 @@ func TestCreateService(t *testing.T) {
|
|||||||
Network: []string{"network1", "network2"}, // not supported
|
Network: []string{"network1", "network2"}, // not supported
|
||||||
Labels: nil,
|
Labels: nil,
|
||||||
Annotations: map[string]string{"abc": "def"},
|
Annotations: map[string]string{"abc": "def"},
|
||||||
CPUSet: "cpu_set", // not supported
|
|
||||||
CPUShares: 1, // not supported
|
|
||||||
CPUQuota: 1, // not supported
|
CPUQuota: 1, // not supported
|
||||||
CapAdd: []string{"cap_add"}, // not supported
|
CapAdd: []string{"cap_add"}, // not supported
|
||||||
CapDrop: []string{"cap_drop"}, // not supported
|
CapDrop: []string{"cap_drop"}, // not supported
|
||||||
@ -95,8 +93,6 @@ func TestCreateServiceWithMemLimit(t *testing.T) {
|
|||||||
Network: []string{"network1", "network2"}, // not supported
|
Network: []string{"network1", "network2"}, // not supported
|
||||||
Labels: nil,
|
Labels: nil,
|
||||||
Annotations: map[string]string{"abc": "def"},
|
Annotations: map[string]string{"abc": "def"},
|
||||||
CPUSet: "cpu_set", // not supported
|
|
||||||
CPUShares: 1, // not supported
|
|
||||||
CPUQuota: 1, // not supported
|
CPUQuota: 1, // not supported
|
||||||
CapAdd: []string{"cap_add"}, // not supported
|
CapAdd: []string{"cap_add"}, // not supported
|
||||||
CapDrop: []string{"cap_drop"}, // not supported
|
CapDrop: []string{"cap_drop"}, // not supported
|
||||||
@ -146,8 +142,6 @@ func TestCreateServiceWithServiceUser(t *testing.T) {
|
|||||||
Network: []string{"network1", "network2"}, // not supported
|
Network: []string{"network1", "network2"}, // not supported
|
||||||
Labels: nil,
|
Labels: nil,
|
||||||
Annotations: map[string]string{"kompose.service.type": "nodeport"},
|
Annotations: map[string]string{"kompose.service.type": "nodeport"},
|
||||||
CPUSet: "cpu_set", // not supported
|
|
||||||
CPUShares: 1, // not supported
|
|
||||||
CPUQuota: 1, // not supported
|
CPUQuota: 1, // not supported
|
||||||
CapAdd: []string{"cap_add"}, // not supported
|
CapAdd: []string{"cap_add"}, // not supported
|
||||||
CapDrop: []string{"cap_drop"}, // not supported
|
CapDrop: []string{"cap_drop"}, // not supported
|
||||||
|
|||||||
@ -45,8 +45,6 @@ func newServiceConfig() kobject.ServiceConfig {
|
|||||||
Network: []string{"network1", "network2"}, // not supported
|
Network: []string{"network1", "network2"}, // not supported
|
||||||
Labels: nil,
|
Labels: nil,
|
||||||
Annotations: map[string]string{"abc": "def"},
|
Annotations: map[string]string{"abc": "def"},
|
||||||
CPUSet: "cpu_set", // not supported
|
|
||||||
CPUShares: 1, // not supported
|
|
||||||
CPUQuota: 1, // not supported
|
CPUQuota: 1, // not supported
|
||||||
CapAdd: []string{"cap_add"}, // not supported
|
CapAdd: []string{"cap_add"}, // not supported
|
||||||
CapDrop: []string{"cap_drop"}, // not supported
|
CapDrop: []string{"cap_drop"}, // not supported
|
||||||
|
|||||||
@ -45,8 +45,6 @@ func newServiceConfig() kobject.ServiceConfig {
|
|||||||
Network: []string{"network1", "network2"}, // not supported
|
Network: []string{"network1", "network2"}, // not supported
|
||||||
Labels: nil,
|
Labels: nil,
|
||||||
Annotations: map[string]string{"abc": "def"},
|
Annotations: map[string]string{"abc": "def"},
|
||||||
CPUSet: "cpu_set", // not supported
|
|
||||||
CPUShares: 1, // not supported
|
|
||||||
CPUQuota: 1, // not supported
|
CPUQuota: 1, // not supported
|
||||||
CapAdd: []string{"cap_add"}, // not supported
|
CapAdd: []string{"cap_add"}, // not supported
|
||||||
CapDrop: []string{"cap_drop"}, // not supported
|
CapDrop: []string{"cap_drop"}, // not supported
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user