From 617a1fa3942e333c750561dafabcaa2485beb844 Mon Sep 17 00:00:00 2001 From: Kevin Klues Date: Thu, 30 May 2019 04:34:01 -0700 Subject: [PATCH] Update the TopologyManager interfaces These updates are based on discussions had about the preferred semantics of the TopologyManager and will be reflected in changes to an upcoming PR that adds the actual TopologyManager implementation. --- pkg/kubelet/cm/topologymanager/topology_manager.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pkg/kubelet/cm/topologymanager/topology_manager.go b/pkg/kubelet/cm/topologymanager/topology_manager.go index 8c1cf9fb799..fb0f8d9ae8f 100644 --- a/pkg/kubelet/cm/topologymanager/topology_manager.go +++ b/pkg/kubelet/cm/topologymanager/topology_manager.go @@ -39,7 +39,7 @@ type Manager interface { //HintProvider interface is to be implemented by Hint Providers type HintProvider interface { - GetTopologyHints(pod v1.Pod, container v1.Container) ([]TopologyHint, bool) + GetTopologyHints(pod v1.Pod, container v1.Container) []TopologyHint } //Store interface is to allow Hint Providers to retrieve pod affinity @@ -47,7 +47,10 @@ type Store interface { GetAffinity(podUID string, containerName string) TopologyHint } -// TopologyHint is a struct containing Socket Mask for a Pod +//TopologyHint is a struct containing a SocketMask for a Container type TopologyHint struct { SocketAffinity socketmask.SocketMask + // Preferred is set to true when the SocketMask encodes a preferred + // allocation for the Container. It is set to false otherwise. + Preferred bool }