Skip to content

Commit

Permalink
refactor: sort the gatherers for configcluster
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricardo Lüders committed May 15, 2023
1 parent c1fa9ea commit 6ecea2c
Showing 1 changed file with 41 additions and 43 deletions.
84 changes: 41 additions & 43 deletions pkg/gatherers/clusterconfig/clusterconfig_gatherer.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,67 +27,65 @@ type Gatherer struct {
type gathererFuncPtr = func(*Gatherer, context.Context) ([]record.Record, []error)

var gatheringFunctions = map[string]gathererFuncPtr{
"pdbs": (*Gatherer).GatherPodDisruptionBudgets,
"metrics": (*Gatherer).GatherMostRecentMetrics,
"dvo_metrics": (*Gatherer).GatherDVOMetrics,
"operators": (*Gatherer).GatherClusterOperators,
"operators_pods_and_events": (*Gatherer).GatherClusterOperatorPodsAndEvents,
"container_images": (*Gatherer).GatherContainerImages,
"nodes": (*Gatherer).GatherNodes,
"config_maps": (*Gatherer).GatherConfigMaps,
"version": (*Gatherer).GatherClusterVersion,
"infrastructures": (*Gatherer).GatherClusterInfrastructure,
"networks": (*Gatherer).GatherClusterNetwork,
"active_alerts": (*Gatherer).GatherActiveAlerts,
"authentication": (*Gatherer).GatherClusterAuthentication,
"image_registries": (*Gatherer).GatherClusterImageRegistry,
"image_pruners": (*Gatherer).GatherClusterImagePruner,
"feature_gates": (*Gatherer).GatherClusterFeatureGates,
"oauths": (*Gatherer).GatherClusterOAuth,
"ingress": (*Gatherer).GatherClusterIngress,
"proxies": (*Gatherer).GatherClusterProxy,
"certificate_signing_requests": (*Gatherer).GatherCertificateSigningRequests,
"ceph_cluster": (*Gatherer).GatherCephCluster,
"config_maps": (*Gatherer).GatherConfigMaps,
"container_images": (*Gatherer).GatherContainerImages,
"container_runtime_configs": (*Gatherer).GatherContainerRuntimeConfig,
"cost_management_metrics_configs": (*Gatherer).GatherCostManagementMetricsConfigs,
"crds": (*Gatherer).GatherCRD,
"dvo_metrics": (*Gatherer).GatherDVOMetrics,
"feature_gates": (*Gatherer).GatherClusterFeatureGates,
"host_subnets": (*Gatherer).GatherHostSubnet,
"machines": (*Gatherer).GatherMachine,
"machine_sets": (*Gatherer).GatherMachineSet,
"image": (*Gatherer).GatherClusterImage,
"image_pruners": (*Gatherer).GatherClusterImagePruner,
"image_registries": (*Gatherer).GatherClusterImageRegistry,
"infrastructures": (*Gatherer).GatherClusterInfrastructure,
"ingress": (*Gatherer).GatherClusterIngress,
"jaegers": (*Gatherer).GatherJaegerCR,
"kube_controller_manager_logs": (*Gatherer).GatherKubeControllerManagerLogs,
"machine_autoscalers": (*Gatherer).GatherMachineAutoscalers,
"machine_configs": (*Gatherer).GatherMachineConfigs,
"machine_healthchecks": (*Gatherer).GatherMachineHealthCheck,
"machine_sets": (*Gatherer).GatherMachineSet,
"machines": (*Gatherer).GatherMachine,
"metrics": (*Gatherer).GatherMostRecentMetrics,
"monitoring_persistent_volumes": (*Gatherer).GatherMonitoringPVs,
"install_plans": (*Gatherer).GatherInstallPlans,
"service_accounts": (*Gatherer).GatherServiceAccounts,
"machine_config_pools": (*Gatherer).GatherMachineConfigPool,
"container_runtime_configs": (*Gatherer).GatherContainerRuntimeConfig,
"mutating_webhook_configurations": (*Gatherer).GatherMutatingWebhookConfigurations,
"netnamespaces": (*Gatherer).GatherNetNamespace,
"networks": (*Gatherer).GatherClusterNetwork,
"node_logs": (*Gatherer).GatherNodeLogs,
"nodes": (*Gatherer).GatherNodes,
"oauths": (*Gatherer).GatherClusterOAuth,
"olm_operators": (*Gatherer).GatherOLMOperators,
"openshift_apiserver_operator_logs": (*Gatherer).GatherOpenShiftAPIServerOperatorLogs,
"openshift_sdn_logs": (*Gatherer).GatherOpenshiftSDNLogs,
"openshift_sdn_controller_logs": (*Gatherer).GatherOpenshiftSDNControllerLogs,
"openshift_authentication_logs": (*Gatherer).GatherOpenshiftAuthenticationLogs,
"openshift_logging": (*Gatherer).GatherOpenshiftLogging,
"openshift_machine_api_events": (*Gatherer).GatherOpenshiftMachineAPIEvents,
"openshift_sdn_controller_logs": (*Gatherer).GatherOpenshiftSDNControllerLogs,
"openshift_sdn_logs": (*Gatherer).GatherOpenshiftSDNLogs,
"operators": (*Gatherer).GatherClusterOperators,
"operators_pods_and_events": (*Gatherer).GatherClusterOperatorPodsAndEvents,
"overlapping_namespace_uids": (*Gatherer).GatherNamespacesWithOverlappingUIDs,
"pdbs": (*Gatherer).GatherPodDisruptionBudgets,
"pod_network_connectivity_checks": (*Gatherer).GatherPodNetworkConnectivityChecks,
"proxies": (*Gatherer).GatherClusterProxy,
"sap_config": (*Gatherer).GatherSAPConfig,
"sap_datahubs": (*Gatherer).GatherSAPDatahubs,
"sap_license_management_logs": (*Gatherer).GatherSAPVsystemIptablesLogs,
"sap_pods": (*Gatherer).GatherSAPPods,
"sap_datahubs": (*Gatherer).GatherSAPDatahubs,
"olm_operators": (*Gatherer).GatherOLMOperators,
"pod_network_connectivity_checks": (*Gatherer).GatherPodNetworkConnectivityChecks,
"machine_autoscalers": (*Gatherer).GatherMachineAutoscalers,
"openshift_logging": (*Gatherer).GatherOpenshiftLogging,
"storage_cluster": (*Gatherer).GatherStorageCluster,
"jaegers": (*Gatherer).GatherJaegerCR,
"validating_webhook_configurations": (*Gatherer).GatherValidatingWebhookConfigurations,
"mutating_webhook_configurations": (*Gatherer).GatherMutatingWebhookConfigurations,
"cost_management_metrics_configs": (*Gatherer).GatherCostManagementMetricsConfigs,
"node_logs": (*Gatherer).GatherNodeLogs,
"tsdb_status": (*Gatherer).GatherPrometheusTSDBStatus,
"schedulers": (*Gatherer).GatherSchedulers,
"scheduler_logs": (*Gatherer).GatherSchedulerLogs,
"service_accounts": (*Gatherer).GatherServiceAccounts,
"silenced_alerts": (*Gatherer).GatherSilencedAlerts,
"image": (*Gatherer).GatherClusterImage,
"kube_controller_manager_logs": (*Gatherer).GatherKubeControllerManagerLogs,
"overlapping_namespace_uids": (*Gatherer).GatherNamespacesWithOverlappingUIDs,
"storage_cluster": (*Gatherer).GatherStorageCluster,
"support_secret": (*Gatherer).GatherSupportSecret,
"active_alerts": (*Gatherer).GatherActiveAlerts,
"ceph_cluster": (*Gatherer).GatherCephCluster,
"openshift_machine_api_events": (*Gatherer).GatherOpenshiftMachineAPIEvents,
"tsdb_status": (*Gatherer).GatherPrometheusTSDBStatus,
"validating_webhook_configurations": (*Gatherer).GatherValidatingWebhookConfigurations,
"virtual_machine_instances": (*Gatherer).GatherVirtualMachineInstances,
"version": (*Gatherer).GatherClusterVersion,
}

func New(
Expand Down

0 comments on commit 6ecea2c

Please sign in to comment.