@@ -392,6 +392,9 @@ func Test_nodeMatchesFilters(t *testing.T) {
392392 },
393393 },
394394 Status : corev1.NodeStatus {
395+ NodeInfo : corev1.NodeSystemInfo {
396+ Architecture : "amd64" ,
397+ },
395398 Capacity : corev1.ResourceList {
396399 "attachable-volumes-aws-ebs" : resource .MustParse ("25" ),
397400 "cpu" : resource .MustParse ("2" ),
@@ -438,6 +441,22 @@ func Test_nodeMatchesFilters(t *testing.T) {
438441 },
439442 expectResult : false ,
440443 },
444+ {
445+ name : "true when cpu arch is amd64" ,
446+ node : node ,
447+ filters : & troubleshootv1beta2.NodeResourceFilters {
448+ Architecture : "amd64" ,
449+ },
450+ expectResult : true ,
451+ },
452+ {
453+ name : "false when cpu arch is not amd64" ,
454+ node : node ,
455+ filters : & troubleshootv1beta2.NodeResourceFilters {
456+ Architecture : "armhf" ,
457+ },
458+ expectResult : false ,
459+ },
441460 {
442461 name : "true when allocatable memory is available" ,
443462 node : node ,
@@ -709,6 +728,43 @@ func Test_analyzeNodeResources(t *testing.T) {
709728 IconURI : "https://troubleshoot.sh/images/analyzer-icons/node-resources.svg?w=16&h=18" ,
710729 },
711730 },
731+ {
732+ name : "at least 8 cores on amd64" , // filter for a node with enough amd64 cores
733+ analyzer : & troubleshootv1beta2.NodeResources {
734+ AnalyzeMeta : troubleshootv1beta2.AnalyzeMeta {
735+ CheckName : "amd64-exists" ,
736+ },
737+ Outcomes : []* troubleshootv1beta2.Outcome {
738+ {
739+ Fail : & troubleshootv1beta2.SingleOutcome {
740+ When : "max(cpuCapacity) < 8" ,
741+ Message : "There isn't a node with 8 or more cores on amd64 arch" ,
742+ URI : "" ,
743+ },
744+ },
745+ {
746+ Pass : & troubleshootv1beta2.SingleOutcome {
747+ When : "max(cpuCapacity) >= 8" ,
748+ Message : "There is a node with at least 8 cores on amd64 arch" ,
749+ URI : "" ,
750+ },
751+ },
752+ },
753+ Filters : & troubleshootv1beta2.NodeResourceFilters {
754+ Architecture : "amd64" ,
755+ },
756+ },
757+ want : & AnalyzeResult {
758+ IsPass : true ,
759+ IsFail : false ,
760+ IsWarn : false ,
761+ Title : "amd64-exists" ,
762+ Message : "There is a node with at least 8 cores on amd64 arch" ,
763+ URI : "" ,
764+ IconKey : "kubernetes_node_resources" ,
765+ IconURI : "https://troubleshoot.sh/images/analyzer-icons/node-resources.svg?w=16&h=18" ,
766+ },
767+ },
712768 {
713769 name : "unfiltered CPU totals" ,
714770 analyzer : & troubleshootv1beta2.NodeResources {
0 commit comments