@@ -701,25 +701,25 @@ func GetReadyNGFPodNames(
701
701
"app.kubernetes.io/instance" : releaseName ,
702
702
},
703
703
); err != nil {
704
- return nil , fmt .Errorf ("error getting list of Pods: %w" , err )
704
+ return nil , fmt .Errorf ("error getting list of NGF Pods: %w" , err )
705
705
}
706
706
707
- if len (podList .Items ) > 0 {
708
- var names []string
709
- for _ , pod := range podList .Items {
710
- for _ , cond := range pod .Status .Conditions {
711
- if cond .Type == core .PodReady && cond .Status == core .ConditionTrue {
712
- names = append (names , pod .Name )
713
- }
707
+ if len (podList .Items ) == 0 {
708
+ return nil , errors .New ("unable to find NGF Pod(s)" )
709
+ }
710
+
711
+ var names []string
712
+ for _ , pod := range podList .Items {
713
+ for _ , cond := range pod .Status .Conditions {
714
+ if cond .Type == core .PodReady && cond .Status == core .ConditionTrue {
715
+ names = append (names , pod .Name )
714
716
}
715
717
}
716
- return names , nil
717
718
}
718
-
719
- return nil , errors .New ("unable to find NGF Pod(s)" )
719
+ return names , nil
720
720
}
721
721
722
- // GetReadyNginxPodNames returns the name(s) of the Nginx Pod(s).
722
+ // GetReadyNginxPodNames returns the name(s) of the NGINX Pod(s).
723
723
func GetReadyNginxPodNames (
724
724
k8sClient client.Client ,
725
725
namespace string ,
@@ -735,22 +735,23 @@ func GetReadyNginxPodNames(
735
735
client .InNamespace (namespace ),
736
736
client.HasLabels {"gateway.networking.k8s.io/gateway-name" },
737
737
); err != nil {
738
- return nil , fmt .Errorf ("error getting list of Nginx Pods: %w" , err )
738
+ return nil , fmt .Errorf ("error getting list of NGINX Pods: %w" , err )
739
739
}
740
740
741
- if len (podList .Items ) > 0 {
742
- var names []string
743
- for _ , pod := range podList .Items {
744
- for _ , cond := range pod .Status .Conditions {
745
- if cond .Type == core .PodReady && cond .Status == core .ConditionTrue {
746
- names = append (names , pod .Name )
747
- }
741
+ if len (podList .Items ) == 0 {
742
+ return nil , errors .New ("unable to find NGINX Pod(s)" )
743
+ }
744
+
745
+ var names []string
746
+ for _ , pod := range podList .Items {
747
+ for _ , cond := range pod .Status .Conditions {
748
+ if cond .Type == core .PodReady && cond .Status == core .ConditionTrue {
749
+ names = append (names , pod .Name )
748
750
}
749
751
}
750
- return names , nil
751
752
}
752
753
753
- return nil , errors . New ( "unable to find NGF Pod(s)" )
754
+ return names , nil
754
755
}
755
756
756
757
func countNumberOfReadyParents (parents []v1.RouteParentStatus ) int {
0 commit comments