Minor updates on webservice/autoscale docs/comments

based on the comments https://github.com/oam-dev/kubevela/pull/566#discussion_r522385511
and https://github.com/oam-dev/kubevela/issues/585#issuecomment-726253432,
update docs and comments on webservice and autoscale
This commit is contained in:
zzxwill
2020-11-17 13:10:49 +08:00
parent 550d708637
commit f22c8995f4
6 changed files with 6 additions and 4 deletions
@@ -38,6 +38,7 @@ spec:
condition: {
type: "Utilization"
if parameter["cpuPercent"] != _|_ {
// Temporarily use `strconv` for type converting. This bug will be fixed in kubevela#585
value: strconv.FormatInt(parameter.cpuPercent, 10)
}
}
@@ -82,7 +82,7 @@ spec:
}
}
}]
// +usage=Number of CPU units for the service, like `500m` (0.5 CPU core), `1` (1 CPU core)
// +usage=Number of CPU units for the service, like `0.5` (0.5 CPU core), `1` (1 CPU core)
cpu?: string
}
@@ -38,7 +38,7 @@ Name | Type | Description | Notes
**Env** | [**[]WebserviceEnv**](#webserviceenv) | | [optional]
**Image** | **string** | Which image would you like to use for your service |
**Port** | **int32** | Which port do you want customer traffic sent to | [default to 80]
**cpu** | **string** | Number of CPU units for the service, like `500m` (0.5 CPU core), `1` (1 CPU core) | [optional]
**cpu** | **string** | Number of CPU units for the service, like `0.5` (0.5 CPU core), `1` (1 CPU core) | [optional]
### WebserviceEnv
+1 -1
View File
@@ -286,7 +286,7 @@ var (
a: "8080",
},
{
q: "Number of CPU units for the service, like `500m` (0.5 CPU core), `1` (1 CPU core) (optional):",
q: "Number of CPU units for the service, like `0.5` (0.5 CPU core), `1` (1 CPU core) (optional):",
a: "0.5",
},
}
+1
View File
@@ -23,6 +23,7 @@ cpuScaler: {
condition: {
type: "Utilization"
if parameter["cpuPercent"] != _|_ {
// Temporarily use `strconv` for type converting. This bug will be fixed in kubevela#585
value: strconv.FormatInt(parameter.cpuPercent, 10)
}
}
+1 -1
View File
@@ -71,6 +71,6 @@ parameter: {
}
}
}]
// +usage=Number of CPU units for the service, like `500m` (0.5 CPU core), `1` (1 CPU core)
// +usage=Number of CPU units for the service, like `0.5` (0.5 CPU core), `1` (1 CPU core)
cpu?: string
}