@@ -71,7 +71,7 @@ controller_runtime_webhook_panics_total 0
71
71
wantErr : "1 panics occurred in \" cluster\" controller (check logs for more details)" ,
72
72
},
73
73
{
74
- name : "panic occurred in webhook " ,
74
+ name : "panic occurred in webhooks " ,
75
75
data : []byte (`
76
76
# HELP controller_runtime_max_concurrent_reconciles Maximum number of concurrent reconciles per controller
77
77
# TYPE controller_runtime_max_concurrent_reconciles gauge
@@ -84,9 +84,32 @@ controller_runtime_reconcile_panics_total{controller="clusterclass"} 0
84
84
# HELP controller_runtime_webhook_panics_total Total number of webhook panics
85
85
# TYPE controller_runtime_webhook_panics_total counter
86
86
controller_runtime_webhook_panics_total 1
87
+ # HELP controller_runtime_conversion_webhook_panics_total Total number of conversion webhook panics
88
+ # TYPE controller_runtime_conversion_webhook_panics_total counter
89
+ controller_runtime_conversion_webhook_panics_total 0
87
90
` ),
88
91
wantErr : "1 panics occurred in webhooks (check logs for more details)" ,
89
92
},
93
+ {
94
+ name : "panics occurred in conversion webhooks" ,
95
+ data : []byte (`
96
+ # HELP controller_runtime_max_concurrent_reconciles Maximum number of concurrent reconciles per controller
97
+ # TYPE controller_runtime_max_concurrent_reconciles gauge
98
+ controller_runtime_max_concurrent_reconciles{controller="cluster"} 10
99
+ controller_runtime_max_concurrent_reconciles{controller="clusterclass"} 10
100
+ # HELP controller_runtime_reconcile_panics_total Total number of reconciliation panics per controller
101
+ # TYPE controller_runtime_reconcile_panics_total counter
102
+ controller_runtime_reconcile_panics_total{controller="cluster"} 0
103
+ controller_runtime_reconcile_panics_total{controller="clusterclass"} 0
104
+ # HELP controller_runtime_webhook_panics_total Total number of webhook panics
105
+ # TYPE controller_runtime_webhook_panics_total counter
106
+ controller_runtime_webhook_panics_total 0
107
+ # HELP controller_runtime_conversion_webhook_panics_total Total number of conversion webhook panics
108
+ # TYPE controller_runtime_conversion_webhook_panics_total counter
109
+ controller_runtime_conversion_webhook_panics_total 2
110
+ ` ),
111
+ wantErr : "2 panics occurred in conversion webhooks (check logs for more details)" ,
112
+ },
90
113
}
91
114
for _ , tt := range tests {
92
115
t .Run (tt .name , func (t * testing.T ) {
0 commit comments