mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-25 14:06:46 +00:00
Convert k8s.io/kubelet/pkg/apis/podresources from gogo to protoc
Use standard protoc for the pod resources instead of gogo. Part of kubernetes#96564 Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
This commit is contained in:
@@ -408,7 +408,7 @@ var _ = SIGDescribe("Memory Manager", "[LinuxOnly]", framework.WithDisruptive(),
|
||||
continue
|
||||
}
|
||||
|
||||
gomega.Expect(containerMemory.Size_).To(gomega.BeEquivalentTo(numaStateMemory.Size))
|
||||
gomega.Expect(containerMemory.Size).To(gomega.BeEquivalentTo(numaStateMemory.Size))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -541,7 +541,7 @@ var _ = SIGDescribe("Memory Manager", "[LinuxOnly]", framework.WithDisruptive(),
|
||||
q := c.Resources.Limits[v1.ResourceName(containerMemory.MemoryType)]
|
||||
value, ok := q.AsInt64()
|
||||
gomega.Expect(ok).To(gomega.BeTrueBecause("cannot convert value to integer"))
|
||||
gomega.Expect(value).To(gomega.BeEquivalentTo(containerMemory.Size_))
|
||||
gomega.Expect(value).To(gomega.BeEquivalentTo(containerMemory.Size))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,17 +283,17 @@ func logPodResources(podIdx int, pr *kubeletpodresourcesv1.PodResources) {
|
||||
}
|
||||
}
|
||||
|
||||
type podResMap map[string]map[string]kubeletpodresourcesv1.ContainerResources
|
||||
type podResMap map[string]map[string]*kubeletpodresourcesv1.ContainerResources
|
||||
|
||||
func convertToMap(podsResources []*kubeletpodresourcesv1.PodResources) podResMap {
|
||||
res := make(map[string]map[string]kubeletpodresourcesv1.ContainerResources)
|
||||
res := make(map[string]map[string]*kubeletpodresourcesv1.ContainerResources)
|
||||
for idx, podResource := range podsResources {
|
||||
// to make troubleshooting easier
|
||||
logPodResources(idx, podResource)
|
||||
|
||||
cnts := make(map[string]kubeletpodresourcesv1.ContainerResources)
|
||||
cnts := make(map[string]*kubeletpodresourcesv1.ContainerResources)
|
||||
for _, cnt := range podResource.GetContainers() {
|
||||
cnts[cnt.GetName()] = *cnt
|
||||
cnts[cnt.GetName()] = cnt
|
||||
}
|
||||
res[podResource.GetName()] = cnts
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user