diff --git a/pkg/kubelet/cm/topologymanager/policy.go b/pkg/kubelet/cm/topologymanager/policy.go index 5b9208c7072..ac5bfa443e7 100644 --- a/pkg/kubelet/cm/topologymanager/policy.go +++ b/pkg/kubelet/cm/topologymanager/policy.go @@ -25,5 +25,5 @@ type Policy interface { //Returns Policy Name Name() string //Returns Pod Admit Handler Response based on hints and policy type - CanAdmitPodResult(result TopologyHints) lifecycle.PodAdmitResult + CanAdmitPodResult(admit bool) lifecycle.PodAdmitResult } diff --git a/pkg/kubelet/cm/topologymanager/topology_manager.go b/pkg/kubelet/cm/topologymanager/topology_manager.go index b79254b07f9..8c1cf9fb799 100644 --- a/pkg/kubelet/cm/topologymanager/topology_manager.go +++ b/pkg/kubelet/cm/topologymanager/topology_manager.go @@ -30,26 +30,24 @@ type Manager interface { //wants to be consoluted when making topology hints AddHintProvider(HintProvider) //Adds pod to Manager for tracking - AddPod(pod *v1.Pod, containerID string) error + AddContainer(pod *v1.Pod, containerID string) error //Removes pod from Manager tracking - RemovePod(containerID string) error + RemoveContainer(containerID string) error //Interface for storing pod topology hints Store } //HintProvider interface is to be implemented by Hint Providers type HintProvider interface { - GetTopologyHints(pod v1.Pod, container v1.Container) TopologyHints + GetTopologyHints(pod v1.Pod, container v1.Container) ([]TopologyHint, bool) } //Store interface is to allow Hint Providers to retrieve pod affinity type Store interface { - GetAffinity(podUID string, containerName string) TopologyHints + GetAffinity(podUID string, containerName string) TopologyHint } -//TopologyHints is a struct containing Sokcet Affinity for a Pod -//and whether Affinity is true or false -type TopologyHints struct { - SocketAffinity []socketmask.SocketMask - Affinity bool +// TopologyHint is a struct containing Socket Mask for a Pod +type TopologyHint struct { + SocketAffinity socketmask.SocketMask }