gxthrj commented on a change in pull request #715:
URL:
https://github.com/apache/apisix-ingress-controller/pull/715#discussion_r736471547
##########
File path: pkg/config/config.go
##########
@@ -191,3 +197,18 @@ func purifyAppNamespaces(namespaces []string) []string {
}
return ultimate
}
+
+func (cfg *Config) verifyNamespaceSelector() (bool, error) {
+ labels := cfg.Kubernetes.NamespaceSelector
+ // default is [""]
+ if len(labels) == 1 && labels[0] == "" {
+ cfg.Kubernetes.NamespaceSelector = []string{}
+ }
+
+ for _, s := range cfg.Kubernetes.NamespaceSelector {
+ if len(strings.Split(s, "=")) != 2 {
Review comment:
I just found out that there are strict rules here, and will be checked
according to this rule:
https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#syntax-and-character-set
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]