From 8d0a593fa7bcfe06c151df38cce761484d1d0d5e Mon Sep 17 00:00:00 2001 From: Peter Matseykanets Date: Wed, 16 Oct 2024 14:49:45 -0400 Subject: [PATCH] Use Namespaced scope for ClusterAuthToken validator (#522) Ref: https://github.com/rancher/rancher/issues/45732 --- .../cluster.cattle.io/v3/clusterauthtoken/validator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/resources/cluster.cattle.io/v3/clusterauthtoken/validator.go b/pkg/resources/cluster.cattle.io/v3/clusterauthtoken/validator.go index e84f002f0..9001c18f4 100644 --- a/pkg/resources/cluster.cattle.io/v3/clusterauthtoken/validator.go +++ b/pkg/resources/cluster.cattle.io/v3/clusterauthtoken/validator.go @@ -44,7 +44,7 @@ func (v *Validator) Operations() []admissionregistrationv1.OperationType { // ValidatingWebhook returns the ValidatingWebhook. func (v *Validator) ValidatingWebhook(clientConfig admissionregistrationv1.WebhookClientConfig) []admissionregistrationv1.ValidatingWebhook { return []admissionregistrationv1.ValidatingWebhook{ - *admission.NewDefaultValidatingWebhook(v, clientConfig, admissionregistrationv1.ClusterScope, v.Operations()), + *admission.NewDefaultValidatingWebhook(v, clientConfig, admissionregistrationv1.NamespacedScope, v.Operations()), } }