@@ -714,29 +714,29 @@ func (a *OllamaAgent) autoDetectFileForAnalyzer(bundle *analyzer.SupportBundle,
714714 }
715715 }
716716 }
717-
717+
718718 case "crd" , "customResourceDefinition" :
719719 // CRD analyzers - look for custom resource files
720720 if traditionalAnalyzer , ok := spec .Config ["analyzer" ]; ok {
721721 if crdAnalyzer , ok := traditionalAnalyzer .(* troubleshootv1beta2.CustomResourceDefinition ); ok {
722722 // Look for specific CRD name in custom-resources directory
723723 crdName := crdAnalyzer .CustomResourceDefinitionName
724724 for path , data := range bundle .Files {
725- if strings .Contains (path , "custom-resources" ) &&
726- (strings .Contains (strings .ToLower (path ), strings .ToLower (crdName )) ||
727- strings .Contains (strings .ToLower (path ), "crd" )) {
725+ if strings .Contains (path , "custom-resources" ) &&
726+ (strings .Contains (strings .ToLower (path ), strings .ToLower (crdName )) ||
727+ strings .Contains (strings .ToLower (path ), "crd" )) {
728728 return path , data , true
729729 }
730730 }
731731 }
732732 }
733-
733+
734734 case "container-runtime" :
735735 // Container runtime analyzers - look for node information
736736 if data , exists := bundle .Files ["cluster-resources/nodes.json" ]; exists {
737737 return "cluster-resources/nodes.json" , data , true
738738 }
739-
739+
740740 case "distribution" :
741741 // Distribution analyzers - primarily use node information
742742 if data , exists := bundle .Files ["cluster-resources/nodes.json" ]; exists {
@@ -746,103 +746,103 @@ func (a *OllamaAgent) autoDetectFileForAnalyzer(bundle *analyzer.SupportBundle,
746746 if data , exists := bundle .Files ["cluster-info/cluster_version.json" ]; exists {
747747 return "cluster-info/cluster_version.json" , data , true
748748 }
749-
749+
750750 case "storage-class" :
751751 // Storage class analyzers - look for storage class resources
752752 for path , data := range bundle .Files {
753753 if strings .Contains (path , "storage" ) && strings .HasSuffix (path , ".json" ) {
754754 return path , data , true
755755 }
756756 }
757-
757+
758758 case "ingress" :
759759 // Ingress analyzers - look for ingress resources
760760 for path , data := range bundle .Files {
761761 if strings .Contains (path , "ingress" ) && strings .HasSuffix (path , ".json" ) {
762762 return path , data , true
763763 }
764764 }
765-
765+
766766 case "http" :
767767 // HTTP analyzers can work with any network-related data
768768 for path , data := range bundle .Files {
769769 if strings .Contains (path , "services" ) || strings .Contains (path , "ingress" ) {
770770 return path , data , true
771771 }
772772 }
773-
773+
774774 case "job-status" :
775775 // Job analyzers - look for job resources
776776 for path , data := range bundle .Files {
777777 if strings .Contains (path , "jobs" ) && strings .HasSuffix (path , ".json" ) {
778778 return path , data , true
779779 }
780780 }
781-
781+
782782 case "statefulset-status" :
783783 // StatefulSet analyzers
784784 for path , data := range bundle .Files {
785785 if strings .Contains (path , "statefulsets" ) && strings .HasSuffix (path , ".json" ) {
786786 return path , data , true
787787 }
788788 }
789-
789+
790790 case "replicaset-status" :
791791 // ReplicaSet analyzers
792792 for path , data := range bundle .Files {
793793 if strings .Contains (path , "replicasets" ) && strings .HasSuffix (path , ".json" ) {
794794 return path , data , true
795795 }
796796 }
797-
797+
798798 case "cluster-pod-statuses" :
799799 // Pod status analyzers
800800 for path , data := range bundle .Files {
801801 if strings .Contains (path , "pods" ) && strings .HasSuffix (path , ".json" ) {
802802 return path , data , true
803803 }
804804 }
805-
805+
806806 case "image-pull-secret" :
807807 // Image pull secret analyzers
808808 for path , data := range bundle .Files {
809809 if strings .Contains (path , "secrets" ) && strings .HasSuffix (path , ".json" ) {
810810 return path , data , true
811811 }
812812 }
813-
813+
814814 case "yaml-compare" , "json-compare" :
815815 // Comparison analyzers - can work with any structured data
816816 for path , data := range bundle .Files {
817817 if strings .HasSuffix (path , ".json" ) || strings .HasSuffix (path , ".yaml" ) {
818818 return path , data , true
819819 }
820820 }
821-
821+
822822 case "certificates" :
823823 // Certificate analyzers
824824 for path , data := range bundle .Files {
825825 if strings .Contains (path , "cert" ) || strings .Contains (path , "tls" ) {
826826 return path , data , true
827827 }
828828 }
829-
829+
830830 case "velero" , "longhorn" , "ceph-status" :
831831 // Storage system analyzers
832832 for path , data := range bundle .Files {
833833 if strings .Contains (strings .ToLower (path ), spec .Name ) {
834834 return path , data , true
835835 }
836836 }
837-
837+
838838 case "sysctl" , "goldpinger" , "weave-report" , "registry-images" :
839839 // Infrastructure analyzers
840840 for path , data := range bundle .Files {
841841 if strings .Contains (strings .ToLower (path ), strings .ToLower (spec .Name )) {
842842 return path , data , true
843843 }
844844 }
845-
845+
846846 case "cluster-resource" :
847847 // Generic cluster resource analyzer - can work with any cluster data
848848 if data , exists := bundle .Files ["cluster-resources/nodes.json" ]; exists {
0 commit comments