in controller/webhook.go [263:284]
func (whsvr *WebhookServer) getUpstreamEndpointParameters(nsLabels map[string]string, podMetadata *metav1.ObjectMeta) (string, string, string) {
annotations := podMetadata.GetAnnotations()
if annotations == nil {
annotations = map[string]string{}
}
host := annotations[signingProxyWebhookAnnotationHostKey]
var labelInject bool
if strings.TrimSpace(host) == "" {
labelInject = true
host = nsLabels[signingProxyWebhookLabelHostKey]
}
if labelInject {
return extractParameters(host, nsLabels[signingProxyWebhookLabelNameKey], nsLabels[signingProxyWebhookLabelRegionKey])
}
return extractParameters(host, annotations[signingProxyWebhookAnnotationNameKey], annotations[signingProxyWebhookAnnotationRegionKey])
}