From 77d5b5fd86f3618ec3246ca9b1dcb7804f4f5c12 Mon Sep 17 00:00:00 2001
From: Ian McGraw
Date: Fri, 12 Aug 2022 19:25:12 +0200
Subject: [PATCH] fix watch namespace regex
Signed-off-by: Ian McGraw
---
pkg/apis/clickhouse.altinity.com/v1/type_config_chop.go | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pkg/apis/clickhouse.altinity.com/v1/type_config_chop.go b/pkg/apis/clickhouse.altinity.com/v1/type_config_chop.go
index 1a0815e5d..25dfef208 100644
--- a/pkg/apis/clickhouse.altinity.com/v1/type_config_chop.go
+++ b/pkg/apis/clickhouse.altinity.com/v1/type_config_chop.go
@@ -854,7 +854,7 @@ func (c *OperatorConfig) GetInformerNamespace() string {
// This contradicts current implementation of multiple namespaces in config's watchNamespaces field,
// but k8s has possibility to specify one/all namespaces only, no 'multiple namespaces' option
- var labelRegexp = regexp.MustCompile("^[a-z]([-a-z0-9]*[a-z0-9])?$")
+ var labelRegexp = regexp.MustCompile("^[a-z0-9]([-a-z0-9]*[a-z0-9])?$")
if labelRegexp.MatchString(c.Watch.Namespaces[0]) {
namespace = c.Watch.Namespaces[0]
}