@@ -49,7 +49,7 @@ func (c *webhookSupportabilityController) updateWebhookConfigurationDegraded(ctx
49
49
serviceMsgs = append (serviceMsgs , msg )
50
50
continue
51
51
}
52
- err = c .assertConnect (ctx , webhook .Service , webhook .CABundle )
52
+ err = c .assertConnect (ctx , webhook .Name , webhook . Service , webhook .CABundle )
53
53
if err != nil {
54
54
msg := fmt .Sprintf ("%s: %s" , webhook .Name , err )
55
55
if webhook .FailurePolicyIsIgnore {
@@ -94,7 +94,7 @@ func (c *webhookSupportabilityController) assertService(reference *serviceRefere
94
94
}
95
95
96
96
// assertConnect performs a dns lookup of service, opens a tcp connection, and performs a tls handshake.
97
- func (c * webhookSupportabilityController ) assertConnect (ctx context.Context , reference * serviceReference , caBundle []byte ) error {
97
+ func (c * webhookSupportabilityController ) assertConnect (ctx context.Context , webhookName string , reference * serviceReference , caBundle []byte ) error {
98
98
host := reference .Name + "." + reference .Namespace + ".svc"
99
99
port := "443"
100
100
if reference .Port != nil {
@@ -125,7 +125,7 @@ func (c *webhookSupportabilityController) assertConnect(ctx context.Context, ref
125
125
if err != nil {
126
126
if i != 2 {
127
127
// log err since only last one is reported
128
- runtime .HandleError (err )
128
+ runtime .HandleError (fmt . Errorf ( "%s: %v" , webhookName , err ) )
129
129
}
130
130
continue
131
131
}
0 commit comments