refactor scheudler's node resource plugins

Signed-off-by: kerthcet <kerthcet@gmail.com>
This commit is contained in:
kerthcet
2021-11-03 00:52:23 +08:00
parent 392de8012e
commit e5dd375b14
20 changed files with 1072 additions and 1466 deletions

View File

@@ -17,9 +17,15 @@ limitations under the License.
package noderesources
import (
"github.com/google/go-cmp/cmp/cmpopts"
v1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/resource"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/validation/field"
)
var (
ignoreBadValueDetail = cmpopts.IgnoreFields(field.Error{}, "BadValue", "Detail")
)
func makeNode(node string, milliCPU, memory int64) *v1.Node {