mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-12-03 04:06:14 +00:00
Added events publishing for topologyHints changes
This commit is contained in:
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package topologycache
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
|
||||
v1 "k8s.io/api/core/v1"
|
||||
@@ -67,6 +68,11 @@ func RemoveHintsFromSlices(si *SliceInfo) ([]*discovery.EndpointSlice, []*discov
|
||||
return si.ToCreate, si.ToUpdate
|
||||
}
|
||||
|
||||
// FormatWithAddressType foramts a given string by adding an addressType to the end of it.
|
||||
func FormatWithAddressType(s string, addressType discovery.AddressType) string {
|
||||
return fmt.Sprintf("%s, addressType: %s", s, addressType)
|
||||
}
|
||||
|
||||
// redistributeHints redistributes hints based in the provided EndpointSlices.
|
||||
// It allocates endpoints from the provided givingZones to the provided
|
||||
// receivingZones. This returns a map that represents the changes in allocated
|
||||
|
||||
Reference in New Issue
Block a user