Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion test/extended/prometheus/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions test/extended/util/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand Down