Skip to content

Commit

Permalink
[Sync] upstream incubation to rhods- 2.5 (#139)
Browse files Browse the repository at this point in the history
* chore: removes log repetitions for conditions (#762)

* update(knative): enable GPU node tolerations for kserve (#761)

Signed-off-by: Wen Zhou <wenzhou@redhat.com>

---------

Signed-off-by: Wen Zhou <wenzhou@redhat.com>
Co-authored-by: Bartosz Majsak <bartosz.majsak@gmail.com>
(cherry picked from commit 0403062)
  • Loading branch information
zdtsw authored and VaishnaviHire committed Nov 29, 2023
1 parent d527679 commit 258fbd7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/feature/conditions.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ func EnsureCRDIsInstalled(name string) Action {

func WaitForPodsToBeReady(namespace string) Action {
return func(feature *Feature) error {
log.Info("waiting for pods to become ready", "feature", feature.Name, "namespace", namespace, "duration (s)", duration.Seconds())

return wait.PollUntilContextTimeout(context.TODO(), interval, duration, false, func(ctx context.Context) (bool, error) {
log.Info("waiting for pods to become ready", "feature", feature.Name, "namespace", namespace, "duration (s)", duration.Seconds())
podList, err := feature.Clientset.CoreV1().Pods(namespace).List(context.TODO(), metav1.ListOptions{})
if err != nil {
return false, err
Expand Down Expand Up @@ -68,9 +69,9 @@ func WaitForPodsToBeReady(namespace string) Action {

func WaitForResourceToBeCreated(namespace string, gvr schema.GroupVersionResource) Action {
return func(feature *Feature) error {
return wait.PollUntilContextTimeout(context.TODO(), interval, duration, false, func(ctx context.Context) (bool, error) {
log.Info("waiting for resource to be created", "namespace", namespace, "resource", gvr)
log.Info("waiting for resource to be created", "namespace", namespace, "resource", gvr)

return wait.PollUntilContextTimeout(context.TODO(), interval, duration, false, func(ctx context.Context) (bool, error) {
resources, err := feature.DynamicClient.Resource(gvr).Namespace(namespace).List(context.TODO(), metav1.ListOptions{Limit: 1})
if err != nil {
log.Error(err, "failed waiting for resource", "namespace", namespace, "resource", gvr)
Expand All @@ -82,7 +83,6 @@ func WaitForResourceToBeCreated(namespace string, gvr schema.GroupVersionResourc
return true, nil
}

log.Info("still waiting for resource", "namespace", namespace, "resource", gvr)
return false, nil
})
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,9 @@ spec:
istio:
enabled: true
config:
features:
kubernetes.podspec-affinity: enabled
kubernetes.podspec-nodeselector: enabled
kubernetes.podspec-tolerations: enabled
istio:
local-gateway.knative-serving.knative-local-gateway: "knative-local-gateway.{{ .ControlPlane.Namespace }}.svc.cluster.local"

0 comments on commit 258fbd7

Please sign in to comment.