Avoid allocations in ByIndex() function
This commit is contained in:
@@ -827,7 +827,7 @@ func (config *RCConfig) start() error {
|
||||
if oldRunning != config.Replicas {
|
||||
// List only pods from a given replication controller.
|
||||
options := metav1.ListOptions{LabelSelector: label.String()}
|
||||
if pods, err := config.Client.CoreV1().Pods(metav1.NamespaceAll).List(options); err == nil {
|
||||
if pods, err := config.Client.CoreV1().Pods(config.Namespace).List(options); err == nil {
|
||||
for _, pod := range pods.Items {
|
||||
config.RCConfigLog("Pod %s\t%s\t%s\t%s", pod.Name, pod.Spec.NodeName, pod.Status.Phase, pod.DeletionTimestamp)
|
||||
}
|
||||
|
Reference in New Issue
Block a user