From 01e744def0864840e25a562c7f7901b417448a2a Mon Sep 17 00:00:00 2001 From: Chai Bot Date: Tue, 25 Aug 2026 15:06:01 +0000 Subject: [PATCH] Bug 113760: Allow KubeDaemonSetMisScheduled alert on external platform clusters Co-Authored-By: Claude Opus 4.6 --- test/extended/prometheus/prometheus.go | 4 +++- test/extended/util/framework.go | 11 +++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/test/extended/prometheus/prometheus.go b/test/extended/prometheus/prometheus.go index c64e4af1397c..8a1533395538 100644 --- a/test/extended/prometheus/prometheus.go +++ b/test/extended/prometheus/prometheus.go @@ -903,7 +903,9 @@ var _ = g.Describe("[sig-instrumentation] Prometheus [apigroup:image.openshift.i // this alert to fire while we investigate why the taint is not added at node birth. isManagedService, err := exutil.IsManagedServiceCluster(ctx, oc.AdminKubeClient()) o.Expect(err).NotTo(o.HaveOccurred()) - if isManagedService { + isExternalPlatform, err := exutil.IsExternalPlatformCluster(ctx, oc.AdminConfigClient()) + o.Expect(err).NotTo(o.HaveOccurred()) + if isManagedService || isExternalPlatform { allowedAlertNames = append(allowedAlertNames, "KubeDaemonSetMisScheduled") } // https://issues.redhat.com/browse/OCPBUGS-48340 diff --git a/test/extended/util/framework.go b/test/extended/util/framework.go index e640dedad0d4..018526449d8b 100644 --- a/test/extended/util/framework.go +++ b/test/extended/util/framework.go @@ -2313,6 +2313,17 @@ func IsHypershift(ctx context.Context, configClient clientconfigv1.Interface) (b return infrastructure.Status.ControlPlaneTopology == configv1.ExternalTopologyMode, nil } +// IsExternalPlatformCluster checks if the cluster is running on the External platform type. +func IsExternalPlatformCluster(ctx context.Context, configClient clientconfigv1.Interface) (bool, error) { + infrastructure, err := configClient.ConfigV1().Infrastructures().Get(ctx, "cluster", metav1.GetOptions{}) + if err != nil { + return false, nil + } + + return infrastructure.Status.PlatformStatus != nil && + infrastructure.Status.PlatformStatus.Type == configv1.ExternalPlatformType, nil +} + // IsMicroShiftCluster returns "true" if a cluster is MicroShift, // "false" otherwise. It needs kube-admin client as input. //