File tree Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Expand file tree Collapse file tree 2 files changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,11 @@ func DescribeAutoscalerRunner() rosa.CommandRunner {
62
62
if output .HasFlag () {
63
63
output .Print (autoscaler )
64
64
} else {
65
- fmt .Print (clusterautoscaler .PrintAutoscaler (autoscaler ))
65
+ if cluster .Hypershift ().Enabled () {
66
+ fmt .Print (clusterautoscaler .PrintHypershiftAutoscaler (autoscaler ))
67
+ } else {
68
+ fmt .Print (clusterautoscaler .PrintAutoscaler (autoscaler ))
69
+ }
66
70
}
67
71
return nil
68
72
}
Original file line number Diff line number Diff line change @@ -87,3 +87,25 @@ func PrintAutoscaler(a *cmv1.ClusterAutoscaler) string {
87
87
88
88
return out
89
89
}
90
+
91
+ func PrintHypershiftAutoscaler (a * cmv1.ClusterAutoscaler ) string {
92
+
93
+ out := "\n "
94
+
95
+ if a .MaxNodeProvisionTime () != "" {
96
+ out += fmt .Sprintf ("Maximum Node Provision Time: %s\n " ,
97
+ a .MaxNodeProvisionTime ())
98
+ }
99
+
100
+ out += fmt .Sprintf ("Maximum Pod Grace Period: %d\n " ,
101
+ a .MaxPodGracePeriod ())
102
+ out += fmt .Sprintf ("Pod Priority Threshold: %d\n " ,
103
+ a .PodPriorityThreshold ())
104
+
105
+ //Resource Limits
106
+ out += "Resource Limits:\n "
107
+ out += fmt .Sprintf (" - Maximum Nodes: %d\n " ,
108
+ a .ResourceLimits ().MaxNodesTotal ())
109
+
110
+ return out
111
+ }
You can’t perform that action at this time.
0 commit comments