mirror of https://github.com/k3s-io/k3s
correct the annotations in container_manager.go
parent
6b03a43b76
commit
7a43f736c4
|
@ -122,11 +122,7 @@ type Status struct {
|
||||||
SoftRequirements error
|
SoftRequirements error
|
||||||
}
|
}
|
||||||
|
|
||||||
// containerManager for the kubelet is currently an injected dependency.
|
// parsePercentage parses the percentage string to numeric value.
|
||||||
// We need to parse the --qos-reserve-requests option in
|
|
||||||
// cmd/kubelet/app/server.go and there isn't really a good place to put
|
|
||||||
// the code. If/When the kubelet dependency injection gets worked out,
|
|
||||||
// maybe there will be a better place for it.
|
|
||||||
func parsePercentage(v string) (int64, error) {
|
func parsePercentage(v string) (int64, error) {
|
||||||
if !strings.HasSuffix(v, "%") {
|
if !strings.HasSuffix(v, "%") {
|
||||||
return 0, fmt.Errorf("percentage expected, got '%s'", v)
|
return 0, fmt.Errorf("percentage expected, got '%s'", v)
|
||||||
|
|
Loading…
Reference in New Issue