Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions charts/hami/crds/gpu.bytetrade.io_gpubindings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ spec:
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
namespace:
type: string
owner:
type: string
podSelector:
description: |-
A label selector is a label query over a set of resources. The result of matchLabels and
Expand Down
9 changes: 1 addition & 8 deletions cmd/scheduler/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func init() {
rootCmd.Flags().IntVar(&config.Timeout, "kube-timeout", client.DefaultTimeout, "Timeout to use while talking with kube-apiserver.")
rootCmd.Flags().BoolVar(&enableProfiling, "profiling", false, "Enable pprof profiling via HTTP server")
rootCmd.Flags().DurationVar(&config.NodeLockTimeout, "node-lock-timeout", time.Minute*5, "timeout for node locks")
rootCmd.Flags().DurationVar(&config.CleanupStartupDelay, "cleanup-startup-delay", 90*time.Second, "delay before starting cleanup loops (CleanupGPUBindingsLoop/CleanupPodsWithMissingDevicesLoop)")
rootCmd.Flags().DurationVar(&config.CleanupStartupDelay, "cleanup-startup-delay", 90*time.Second, "delay before starting cleanup loops (CleanupPodsWithMissingDevicesLoop)")
rootCmd.Flags().BoolVar(&config.ForceOverwriteDefaultScheduler, "force-overwrite-default-scheduler", true, "Overwrite schedulerName in Pod Spec when set to the const DefaultSchedulerName in https://k8s.io/api/core/v1 package")

rootCmd.PersistentFlags().AddGoFlagSet(device.GlobalFlagSet())
Expand Down Expand Up @@ -121,7 +121,6 @@ func start() error {

// start monitor metrics
go sher.RegisterFromNodeAnnotations()
go sher.CleanupGPUBindingsLoop()
go sher.CleanupPodsWithMissingDevicesLoop()
go initMetrics(config.MetricsBindAddress)

Expand All @@ -132,12 +131,6 @@ func start() error {
router.POST("/webhook", routes.WebHookRoute())
router.GET("/healthz", routes.HealthzRoute())

router.GET("/gpus", routes.ListGPUDetails(sher))
router.PUT("/gpus/assignments/bulk", routes.BulkManageAssignments(sher))
router.POST("/gpus/:id/mode", routes.SwitchGPUMode(sher))
router.POST("/gpus/:id/assign", routes.AssignGPUToApp(sher))
router.POST("/gpus/:id/unassign", routes.UnassignGPUFromApp(sher))

klog.Info("listen on ", config.HTTPBind)

if enableProfiling {
Expand Down
2 changes: 2 additions & 0 deletions pkg/api/gpu/v1alpha1/gpubinding_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import (
type GPUBindingSpec struct {
UUID string `json:"uuid"`
AppName string `json:"appName"`
Owner string `json:"owner,omitempty"`
Namespace string `json:"namespace,omitempty"`
PodSelector *metav1.LabelSelector `json:"podSelector,omitempty"`
Memory *resource.Quantity `json:"memory,omitempty"`
}
Expand Down
Loading
Loading