diff --git a/pkg/feature/conditions.go b/pkg/feature/conditions.go index 13877676129..787787d1603 100644 --- a/pkg/feature/conditions.go +++ b/pkg/feature/conditions.go @@ -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 @@ -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) @@ -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 }) } diff --git a/pkg/feature/templates/serverless/serving-install/knative-serving.tmpl b/pkg/feature/templates/serverless/serving-install/knative-serving.tmpl index 8dfc5b7fe68..ae4c947b398 100644 --- a/pkg/feature/templates/serverless/serving-install/knative-serving.tmpl +++ b/pkg/feature/templates/serverless/serving-install/knative-serving.tmpl @@ -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"