func ClusterLevelLoggingWithKibana(f *framework.Framework) {
	const pollingInterval = 10 * time.Second
	const pollingTimeout = 20 * time.Minute

	// Check for the existence of the Kibana service.
	ginkgo.By("Checking the Kibana service exists.")
	s := f.ClientSet.CoreV1().Services(metav1.NamespaceSystem)
	// Make a few attempts to connect. This makes the test robust against
	// being run as the first e2e test just after the e2e cluster has been created.
	err := wait.Poll(pollingInterval, pollingTimeout, func() (bool, error) {
		if _, err := s.Get(context.TODO(), "kibana-logging", metav1.GetOptions{}); err != nil {
			framework.Logf("Kibana is unreachable: %v", err)
			return false, nil
		}
		return true, nil
	})
	framework.ExpectNoError(err)

	// Wait for the Kibana pod(s) to enter the running state.
	ginkgo.By("Checking to make sure the Kibana pods are running")
	label := labels.SelectorFromSet(labels.Set(map[string]string{kibanaKey: kibanaValue}))
	options := metav1.ListOptions{LabelSelector: label.String()}
	pods, err := f.ClientSet.CoreV1().Pods(metav1.NamespaceSystem).List(context.TODO(), options)
	framework.ExpectNoError(err)
	for _, pod := range pods.Items {
		err = e2epod.WaitForPodRunningInNamespace(f.ClientSet, &pod)
		framework.ExpectNoError(err)
	}

	ginkgo.By("Checking to make sure we get a response from the Kibana UI.")
	err = wait.Poll(pollingInterval, pollingTimeout, func() (bool, error) {
		req, err := e2eservice.GetServicesProxyRequest(f.ClientSet, f.ClientSet.CoreV1().RESTClient().Get())
		if err != nil {
			framework.Logf("Failed to get services proxy request: %v", err)
			return false, nil
		}

		ctx, cancel := context.WithTimeout(context.Background(), framework.SingleCallTimeout)
		defer cancel()

		_, err = req.Namespace(metav1.NamespaceSystem).
			Name("kibana-logging").
			DoRaw(ctx)
		if err != nil {
			framework.Logf("Proxy call to kibana-logging failed: %v", err)
			return false, nil
		}
		return true, nil
	})
	framework.ExpectNoError(err)
}
// ClusterLevelLoggingWithKibana is an end to end test that checks to see if Kibana is alive.
ClusterLevelLoggingWithKibana is an end to end test that checks to see if Kibana is alive.
// ClusterLevelLoggingWithKibana is an end to end test that checks to see if Kibana is alive .
func ClusterLevelLoggingWithKibana(f *framework.Framework) {
	const pollingInterval = 10 * time.Second
	const pollingTimeout = 20 * time.Minute
	ginkgo.By("Checking the Kibana service exists.")
	s := f.ClientSet.CoreV1().Services(metav1.NamespaceSystem)
	err := wait.Poll(pollingInterval, pollingTimeout, func() (bool, error) {
		if _, err := s.Get(context.TODO(), "kibana-logging", metav1.GetOptions{}); err != nil {
			framework.Logf("Kibana is unreachable: %v", err)
			return false, nil
		}
		return true, nil
	})
	framework.ExpectNoError(err)
	ginkgo.By("Checking to make sure the Kibana pods are running")
	label := labels.SelectorFromSet(labels.Set(map[string]string{kibanaKey: kibanaValue}))
	options := metav1.ListOptions{LabelSelector: label.String()}
	pods, err := f.ClientSet.CoreV1().Pods(metav1.NamespaceSystem).List(context.TODO(), options)
	framework.ExpectNoError(err)
	for _, pod := range pods.Items {
		err = e2epod.WaitForPodRunningInNamespace(f.ClientSet, &pod)
		framework.ExpectNoError(err)
	}
	ginkgo.By("Checking to make sure we get a response from the Kibana UI.")
	err = wait.Poll(pollingInterval, pollingTimeout, func() (bool, error) {
		req, err := e2eservice.GetServicesProxyRequest(f.ClientSet, f.ClientSet.CoreV1().RESTClient().Get())
		if err != nil {
			framework.Logf("Failed to get services proxy request: %v", err)
			return false, nil
		}
		ctx, cancel := context.WithTimeout(context.Background(), framework.SingleCallTimeout)
		defer cancel()
		_, err = req.Namespace(metav1.NamespaceSystem).
			Name("kibana-logging").
			DoRaw(ctx)
		if err != nil {
			framework.Logf("Proxy call to kibana-logging failed: %v", err)
			return false, nil
		}
		return true, nil
	})
	framework.ExpectNoError(err)
}
func ClusterLevelLoggingWithKibana ( f * framework . Framework ) { const pollingInterval = 10 * time . Second const pollingTimeout = 20 * time . Minute ginkgo . By ( " " ) s := f . ClientSet . CoreV1 ( ) . Services ( metav1 . NamespaceSystem ) err := wait . Poll ( pollingInterval , pollingTimeout , func ( ) ( bool , error ) { if _ , err := s . Get ( context . TODO ( ) , " " , metav1 . GetOptions { } ) ; err != nil { framework . Logf ( " " , err ) return false , nil } return true , nil } ) framework . ExpectNoError ( err ) ginkgo . By ( " " ) label := labels . SelectorFromSet ( labels . Set ( map [ string ] string { kibanaKey : kibanaValue } ) ) options := metav1 . ListOptions { LabelSelector : label . String ( ) } pods , err := f . ClientSet . CoreV1 ( ) . Pods ( metav1 . NamespaceSystem ) . List ( context . TODO ( ) , options ) framework . ExpectNoError ( err ) for _ , pod := range pods . Items { err = e2epod . WaitForPodRunningInNamespace ( f . ClientSet , & pod ) framework . ExpectNoError ( err ) } ginkgo . By ( " " ) err = wait . Poll ( pollingInterval , pollingTimeout , func ( ) ( bool , error ) { req , err := e2eservice . GetServicesProxyRequest ( f . ClientSet , f . ClientSet . CoreV1 ( ) . RESTClient ( ) . Get ( ) ) if err != nil { framework . Logf ( " " , err ) return false , nil } ctx , cancel := context . WithTimeout ( context . Background ( ) , framework . SingleCallTimeout ) defer cancel ( ) _ , err = req . Namespace ( metav1 . NamespaceSystem ) . Name ( " " ) . DoRaw ( ctx ) if err != nil { framework . Logf ( " " , err ) return false , nil } return true , nil } ) framework . ExpectNoError ( err ) }
ClusterLevelLoggingWithKibana is an end to end test that checks to see if Kibana is alive.
ClusterLevelLoggingWithKibana is an end to end test that checks to see if Kibana is alive .
// Check for the existence of the Kibana service. // Make a few attempts to connect. This makes the test robust against // being run as the first e2e test just after the e2e cluster has been created. // Wait for the Kibana pod(s) to enter the running state.