diff --git a/docs/gathered-data.md b/docs/gathered-data.md index 9e1c38efe..c8db19ded 100644 --- a/docs/gathered-data.md +++ b/docs/gathered-data.md @@ -1501,35 +1501,6 @@ Collects logs from pods in `openshift-sdn` namespace with following substrings: None -## PNCC - -Collects a summary of failed `PodNetworkConnectivityChecks` from last 24 hours. - -Time of the most recently failed check with each reason and message is recorded. - -### API Reference -- podnetworkconnectivitychecks.controlplane.operator.openshift.io/v1alpha1 -- https://pkg.go.dev/github.com/openshift/api/operatorcontrolplane/v1alpha1 - -### Sample data -- [docs/insights-archive-sample/config/podnetworkconnectivitychecks.json](./insights-archive-sample/config/podnetworkconnectivitychecks.json) - -### Location in archive -- `config/podnetworkconnectivitychecks.json` - -### Config ID -`clusterconfig/pod_network_connectivity_checks` - -### Released version -- 4.8.2 - -### Backported versions -None - -### Changes -None - - ## PodDefinition Collects pod definition from pods that are @@ -1586,6 +1557,61 @@ Collects the cluster's `PodDisruptionBudgets`. and the limit of gathered records to 100 since 4.14. +## PodNetworkConnectivityChecks + +Collects a summary of failed `PodNetworkConnectivityChecks` from last 24 hours. + +Time of the most recently failed check with each reason and message is recorded. + +### API Reference +- podnetworkconnectivitychecks.controlplane.operator.openshift.io/v1alpha1 +- https://pkg.go.dev/github.com/openshift/api/operatorcontrolplane/v1alpha1 + +### Sample data +- [docs/insights-archive-sample/config/podnetworkconnectivitychecks.json](./insights-archive-sample/config/podnetworkconnectivitychecks.json) + +### Location in archive +- `config/podnetworkconnectivitychecks.json` + +### Config ID +`clusterconfig/pod_network_connectivity_checks` + +### Released version +- 4.8.2 + +### Backported versions +None + +### Changes +None + + +## PrometheusTSDBStatus + +Collects Prometheus TSDB status. + +### API Reference +None + +### Sample data +- [docs/insights-archive-sample/config/tsdb.json](./insights-archive-sample/config/tsdb.json) + +### Location in archive +- `config/tsdb.json` + +### Config ID +`clusterconfig/tsdb_status` + +### Released version +- 4.10.0 + +### Backported versions +None + +### Changes +None + + ## SAPConfig Collects selected security context constraints @@ -1879,32 +1905,6 @@ None None -## TSDBStatus - -Collects Prometheus TSDB status. - -### API Reference -None - -### Sample data -- [docs/insights-archive-sample/config/tsdb.json](./insights-archive-sample/config/tsdb.json) - -### Location in archive -- `config/tsdb.json` - -### Config ID -`clusterconfig/tsdb_status` - -### Released version -- 4.10.0 - -### Backported versions -None - -### Changes -None - - ## ValidatingWebhookConfigurations Collects `ValidatingWebhookConfiguration` resources diff --git a/pkg/gatherers/clusterconfig/clusterconfig_gatherer.go b/pkg/gatherers/clusterconfig/clusterconfig_gatherer.go index 2915ccebe..90b0fd6e5 100644 --- a/pkg/gatherers/clusterconfig/clusterconfig_gatherer.go +++ b/pkg/gatherers/clusterconfig/clusterconfig_gatherer.go @@ -27,66 +27,66 @@ 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, + "install_plans": (*Gatherer).GatherInstallPlans, + "jaegers": (*Gatherer).GatherJaegerCR, + "kube_controller_manager_logs": (*Gatherer).GatherKubeControllerManagerLogs, + "machine_autoscalers": (*Gatherer).GatherMachineAutoscalers, + "machine_config_pools": (*Gatherer).GatherMachineConfigPool, "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).GatherPNCC, - "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).GatherTSDBStatus, "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, + "version": (*Gatherer).GatherClusterVersion, } func New( diff --git a/pkg/gatherers/clusterconfig/ceph_cluster.go b/pkg/gatherers/clusterconfig/gather_ceph_cluster.go similarity index 100% rename from pkg/gatherers/clusterconfig/ceph_cluster.go rename to pkg/gatherers/clusterconfig/gather_ceph_cluster.go diff --git a/pkg/gatherers/clusterconfig/ceph_cluster_test.go b/pkg/gatherers/clusterconfig/gather_ceph_cluster_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/ceph_cluster_test.go rename to pkg/gatherers/clusterconfig/gather_ceph_cluster_test.go diff --git a/pkg/gatherers/clusterconfig/certificate_signing_requests.go b/pkg/gatherers/clusterconfig/gather_certificate_signing_requests.go similarity index 100% rename from pkg/gatherers/clusterconfig/certificate_signing_requests.go rename to pkg/gatherers/clusterconfig/gather_certificate_signing_requests.go diff --git a/pkg/gatherers/clusterconfig/certificate_signing_requests_test.go b/pkg/gatherers/clusterconfig/gather_certificate_signing_requests_test.go similarity index 96% rename from pkg/gatherers/clusterconfig/certificate_signing_requests_test.go rename to pkg/gatherers/clusterconfig/gather_certificate_signing_requests_test.go index a67220d36..086097556 100644 --- a/pkg/gatherers/clusterconfig/certificate_signing_requests_test.go +++ b/pkg/gatherers/clusterconfig/gather_certificate_signing_requests_test.go @@ -12,7 +12,7 @@ import ( certificatesv1api "k8s.io/api/certificates/v1" ) -func Test_CSR(t *testing.T) { +func Test_gatherCertificateSigningRequests(t *testing.T) { var files = []struct { dataFile string expFile string @@ -66,7 +66,7 @@ func Test_CSR(t *testing.T) { } // Verifies if CSR features will be ignored in package -func Test_CSR_Filters(t *testing.T) { +func Test_gatherCertificateSigningRequestsFilters(t *testing.T) { var files = []struct { name string csr *CSRAnonymizedFeatures diff --git a/pkg/gatherers/clusterconfig/authentications.go b/pkg/gatherers/clusterconfig/gather_cluster_authentication.go similarity index 100% rename from pkg/gatherers/clusterconfig/authentications.go rename to pkg/gatherers/clusterconfig/gather_cluster_authentication.go diff --git a/pkg/gatherers/clusterconfig/gather_cluster_authentication_test.go b/pkg/gatherers/clusterconfig/gather_cluster_authentication_test.go new file mode 100644 index 000000000..2d9e3dcdd --- /dev/null +++ b/pkg/gatherers/clusterconfig/gather_cluster_authentication_test.go @@ -0,0 +1,63 @@ +package clusterconfig + +import ( + "context" + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + configfake "github.com/openshift/client-go/config/clientset/versioned/fake" + + v1 "github.com/openshift/api/config/v1" + "github.com/openshift/insights-operator/pkg/record" + "github.com/stretchr/testify/assert" +) + +func Test_gatherClusterAuthentication(t *testing.T) { + tests := []struct { + name string + authentication *v1.Authentication + result []record.Record + errCount int + }{ + { + name: "Retrieving authentication returns record of that authentication and no errors", + authentication: &v1.Authentication{ + ObjectMeta: metav1.ObjectMeta{ + Name: "cluster", + }, + }, + result: []record.Record{ + { + Name: "config/authentication", + Item: record.ResourceMarshaller{ + Resource: &v1.Authentication{ + ObjectMeta: metav1.ObjectMeta{Name: "cluster"}, + }, + }, + }, + }, + errCount: 0, + }, + { + name: "Retrieving no authentication returns no error/no records", + authentication: &v1.Authentication{}, + result: nil, + }, + } + for _, testCase := range tests { + tc := testCase + t.Run(tc.name, func(t *testing.T) { + t.Parallel() + // Given + configClient := configfake.NewSimpleClientset(tc.authentication) + + // When + got, gotErrs := gatherClusterAuthentication(context.Background(), configClient.ConfigV1()) + + // Assert + assert.Equal(t, tc.result, got) + assert.Len(t, gotErrs, tc.errCount) + }) + } +} diff --git a/pkg/gatherers/clusterconfig/feature_gates.go b/pkg/gatherers/clusterconfig/gather_cluster_feature_gates.go similarity index 100% rename from pkg/gatherers/clusterconfig/feature_gates.go rename to pkg/gatherers/clusterconfig/gather_cluster_feature_gates.go diff --git a/pkg/gatherers/clusterconfig/gather_cluster_feature_gates_test.go b/pkg/gatherers/clusterconfig/gather_cluster_feature_gates_test.go new file mode 100644 index 000000000..9355346d1 --- /dev/null +++ b/pkg/gatherers/clusterconfig/gather_cluster_feature_gates_test.go @@ -0,0 +1,63 @@ +package clusterconfig + +import ( + "context" + "testing" + + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + v1 "github.com/openshift/api/config/v1" + + configfake "github.com/openshift/client-go/config/clientset/versioned/fake" + "github.com/openshift/insights-operator/pkg/record" + "github.com/stretchr/testify/assert" +) + +func Test_gatherClusterFeatureGates(t *testing.T) { + tests := []struct { + name string + feature *v1.FeatureGate + result []record.Record + errCount int + }{ + { + name: "Retrieving featuregate returns record of that featuregate and no errors", + feature: &v1.FeatureGate{ + ObjectMeta: metav1.ObjectMeta{ + Name: "cluster", + }, + }, + result: []record.Record{ + { + Name: "config/featuregate", + Item: record.ResourceMarshaller{ + Resource: &v1.FeatureGate{ + ObjectMeta: metav1.ObjectMeta{Name: "cluster"}, + }, + }, + }, + }, + errCount: 0, + }, + { + name: "Retrieving no featuregate returns no error/no record", + feature: &v1.FeatureGate{}, + result: nil, + }, + } + for _, testCase := range tests { + tc := testCase + t.Run(tc.name, func(t *testing.T) { + t.Parallel() + // Given + configClient := configfake.NewSimpleClientset(tc.feature) + + // When + got, gotErrs := gatherClusterFeatureGates(context.Background(), configClient.ConfigV1()) + + // Assert + assert.Equal(t, tc.result, got) + assert.Len(t, gotErrs, tc.errCount) + }) + } +} diff --git a/pkg/gatherers/clusterconfig/image.go b/pkg/gatherers/clusterconfig/gather_cluster_image.go similarity index 100% rename from pkg/gatherers/clusterconfig/image.go rename to pkg/gatherers/clusterconfig/gather_cluster_image.go diff --git a/pkg/gatherers/clusterconfig/image_registries.go b/pkg/gatherers/clusterconfig/gather_cluster_image_registries.go similarity index 100% rename from pkg/gatherers/clusterconfig/image_registries.go rename to pkg/gatherers/clusterconfig/gather_cluster_image_registries.go diff --git a/pkg/gatherers/clusterconfig/image_registries_test.go b/pkg/gatherers/clusterconfig/gather_cluster_image_registries_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/image_registries_test.go rename to pkg/gatherers/clusterconfig/gather_cluster_image_registries_test.go diff --git a/pkg/gatherers/clusterconfig/image_test.go b/pkg/gatherers/clusterconfig/gather_cluster_image_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/image_test.go rename to pkg/gatherers/clusterconfig/gather_cluster_image_test.go diff --git a/pkg/gatherers/clusterconfig/operators_pods_and_events.go b/pkg/gatherers/clusterconfig/gather_cluster_operator_pods_and_events.go similarity index 100% rename from pkg/gatherers/clusterconfig/operators_pods_and_events.go rename to pkg/gatherers/clusterconfig/gather_cluster_operator_pods_and_events.go diff --git a/pkg/gatherers/clusterconfig/operators_pods_and_events_test.go b/pkg/gatherers/clusterconfig/gather_cluster_operator_pods_and_events_test.go similarity index 98% rename from pkg/gatherers/clusterconfig/operators_pods_and_events_test.go rename to pkg/gatherers/clusterconfig/gather_cluster_operator_pods_and_events_test.go index 9a83ea1c7..be6b639d5 100644 --- a/pkg/gatherers/clusterconfig/operators_pods_and_events_test.go +++ b/pkg/gatherers/clusterconfig/gather_cluster_operator_pods_and_events_test.go @@ -20,7 +20,7 @@ import ( "github.com/openshift/insights-operator/pkg/record" ) -func Test_UnhealtyOperators_GatherClusterOperatorPodsAndEvents(t *testing.T) { +func Test_GatherClusterOperatorPodsAndEvents(t *testing.T) { testOperator := configv1.ClusterOperator{ ObjectMeta: metav1.ObjectMeta{ Name: "test-clusteroperator", @@ -39,7 +39,7 @@ func Test_UnhealtyOperators_GatherClusterOperatorPodsAndEvents(t *testing.T) { } } -func Test_UnhealtyOperators_GatherPodContainersLogs(t *testing.T) { +func Test_GatherPodContainersLogs(t *testing.T) { type args struct { ctx context.Context client corev1client.CoreV1Interface @@ -89,7 +89,7 @@ func Test_UnhealtyOperators_GatherPodContainersLogs(t *testing.T) { } } -func Test_UnhealtyOperators_GetContainerLogs(t *testing.T) { +func Test_GetContainerLogs(t *testing.T) { bufferSize := int64(8 * 1024 * 1024 * logCompressionRatio / 10 / 2) type args struct { @@ -132,7 +132,7 @@ func Test_UnhealtyOperators_GetContainerLogs(t *testing.T) { } } -func Test_UnhealtyOperators_UnhealthyClusterOperator(t *testing.T) { +func Test_UnhealthyClusterOperator(t *testing.T) { type args struct { ctx context.Context items []configv1.ClusterOperator @@ -173,7 +173,7 @@ func Test_UnhealtyOperators_UnhealthyClusterOperator(t *testing.T) { } } -func Test_UnhealtyOperators_GatherUnhealthyPods(t *testing.T) { +func Test_GatherUnhealthyPods(t *testing.T) { type args struct { pods []v1.Pod } @@ -205,7 +205,7 @@ func Test_UnhealtyOperators_GatherUnhealthyPods(t *testing.T) { } } -func Test_UnhealtyOperators_GatherNamespaceEvents(t *testing.T) { +func Test_GatherNamespaceEvents(t *testing.T) { type args struct { ctx context.Context coreClient corev1client.CoreV1Interface @@ -244,7 +244,7 @@ func Test_UnhealtyOperators_GatherNamespaceEvents(t *testing.T) { } } -func Test_UnhealtyOperators_FetchPodContainerLog(t *testing.T) { +func Test_FetchPodContainerLog(t *testing.T) { bufferSize := int64(8 * 1024 * 1024 * logCompressionRatio / 10 / 2) type args struct { @@ -306,7 +306,7 @@ func Test_UnhealtyOperators_FetchPodContainerLog(t *testing.T) { } } -func Test_UnhealtyOperators_IsHealthyOperator(t *testing.T) { +func Test_IsHealthyOperator(t *testing.T) { type args struct { operator *configv1.ClusterOperator } @@ -383,7 +383,7 @@ func Test_UnhealtyOperators_IsHealthyOperator(t *testing.T) { } } -func Test_UnhealtyOperators_IsPodRestarted(t *testing.T) { +func Test_IsPodRestarted(t *testing.T) { type args struct { pod *v1.Pod } @@ -454,7 +454,7 @@ func Test_UnhealtyOperators_IsPodRestarted(t *testing.T) { } } -func Test_UnhealtyOperators_NamespacesForOperator(t *testing.T) { +func Test_NamespacesForOperator(t *testing.T) { type args struct { operator *configv1.ClusterOperator } diff --git a/pkg/gatherers/clusterconfig/operators.go b/pkg/gatherers/clusterconfig/gather_cluster_operators.go similarity index 98% rename from pkg/gatherers/clusterconfig/operators.go rename to pkg/gatherers/clusterconfig/gather_cluster_operators.go index 17d0b0669..febf69a0f 100644 --- a/pkg/gatherers/clusterconfig/operators.go +++ b/pkg/gatherers/clusterconfig/gather_cluster_operators.go @@ -130,7 +130,7 @@ func clusterOperatorsRecords(ctx context.Context, relRes := collectClusterOperatorRelatedObjects(ctx, dynamicClient, items[idx], resVer) for _, rr := range relRes { - // imageregistry resources (config, pruner) are gathered in image_registries.go, image_pruners.go + // imageregistry resources (config, pruner) are gathered in gather_cluster_image_registries.go, gather_image_pruners.go if strings.Contains(rr.APIVersion, "imageregistry") { continue } diff --git a/pkg/gatherers/clusterconfig/operators_test.go b/pkg/gatherers/clusterconfig/gather_cluster_operators_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/operators_test.go rename to pkg/gatherers/clusterconfig/gather_cluster_operators_test.go diff --git a/pkg/gatherers/clusterconfig/config_maps.go b/pkg/gatherers/clusterconfig/gather_config_maps.go similarity index 100% rename from pkg/gatherers/clusterconfig/config_maps.go rename to pkg/gatherers/clusterconfig/gather_config_maps.go diff --git a/pkg/gatherers/clusterconfig/config_maps_test.go b/pkg/gatherers/clusterconfig/gather_config_maps_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/config_maps_test.go rename to pkg/gatherers/clusterconfig/gather_config_maps_test.go diff --git a/pkg/gatherers/clusterconfig/container_images.go b/pkg/gatherers/clusterconfig/gather_container_images.go similarity index 100% rename from pkg/gatherers/clusterconfig/container_images.go rename to pkg/gatherers/clusterconfig/gather_container_images.go diff --git a/pkg/gatherers/clusterconfig/container_images_test.go b/pkg/gatherers/clusterconfig/gather_container_images_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/container_images_test.go rename to pkg/gatherers/clusterconfig/gather_container_images_test.go diff --git a/pkg/gatherers/clusterconfig/container_runtime_configs.go b/pkg/gatherers/clusterconfig/gather_container_runtime_configs.go similarity index 100% rename from pkg/gatherers/clusterconfig/container_runtime_configs.go rename to pkg/gatherers/clusterconfig/gather_container_runtime_configs.go diff --git a/pkg/gatherers/clusterconfig/container_runtime_configs_test.go b/pkg/gatherers/clusterconfig/gather_container_runtime_configs_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/container_runtime_configs_test.go rename to pkg/gatherers/clusterconfig/gather_container_runtime_configs_test.go diff --git a/pkg/gatherers/clusterconfig/cost_management_metrics_configs.go b/pkg/gatherers/clusterconfig/gather_cost_management_metrics_configs.go similarity index 100% rename from pkg/gatherers/clusterconfig/cost_management_metrics_configs.go rename to pkg/gatherers/clusterconfig/gather_cost_management_metrics_configs.go diff --git a/pkg/gatherers/clusterconfig/cost_management_metrics_configs_test.go b/pkg/gatherers/clusterconfig/gather_cost_management_metrics_configs_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/cost_management_metrics_configs_test.go rename to pkg/gatherers/clusterconfig/gather_cost_management_metrics_configs_test.go diff --git a/pkg/gatherers/clusterconfig/custom_resource_definitions.go b/pkg/gatherers/clusterconfig/gather_custom_resource_definitions.go similarity index 100% rename from pkg/gatherers/clusterconfig/custom_resource_definitions.go rename to pkg/gatherers/clusterconfig/gather_custom_resource_definitions.go diff --git a/pkg/gatherers/clusterconfig/custom_resource_definitions_test.go b/pkg/gatherers/clusterconfig/gather_custom_resource_definitions_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/custom_resource_definitions_test.go rename to pkg/gatherers/clusterconfig/gather_custom_resource_definitions_test.go diff --git a/pkg/gatherers/clusterconfig/dvo_metrics.go b/pkg/gatherers/clusterconfig/gather_dvo_metrics.go similarity index 100% rename from pkg/gatherers/clusterconfig/dvo_metrics.go rename to pkg/gatherers/clusterconfig/gather_dvo_metrics.go diff --git a/pkg/gatherers/clusterconfig/host_subnets.go b/pkg/gatherers/clusterconfig/gather_host_subnets.go similarity index 100% rename from pkg/gatherers/clusterconfig/host_subnets.go rename to pkg/gatherers/clusterconfig/gather_host_subnets.go diff --git a/pkg/gatherers/clusterconfig/host_subnets_test.go b/pkg/gatherers/clusterconfig/gather_host_subnets_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/host_subnets_test.go rename to pkg/gatherers/clusterconfig/gather_host_subnets_test.go diff --git a/pkg/gatherers/clusterconfig/image_pruners.go b/pkg/gatherers/clusterconfig/gather_image_pruners.go similarity index 100% rename from pkg/gatherers/clusterconfig/image_pruners.go rename to pkg/gatherers/clusterconfig/gather_image_pruners.go diff --git a/pkg/gatherers/clusterconfig/image_pruners_test.go b/pkg/gatherers/clusterconfig/gather_image_pruners_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/image_pruners_test.go rename to pkg/gatherers/clusterconfig/gather_image_pruners_test.go diff --git a/pkg/gatherers/clusterconfig/install_plans.go b/pkg/gatherers/clusterconfig/gather_install_plans.go similarity index 100% rename from pkg/gatherers/clusterconfig/install_plans.go rename to pkg/gatherers/clusterconfig/gather_install_plans.go diff --git a/pkg/gatherers/clusterconfig/install_plans_test.go b/pkg/gatherers/clusterconfig/gather_install_plans_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/install_plans_test.go rename to pkg/gatherers/clusterconfig/gather_install_plans_test.go diff --git a/pkg/gatherers/clusterconfig/jaeger_cr.go b/pkg/gatherers/clusterconfig/gather_jaeger_cr.go similarity index 100% rename from pkg/gatherers/clusterconfig/jaeger_cr.go rename to pkg/gatherers/clusterconfig/gather_jaeger_cr.go diff --git a/pkg/gatherers/clusterconfig/jaeger_cr_test.go b/pkg/gatherers/clusterconfig/gather_jaeger_cr_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/jaeger_cr_test.go rename to pkg/gatherers/clusterconfig/gather_jaeger_cr_test.go diff --git a/pkg/gatherers/clusterconfig/machine_autoscaler.go b/pkg/gatherers/clusterconfig/gather_machine_autoscaler.go similarity index 100% rename from pkg/gatherers/clusterconfig/machine_autoscaler.go rename to pkg/gatherers/clusterconfig/gather_machine_autoscaler.go diff --git a/pkg/gatherers/clusterconfig/machine_autoscaler_test.go b/pkg/gatherers/clusterconfig/gather_machine_autoscaler_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/machine_autoscaler_test.go rename to pkg/gatherers/clusterconfig/gather_machine_autoscaler_test.go diff --git a/pkg/gatherers/clusterconfig/machine_config_pools.go b/pkg/gatherers/clusterconfig/gather_machine_config_pools.go similarity index 100% rename from pkg/gatherers/clusterconfig/machine_config_pools.go rename to pkg/gatherers/clusterconfig/gather_machine_config_pools.go diff --git a/pkg/gatherers/clusterconfig/machine_config_pools_test.go b/pkg/gatherers/clusterconfig/gather_machine_config_pools_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/machine_config_pools_test.go rename to pkg/gatherers/clusterconfig/gather_machine_config_pools_test.go diff --git a/pkg/gatherers/clusterconfig/machine_configs.go b/pkg/gatherers/clusterconfig/gather_machine_configs.go similarity index 100% rename from pkg/gatherers/clusterconfig/machine_configs.go rename to pkg/gatherers/clusterconfig/gather_machine_configs.go diff --git a/pkg/gatherers/clusterconfig/machine_configs_test.go b/pkg/gatherers/clusterconfig/gather_machine_configs_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/machine_configs_test.go rename to pkg/gatherers/clusterconfig/gather_machine_configs_test.go diff --git a/pkg/gatherers/clusterconfig/machine_healthcheck.go b/pkg/gatherers/clusterconfig/gather_machine_health_check.go similarity index 100% rename from pkg/gatherers/clusterconfig/machine_healthcheck.go rename to pkg/gatherers/clusterconfig/gather_machine_health_check.go diff --git a/pkg/gatherers/clusterconfig/machine_healthcheck_test.go b/pkg/gatherers/clusterconfig/gather_machine_health_check_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/machine_healthcheck_test.go rename to pkg/gatherers/clusterconfig/gather_machine_health_check_test.go diff --git a/pkg/gatherers/clusterconfig/machine_sets.go b/pkg/gatherers/clusterconfig/gather_machine_sets.go similarity index 100% rename from pkg/gatherers/clusterconfig/machine_sets.go rename to pkg/gatherers/clusterconfig/gather_machine_sets.go diff --git a/pkg/gatherers/clusterconfig/machine_sets_test.go b/pkg/gatherers/clusterconfig/gather_machine_sets_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/machine_sets_test.go rename to pkg/gatherers/clusterconfig/gather_machine_sets_test.go diff --git a/pkg/gatherers/clusterconfig/machines.go b/pkg/gatherers/clusterconfig/gather_machines.go similarity index 100% rename from pkg/gatherers/clusterconfig/machines.go rename to pkg/gatherers/clusterconfig/gather_machines.go diff --git a/pkg/gatherers/clusterconfig/machines_test.go b/pkg/gatherers/clusterconfig/gather_machines_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/machines_test.go rename to pkg/gatherers/clusterconfig/gather_machines_test.go diff --git a/pkg/gatherers/clusterconfig/mutatingwebhookconfigurations.go b/pkg/gatherers/clusterconfig/gather_mutating_webhook_configurations.go similarity index 100% rename from pkg/gatherers/clusterconfig/mutatingwebhookconfigurations.go rename to pkg/gatherers/clusterconfig/gather_mutating_webhook_configurations.go diff --git a/pkg/gatherers/clusterconfig/mutatingwebhookconfigurations_test.go b/pkg/gatherers/clusterconfig/gather_mutating_webhook_configurations_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/mutatingwebhookconfigurations_test.go rename to pkg/gatherers/clusterconfig/gather_mutating_webhook_configurations_test.go diff --git a/pkg/gatherers/clusterconfig/namespaces_with_overlapping_uids.go b/pkg/gatherers/clusterconfig/gather_namespaces_with_overlapping_uids.go similarity index 100% rename from pkg/gatherers/clusterconfig/namespaces_with_overlapping_uids.go rename to pkg/gatherers/clusterconfig/gather_namespaces_with_overlapping_uids.go diff --git a/pkg/gatherers/clusterconfig/namespaces_with_overlapping_uids_test.go b/pkg/gatherers/clusterconfig/gather_namespaces_with_overlapping_uids_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/namespaces_with_overlapping_uids_test.go rename to pkg/gatherers/clusterconfig/gather_namespaces_with_overlapping_uids_test.go diff --git a/pkg/gatherers/clusterconfig/netnamespaces.go b/pkg/gatherers/clusterconfig/gather_net_namespace.go similarity index 100% rename from pkg/gatherers/clusterconfig/netnamespaces.go rename to pkg/gatherers/clusterconfig/gather_net_namespace.go diff --git a/pkg/gatherers/clusterconfig/netnamespaces_test.go b/pkg/gatherers/clusterconfig/gather_net_namespace_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/netnamespaces_test.go rename to pkg/gatherers/clusterconfig/gather_net_namespace_test.go diff --git a/pkg/gatherers/clusterconfig/node_logs.go b/pkg/gatherers/clusterconfig/gather_node_logs.go similarity index 100% rename from pkg/gatherers/clusterconfig/node_logs.go rename to pkg/gatherers/clusterconfig/gather_node_logs.go diff --git a/pkg/gatherers/clusterconfig/node_logs_test.go b/pkg/gatherers/clusterconfig/gather_node_logs_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/node_logs_test.go rename to pkg/gatherers/clusterconfig/gather_node_logs_test.go diff --git a/pkg/gatherers/clusterconfig/olm_operators.go b/pkg/gatherers/clusterconfig/gather_olm_operators.go similarity index 100% rename from pkg/gatherers/clusterconfig/olm_operators.go rename to pkg/gatherers/clusterconfig/gather_olm_operators.go diff --git a/pkg/gatherers/clusterconfig/olm_operators_test.go b/pkg/gatherers/clusterconfig/gather_olm_operators_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/olm_operators_test.go rename to pkg/gatherers/clusterconfig/gather_olm_operators_test.go diff --git a/pkg/gatherers/clusterconfig/openshift_logging.go b/pkg/gatherers/clusterconfig/gather_openshift_logging.go similarity index 100% rename from pkg/gatherers/clusterconfig/openshift_logging.go rename to pkg/gatherers/clusterconfig/gather_openshift_logging.go diff --git a/pkg/gatherers/clusterconfig/openshift_logging_test.go b/pkg/gatherers/clusterconfig/gather_openshift_logging_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/openshift_logging_test.go rename to pkg/gatherers/clusterconfig/gather_openshift_logging_test.go diff --git a/pkg/gatherers/clusterconfig/openshift_machine_api_events.go b/pkg/gatherers/clusterconfig/gather_openshift_machine_api_events.go similarity index 100% rename from pkg/gatherers/clusterconfig/openshift_machine_api_events.go rename to pkg/gatherers/clusterconfig/gather_openshift_machine_api_events.go diff --git a/pkg/gatherers/clusterconfig/openshift_machine_api_events_test.go b/pkg/gatherers/clusterconfig/gather_openshift_machine_api_events_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/openshift_machine_api_events_test.go rename to pkg/gatherers/clusterconfig/gather_openshift_machine_api_events_test.go diff --git a/pkg/gatherers/clusterconfig/pod_disruption_budgets.go b/pkg/gatherers/clusterconfig/gather_pod_disruption_budgets.go similarity index 100% rename from pkg/gatherers/clusterconfig/pod_disruption_budgets.go rename to pkg/gatherers/clusterconfig/gather_pod_disruption_budgets.go diff --git a/pkg/gatherers/clusterconfig/pod_disruption_budgets_test.go b/pkg/gatherers/clusterconfig/gather_pod_disruption_budgets_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/pod_disruption_budgets_test.go rename to pkg/gatherers/clusterconfig/gather_pod_disruption_budgets_test.go diff --git a/pkg/gatherers/clusterconfig/pod_network_connectivity_checks.go b/pkg/gatherers/clusterconfig/gather_pod_network_connectivity_checks.go similarity index 92% rename from pkg/gatherers/clusterconfig/pod_network_connectivity_checks.go rename to pkg/gatherers/clusterconfig/gather_pod_network_connectivity_checks.go index fb2bfb6b3..5d6ece97a 100644 --- a/pkg/gatherers/clusterconfig/pod_network_connectivity_checks.go +++ b/pkg/gatherers/clusterconfig/gather_pod_network_connectivity_checks.go @@ -11,7 +11,7 @@ import ( "github.com/openshift/insights-operator/pkg/record" ) -// GatherPNCC Collects a summary of failed `PodNetworkConnectivityChecks` from last 24 hours. +// GatherPodNetworkConnectivityChecks Collects a summary of failed `PodNetworkConnectivityChecks` from last 24 hours. // // Time of the most recently failed check with each reason and message is recorded. // @@ -36,7 +36,7 @@ import ( // // ### Changes // None -func (g *Gatherer) GatherPNCC(ctx context.Context) ([]record.Record, []error) { +func (g *Gatherer) GatherPodNetworkConnectivityChecks(ctx context.Context) ([]record.Record, []error) { gatherClient, err := ocpV1AlphaCli.NewForConfig(g.gatherKubeConfig) if err != nil { return nil, []error{err} diff --git a/pkg/gatherers/clusterconfig/pod_network_connectivity_checks_test.go b/pkg/gatherers/clusterconfig/gather_pod_network_connectivity_checks_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/pod_network_connectivity_checks_test.go rename to pkg/gatherers/clusterconfig/gather_pod_network_connectivity_checks_test.go diff --git a/pkg/gatherers/clusterconfig/tsdb_status.go b/pkg/gatherers/clusterconfig/gather_prometheus_tsdb_status.go similarity index 75% rename from pkg/gatherers/clusterconfig/tsdb_status.go rename to pkg/gatherers/clusterconfig/gather_prometheus_tsdb_status.go index 04bd9263f..5611102ca 100644 --- a/pkg/gatherers/clusterconfig/tsdb_status.go +++ b/pkg/gatherers/clusterconfig/gather_prometheus_tsdb_status.go @@ -10,7 +10,7 @@ import ( "github.com/openshift/insights-operator/pkg/utils/marshal" ) -// GatherTSDBStatus Collects Prometheus TSDB status. +// GatherPrometheusTSDBStatus Collects Prometheus TSDB status. // // ### API Reference // None @@ -32,17 +32,17 @@ import ( // // ### Changes // None -func (g *Gatherer) GatherTSDBStatus(ctx context.Context) ([]record.Record, []error) { +func (g *Gatherer) GatherPrometheusTSDBStatus(ctx context.Context) ([]record.Record, []error) { metricsRESTClient, err := rest.RESTClientFor(g.metricsGatherKubeConfig) if err != nil { klog.Warningf("Unable to load metrics client, tsdb status cannot be collected: %v", err) return nil, nil } - return gatherTsdbStatus(ctx, metricsRESTClient) + return gatherPrometheusTSDBStatus(ctx, metricsRESTClient) } -func gatherTsdbStatus(ctx context.Context, metricsClient rest.Interface) ([]record.Record, []error) { +func gatherPrometheusTSDBStatus(ctx context.Context, metricsClient rest.Interface) ([]record.Record, []error) { data, err := metricsClient.Get().AbsPath("api/v1/status/tsdb"). DoRaw(ctx) if err != nil { diff --git a/pkg/gatherers/clusterconfig/gather_prometheus_tsdb_status_test.go b/pkg/gatherers/clusterconfig/gather_prometheus_tsdb_status_test.go new file mode 100644 index 000000000..a5279ee62 --- /dev/null +++ b/pkg/gatherers/clusterconfig/gather_prometheus_tsdb_status_test.go @@ -0,0 +1,96 @@ +package clusterconfig + +import ( + "context" + "net/http" + "net/http/httptest" + "net/url" + "testing" + + "github.com/openshift/insights-operator/pkg/record" + "github.com/openshift/insights-operator/pkg/utils/marshal" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + + "k8s.io/client-go/rest" + + "github.com/stretchr/testify/assert" +) + +type mockTSDBClient struct { + data []byte +} + +func (c *mockTSDBClient) RestClient(t *testing.T) *rest.RESTClient { + ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { + if c.data == nil { + w.WriteHeader(http.StatusNotFound) + } else { + w.WriteHeader(http.StatusOK) + _, err := w.Write(c.data) + if err != nil { + w.WriteHeader(http.StatusInternalServerError) + } + } + })) + + baseURL, err := url.Parse(ts.URL) + assert.NoError(t, err, "failed to parse server URL") + client, err := rest.NewRESTClient(baseURL, "", rest.ClientContentConfig{}, nil, nil) + assert.NoError(t, err, "failed to create the client") + + return client +} + +func TestGatherPrometheusTSDBStatus(t *testing.T) { + testCases := []struct { + name string + metricsClient *mockTSDBClient + wantRecords []record.Record + wantErrors []error + }{ + { + name: "get prometheus tsdb status", + metricsClient: &mockTSDBClient{data: []byte(`test`)}, + wantRecords: []record.Record{ + { + Name: "config/tsdb.json", + Item: marshal.RawByte(`test`), + }, + }, + wantErrors: nil, + }, + { + name: "fail to get prometheus tsdb status", + metricsClient: &mockTSDBClient{data: nil}, + wantRecords: nil, + wantErrors: []error{ + &errors.StatusError{ErrStatus: metav1.Status{ + Status: metav1.StatusFailure, + Message: "the server could not find the requested resource", + Reason: metav1.StatusReasonNotFound, + Details: &metav1.StatusDetails{ + Causes: []metav1.StatusCause{ + { + Type: metav1.CauseTypeUnexpectedServerResponse, + Message: "", + Field: "", + }, + }, + }, + Code: http.StatusNotFound, + }}, + }, + }, + } + for _, testCase := range testCases { + tc := testCase + t.Run(tc.name, func(t *testing.T) { + t.Parallel() + + records, errs := gatherPrometheusTSDBStatus(context.Background(), tc.metricsClient.RestClient(t)) + assert.Equal(t, tc.wantRecords, records) + assert.Equal(t, tc.wantErrors, errs) + }) + } +} diff --git a/pkg/gatherers/clusterconfig/sap_config.go b/pkg/gatherers/clusterconfig/gather_sap_config.go similarity index 100% rename from pkg/gatherers/clusterconfig/sap_config.go rename to pkg/gatherers/clusterconfig/gather_sap_config.go diff --git a/pkg/gatherers/clusterconfig/sap_config_test.go b/pkg/gatherers/clusterconfig/gather_sap_config_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/sap_config_test.go rename to pkg/gatherers/clusterconfig/gather_sap_config_test.go diff --git a/pkg/gatherers/clusterconfig/sap_datahubs.go b/pkg/gatherers/clusterconfig/gather_sap_datahubs.go similarity index 100% rename from pkg/gatherers/clusterconfig/sap_datahubs.go rename to pkg/gatherers/clusterconfig/gather_sap_datahubs.go diff --git a/pkg/gatherers/clusterconfig/sap_datahubs_test.go b/pkg/gatherers/clusterconfig/gather_sap_datahubs_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/sap_datahubs_test.go rename to pkg/gatherers/clusterconfig/gather_sap_datahubs_test.go diff --git a/pkg/gatherers/clusterconfig/sap_pods.go b/pkg/gatherers/clusterconfig/gather_sap_pods.go similarity index 100% rename from pkg/gatherers/clusterconfig/sap_pods.go rename to pkg/gatherers/clusterconfig/gather_sap_pods.go diff --git a/pkg/gatherers/clusterconfig/sap_pods_test.go b/pkg/gatherers/clusterconfig/gather_sap_pods_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/sap_pods_test.go rename to pkg/gatherers/clusterconfig/gather_sap_pods_test.go diff --git a/pkg/gatherers/clusterconfig/scheduler.go b/pkg/gatherers/clusterconfig/gather_schedulers.go similarity index 100% rename from pkg/gatherers/clusterconfig/scheduler.go rename to pkg/gatherers/clusterconfig/gather_schedulers.go diff --git a/pkg/gatherers/clusterconfig/service_accounts.go b/pkg/gatherers/clusterconfig/gather_service_accounts.go similarity index 100% rename from pkg/gatherers/clusterconfig/service_accounts.go rename to pkg/gatherers/clusterconfig/gather_service_accounts.go diff --git a/pkg/gatherers/clusterconfig/service_accounts_test.go b/pkg/gatherers/clusterconfig/gather_service_accounts_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/service_accounts_test.go rename to pkg/gatherers/clusterconfig/gather_service_accounts_test.go diff --git a/pkg/gatherers/clusterconfig/storage_cluster.go b/pkg/gatherers/clusterconfig/gather_storage_cluster.go similarity index 100% rename from pkg/gatherers/clusterconfig/storage_cluster.go rename to pkg/gatherers/clusterconfig/gather_storage_cluster.go diff --git a/pkg/gatherers/clusterconfig/storage_cluster_test.go b/pkg/gatherers/clusterconfig/gather_storage_cluster_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/storage_cluster_test.go rename to pkg/gatherers/clusterconfig/gather_storage_cluster_test.go diff --git a/pkg/gatherers/clusterconfig/support_secret.go b/pkg/gatherers/clusterconfig/gather_support_secret.go similarity index 100% rename from pkg/gatherers/clusterconfig/support_secret.go rename to pkg/gatherers/clusterconfig/gather_support_secret.go diff --git a/pkg/gatherers/clusterconfig/support_secret_test.go b/pkg/gatherers/clusterconfig/gather_support_secret_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/support_secret_test.go rename to pkg/gatherers/clusterconfig/gather_support_secret_test.go diff --git a/pkg/gatherers/clusterconfig/validatingwebhookconfigurations.go b/pkg/gatherers/clusterconfig/gather_validating_webhook_configurations.go similarity index 100% rename from pkg/gatherers/clusterconfig/validatingwebhookconfigurations.go rename to pkg/gatherers/clusterconfig/gather_validating_webhook_configurations.go diff --git a/pkg/gatherers/clusterconfig/validatingwebhookconfigurations_test.go b/pkg/gatherers/clusterconfig/gather_validating_webhook_configurations_test.go similarity index 100% rename from pkg/gatherers/clusterconfig/validatingwebhookconfigurations_test.go rename to pkg/gatherers/clusterconfig/gather_validating_webhook_configurations_test.go diff --git a/pkg/gatherers/workloads/workloads_info.go b/pkg/gatherers/workloads/gather_workloads_info.go similarity index 100% rename from pkg/gatherers/workloads/workloads_info.go rename to pkg/gatherers/workloads/gather_workloads_info.go diff --git a/pkg/gatherers/workloads/workloads_info_test.go b/pkg/gatherers/workloads/gather_workloads_info_test.go similarity index 100% rename from pkg/gatherers/workloads/workloads_info_test.go rename to pkg/gatherers/workloads/gather_workloads_info_test.go