Skip to content

Commit

Permalink
Merge pull request #28251 from deads2k/invariant-64-suggestion
Browse files Browse the repository at this point in the history
some monitor tests only function on disruptive tests
  • Loading branch information
openshift-merge-robot authored Sep 26, 2023
2 parents 02cdac8 + a01fe23 commit 17a3943
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions pkg/defaultmonitortests/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ package defaultmonitortests
import (
"fmt"

"github.com/openshift/origin/pkg/monitortests/kubeapiserver/disruptionnewapiserver"

"github.com/openshift/origin/pkg/monitortests/testframework/alertanalyzer"
"github.com/openshift/origin/pkg/monitortests/testframework/pathologicaleventanalyzer"

"github.com/openshift/origin/pkg/monitortests/kubeapiserver/apiservergracefulrestart"

"github.com/openshift/origin/pkg/monitortestframework"
Expand All @@ -14,7 +19,6 @@ import (
"github.com/openshift/origin/pkg/monitortests/imageregistry/disruptionimageregistry"
"github.com/openshift/origin/pkg/monitortests/kubeapiserver/auditloganalyzer"
"github.com/openshift/origin/pkg/monitortests/kubeapiserver/disruptionlegacyapiservers"
"github.com/openshift/origin/pkg/monitortests/kubeapiserver/disruptionnewapiserver"
"github.com/openshift/origin/pkg/monitortests/kubeapiserver/legacykubeapiservermonitortests"
"github.com/openshift/origin/pkg/monitortests/network/disruptioningress"
"github.com/openshift/origin/pkg/monitortests/network/disruptionpodnetwork"
Expand All @@ -27,15 +31,13 @@ import (
"github.com/openshift/origin/pkg/monitortests/node/watchpods"
"github.com/openshift/origin/pkg/monitortests/storage/legacystoragemonitortests"
"github.com/openshift/origin/pkg/monitortests/testframework/additionaleventscollector"
"github.com/openshift/origin/pkg/monitortests/testframework/alertanalyzer"
"github.com/openshift/origin/pkg/monitortests/testframework/clusterinfoserializer"
"github.com/openshift/origin/pkg/monitortests/testframework/disruptionexternalservicemonitoring"
"github.com/openshift/origin/pkg/monitortests/testframework/disruptionserializer"
"github.com/openshift/origin/pkg/monitortests/testframework/e2etestanalyzer"
"github.com/openshift/origin/pkg/monitortests/testframework/intervalserializer"
"github.com/openshift/origin/pkg/monitortests/testframework/knownimagechecker"
"github.com/openshift/origin/pkg/monitortests/testframework/legacytestframeworkmonitortests"
"github.com/openshift/origin/pkg/monitortests/testframework/pathologicaleventanalyzer"
"github.com/openshift/origin/pkg/monitortests/testframework/timelineserializer"
"github.com/openshift/origin/pkg/monitortests/testframework/trackedresourcesserializer"
"github.com/openshift/origin/pkg/monitortests/testframework/uploadtolokiserializer"
Expand All @@ -62,12 +64,16 @@ func newDefaultMonitorTests(info monitortestframework.MonitorTestInitializationI
monitorTestRegistry.AddMonitorTestOrDie("image-registry-availability", "Image Registry", disruptionimageregistry.NewAvailabilityInvariant())

monitorTestRegistry.AddMonitorTestOrDie("apiserver-availability", "kube-apiserver", disruptionlegacyapiservers.NewAvailabilityInvariant())
monitorTestRegistry.AddMonitorTestOrDie("apiserver-new-disruption-invariant", "kube-apiserver", disruptionnewapiserver.NewDisruptionInvariant())

monitorTestRegistry.AddMonitorTestOrDie("pod-network-avalibility", "Network / ovn-kubernetes", disruptionpodnetwork.NewPodNetworkAvalibilityInvariant(info))
monitorTestRegistry.AddMonitorTestOrDie("service-type-load-balancer-availability", "NetworkEdge", disruptionserviceloadbalancer.NewAvailabilityInvariant())
monitorTestRegistry.AddMonitorTestOrDie("ingress-availability", "NetworkEdge", disruptioningress.NewAvailabilityInvariant())

monitorTestRegistry.AddMonitorTestOrDie("alert-summary-serializer", "Test Framework", alertanalyzer.NewAlertSummarySerializer())
monitorTestRegistry.AddMonitorTestOrDie("external-service-availability", "Test Framework", disruptionexternalservicemonitoring.NewAvailabilityInvariant())
monitorTestRegistry.AddMonitorTestOrDie("pathological-event-analyzer", "Test Framework", pathologicaleventanalyzer.NewAnalyzer())
monitorTestRegistry.AddMonitorTestOrDie("disruption-summary-serializer", "Test Framework", disruptionserializer.NewDisruptionSummarySerializer())

return monitorTestRegistry
}
Expand All @@ -77,14 +83,12 @@ func newDisruptiveMonitorTests() monitortestframework.MonitorTestRegistry {

monitorTestRegistry.AddRegistryOrDie(newUniversalMonitorTests())

monitorTestRegistry.AddMonitorTestOrDie("image-registry-availability", "Image Registry", disruptionimageregistry.NewRecordAvailabilityOnly())

monitorTestRegistry.AddMonitorTestOrDie("apiserver-availability", "kube-apiserver", disruptionlegacyapiservers.NewRecordAvailabilityOnly())

monitorTestRegistry.AddMonitorTestOrDie("service-type-load-balancer-availability", "NetworkEdge", disruptionserviceloadbalancer.NewRecordAvailabilityOnly())
monitorTestRegistry.AddMonitorTestOrDie("ingress-availability", "NetworkEdge", disruptioningress.NewRecordAvailabilityOnly())

monitorTestRegistry.AddMonitorTestOrDie("external-service-availability", "Test Framework", disruptionexternalservicemonitoring.NewRecordAvailabilityOnly())
// this data would be interesting, but I'm betting we cannot scrub the data after the fact to exclude these.
//monitorTestRegistry.AddMonitorTestOrDie("image-registry-availability", "Image Registry", disruptionimageregistry.NewRecordAvailabilityOnly())
//monitorTestRegistry.AddMonitorTestOrDie("apiserver-availability", "kube-apiserver", disruptionlegacyapiservers.NewRecordAvailabilityOnly())
//monitorTestRegistry.AddMonitorTestOrDie("service-type-load-balancer-availability", "NetworkEdge", disruptionserviceloadbalancer.NewRecordAvailabilityOnly())
//monitorTestRegistry.AddMonitorTestOrDie("ingress-availability", "NetworkEdge", disruptioningress.NewRecordAvailabilityOnly())
//monitorTestRegistry.AddMonitorTestOrDie("external-service-availability", "Test Framework", disruptionexternalservicemonitoring.NewRecordAvailabilityOnly())

return monitorTestRegistry
}
Expand All @@ -101,7 +105,6 @@ func newUniversalMonitorTests() monitortestframework.MonitorTestRegistry {
monitorTestRegistry.AddMonitorTestOrDie("legacy-etcd-invariants", "etcd", legacyetcdmonitortests.NewLegacyTests())

monitorTestRegistry.AddMonitorTestOrDie("audit-log-analyzer", "kube-apiserver", auditloganalyzer.NewAuditLogAnalyzer())
monitorTestRegistry.AddMonitorTestOrDie("apiserver-new-disruption-invariant", "kube-apiserver", disruptionnewapiserver.NewDisruptionInvariant())
monitorTestRegistry.AddMonitorTestOrDie("legacy-kube-apiserver-invariants", "kube-apiserver", legacykubeapiservermonitortests.NewLegacyTests())
monitorTestRegistry.AddMonitorTestOrDie("graceful-shutdown-analyzer", "kube-apiserver", apiservergracefulrestart.NewGracefulShutdownAnalyzer())

Expand All @@ -116,12 +119,9 @@ func newUniversalMonitorTests() monitortestframework.MonitorTestRegistry {
monitorTestRegistry.AddMonitorTestOrDie("legacy-storage-invariants", "Storage", legacystoragemonitortests.NewLegacyTests())

monitorTestRegistry.AddMonitorTestOrDie("legacy-test-framework-invariants", "Test Framework", legacytestframeworkmonitortests.NewLegacyTests())
monitorTestRegistry.AddMonitorTestOrDie("pathological-event-analyzer", "Test Framework", pathologicaleventanalyzer.NewAnalyzer())
monitorTestRegistry.AddMonitorTestOrDie("timeline-serializer", "Test Framework", timelineserializer.NewTimelineSerializer())
monitorTestRegistry.AddMonitorTestOrDie("interval-serializer", "Test Framework", intervalserializer.NewIntervalSerializer())
monitorTestRegistry.AddMonitorTestOrDie("tracked-resources-serializer", "Test Framework", trackedresourcesserializer.NewTrackedResourcesSerializer())
monitorTestRegistry.AddMonitorTestOrDie("disruption-summary-serializer", "Test Framework", disruptionserializer.NewDisruptionSummarySerializer())
monitorTestRegistry.AddMonitorTestOrDie("alert-summary-serializer", "Test Framework", alertanalyzer.NewAlertSummarySerializer())
monitorTestRegistry.AddMonitorTestOrDie("cluster-info-serializer", "Test Framework", clusterinfoserializer.NewClusterInfoSerializer())
monitorTestRegistry.AddMonitorTestOrDie("additional-events-collector", "Test Framework", additionaleventscollector.NewIntervalSerializer())
monitorTestRegistry.AddMonitorTestOrDie("known-image-checker", "Test Framework", knownimagechecker.NewEnsureValidImages())
Expand Down

0 comments on commit 17a3943

Please sign in to comment.