From 43e1f482bbbb1f0f58316dcc80ddd7296cf4fb32 Mon Sep 17 00:00:00 2001 From: Jacek Ewertowski Date: Mon, 4 Mar 2024 12:04:38 +0100 Subject: [PATCH] OSSM-5999: Remove Kiali fields, which are reconciled by Istio Operator (#666) Signed-off-by: Jacek Ewertowski --- .../openshift_monitoring_test.go | 22 ++++++++++++++++--- .../kiali-user-workload-monitoring.tmpl.yaml | 7 ------ 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/pkg/tests/tasks/observability/openshift_monitoring_test.go b/pkg/tests/tasks/observability/openshift_monitoring_test.go index 1cdcb44a..2c238ebd 100644 --- a/pkg/tests/tasks/observability/openshift_monitoring_test.go +++ b/pkg/tests/tasks/observability/openshift_monitoring_test.go @@ -143,9 +143,25 @@ func waitKialiAndVerifyIsReconciled(t test.TestHelper) { t.LogStep("Verify that Kiali was reconciled by Istio Operator") retry.UntilSuccess(t, func(t test.TestHelper) { - output := shell.Executef(t, "oc get kiali %s -n %s -o jsonpath='{.spec.deployment.accessible_namespaces}'", kialiName, meshNamespace) - if output != fmt.Sprintf(`["%s"]`, ns.Foo) { - t.Errorf(`unexpected accessible namespaces: got '%s', expected: '["%s"]'`, output, ns.Foo) + accessibleNamespaces := shell.Executef(t, "oc get kiali %s -n %s -o jsonpath='{.spec.deployment.accessible_namespaces}'", kialiName, meshNamespace) + if accessibleNamespaces != fmt.Sprintf(`["%s"]`, ns.Foo) { + t.Errorf(`unexpected accessible namespaces: got '%s', expected: '["%s"]'`, accessibleNamespaces, ns.Foo) + } + configMapName := shell.Executef(t, "oc get kiali %s -n %s -o jsonpath='{.spec.external_services.istio.config_map_name}'", kialiName, meshNamespace) + if configMapName != fmt.Sprintf("istio-%s", smcpName) { + t.Errorf("unexpected istio config map name: got '%s', expected: 'istio-%s'", configMapName, smcpName) + } + sidecarInjectorConfigMapName := shell.Executef(t, "oc get kiali %s -n %s -o jsonpath='{.spec.external_services.istio.istio_sidecar_injector_config_map_name:}'", kialiName, meshNamespace) + if sidecarInjectorConfigMapName != fmt.Sprintf("istio-sidecar-injector-%s", smcpName) { + t.Errorf("unexpected sidecar injecto config map name: got '%s', expected: 'istio-sidecar-injector-%s'", sidecarInjectorConfigMapName, smcpName) + } + deploymentName := shell.Executef(t, "oc get kiali %s -n %s -o jsonpath='{.spec.external_services.istio.istiod_deployment_name}'", kialiName, meshNamespace) + if deploymentName != fmt.Sprintf("istiod-%s", smcpName) { + t.Errorf("unexpected istiod deployment name: got '%s', expected: 'istiod-%s'", deploymentName, smcpName) + } + urlServiceVersion := shell.Executef(t, "oc get kiali %s -n %s -o jsonpath='{.spec.external_services.istio.url_service_version}'", kialiName, meshNamespace) + if urlServiceVersion != fmt.Sprintf("http://istiod-%s.%s:15014/version", smcpName, meshNamespace) { + t.Errorf("unexpected URL service version: got '%s', expected: 'http://istiod-%s.%s:15014/version'", urlServiceVersion, smcpName, meshNamespace) } }) } diff --git a/pkg/tests/tasks/observability/yaml/kiali-user-workload-monitoring.tmpl.yaml b/pkg/tests/tasks/observability/yaml/kiali-user-workload-monitoring.tmpl.yaml index 5bab2bbb..5fa92178 100644 --- a/pkg/tests/tasks/observability/yaml/kiali-user-workload-monitoring.tmpl.yaml +++ b/pkg/tests/tasks/observability/yaml/kiali-user-workload-monitoring.tmpl.yaml @@ -4,12 +4,6 @@ metadata: name: kiali-user-workload-monitoring spec: external_services: - istio: - config_map_name: istio-{{ .SmcpName }} - istio_sidecar_injector_config_map_name: istio-sidecar-injector-{{ .SmcpName }} - istiod_deployment_name: istiod-{{ .SmcpName }} - istiod_pod_monitoring_port: 15014 - url_service_version: "http://istiod-{{ .SmcpName }}.{{ .SmcpNamespace }}:15014/version" prometheus: auth: type: bearer @@ -19,4 +13,3 @@ spec: thanos_proxy: enabled: true url: https://thanos-querier.openshift-monitoring.svc.cluster.local:9091 - version: v1.65