mirror of
https://github.com/alibaba/higress.git
synced 2026-06-09 12:47:28 +08:00
Support nacos discovery (#108)
This commit is contained in:
@@ -28,9 +28,20 @@ import (
|
||||
v1 "k8s.io/api/core/v1"
|
||||
"k8s.io/apimachinery/pkg/util/version"
|
||||
|
||||
netv1 "github.com/alibaba/higress/client/pkg/apis/networking/v1"
|
||||
. "github.com/alibaba/higress/pkg/ingress/log"
|
||||
)
|
||||
|
||||
func ValidateBackendResource(resource *v1.TypedLocalObjectReference) bool {
|
||||
if resource == nil || resource.APIGroup == nil ||
|
||||
*resource.APIGroup != netv1.SchemeGroupVersion.Group ||
|
||||
resource.Kind != "McpBridge" || resource.Name != "default" {
|
||||
IngressLog.Warnf("invalid mcpbridge resource: %v", resource)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
// V1Available check if the "networking/v1" Ingress is available.
|
||||
func V1Available(client kube.Client) bool {
|
||||
// check kubernetes version to use new ingress package or not
|
||||
|
||||
Reference in New Issue
Block a user