From 64dc4c4c56627308c1054f41fc42698f6c269a58 Mon Sep 17 00:00:00 2001 From: Aneesh Puttur Date: Thu, 9 May 2024 11:58:55 -0400 Subject: [PATCH] alow profile name with under score and hyper Signed-off-by: Aneesh Puttur --- api/v1/ptpconfig_webhook.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/v1/ptpconfig_webhook.go b/api/v1/ptpconfig_webhook.go index f9d2027f2..23109c034 100644 --- a/api/v1/ptpconfig_webhook.go +++ b/api/v1/ptpconfig_webhook.go @@ -40,7 +40,7 @@ const ( // log is for logging in this package. var ptpconfiglog = logf.Log.WithName("ptpconfig-resource") -var profileRegEx = regexp.MustCompile(`^(\w+)(,\s*([\w-_]+))`) +var profileRegEx = regexp.MustCompile(`^([\w\-_]+)(,\s*([\w\-_]+))*$`) func (r *PtpConfig) SetupWebhookWithManager(mgr ctrl.Manager) error { return ctrl.NewWebhookManagedBy(mgr).