From a7908eefd7b585d4cb066bb6a0a67f1eda2fe249 Mon Sep 17 00:00:00 2001 From: LaurenceLiZhixin <382673304@qq.com> Date: Sun, 14 Mar 2021 15:29:13 +0800 Subject: [PATCH] fix: add liscense --- cluster/router/uniform/dubbo_rule.go | 19 ++++++++ cluster/router/uniform/factory_test.go | 2 +- cluster/router/uniform/k8s_api/k8s.go | 17 ++++++++ .../uniform/k8s_api/listener_handler_impl.go | 31 +++++++++++-- .../match_judger/attachment_match_judger.go | 17 ++++++++ .../uniform/match_judger/bool_match_judger.go | 17 ++++++++ .../match_judger/double_match_judger.go | 17 ++++++++ .../match_judger/double_range_match_judger.go | 17 ++++++++ .../match_judger/list_double_match_judger.go | 17 ++++++++ .../match_judger/list_string_match_judger.go | 17 ++++++++ .../match_judger/method_match_judger.go | 17 ++++++++ .../match_judger/string_match_judger.go | 22 +++++++++- .../match_judger/string_match_judger_test.go | 17 ++++++++ .../match_judger/url_label_match_judge.go | 17 ++++++++ cluster/router/uniform/router_chain.go | 29 ++++++++++++- cluster/router/uniform/uniform_route.go | 29 +------------ cluster/router/uniform/uniform_rule.go | 15 +++++-- remoting/k8sCRD/deploy/unifom_router_crd.yml | 43 +++++++++++++++++++ remoting/k8sCRD/deploy/virtualServiceCRD.yml | 21 --------- remoting/k8sCRD/register.go | 6 --- 20 files changed, 323 insertions(+), 64 deletions(-) create mode 100644 remoting/k8sCRD/deploy/unifom_router_crd.yml delete mode 100644 remoting/k8sCRD/deploy/virtualServiceCRD.yml delete mode 100644 remoting/k8sCRD/register.go diff --git a/cluster/router/uniform/dubbo_rule.go b/cluster/router/uniform/dubbo_rule.go index 789d32444..d15747763 100644 --- a/cluster/router/uniform/dubbo_rule.go +++ b/cluster/router/uniform/dubbo_rule.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package uniform import ( @@ -31,7 +48,9 @@ func (drr *DubboRouterRule) route(invokers []protocol.Invoker, url *common.URL, if resultInvokers = v.route(invokers, url, invocation); len(resultInvokers) == 0 { continue } + // once there is a uniformRule successfully get target invoker lists, return it return resultInvokers } + // return s empty invoker list return resultInvokers } diff --git a/cluster/router/uniform/factory_test.go b/cluster/router/uniform/factory_test.go index 28eb4524b..992ec4ad3 100644 --- a/cluster/router/uniform/factory_test.go +++ b/cluster/router/uniform/factory_test.go @@ -23,7 +23,7 @@ import ( ) // nolint -func TestHealthCheckRouteFactory(t *testing.T) { +func TestUniformRouterFacotry(t *testing.T) { factory := newUniformRouterFactory() assert.NotNil(t, factory) router, err := factory.NewPriorityRouter([]byte{}, []byte{}, make(chan struct{})) diff --git a/cluster/router/uniform/k8s_api/k8s.go b/cluster/router/uniform/k8s_api/k8s.go index 8942b918e..45ff1ab40 100644 --- a/cluster/router/uniform/k8s_api/k8s.go +++ b/cluster/router/uniform/k8s_api/k8s.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package k8s_api import ( diff --git a/cluster/router/uniform/k8s_api/listener_handler_impl.go b/cluster/router/uniform/k8s_api/listener_handler_impl.go index 0f8e1346f..6efc117c7 100644 --- a/cluster/router/uniform/k8s_api/listener_handler_impl.go +++ b/cluster/router/uniform/k8s_api/listener_handler_impl.go @@ -1,11 +1,27 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package k8s_api import ( "fmt" - dubboConfig "github.com/apache/dubbo-go/config" - "github.com/apache/dubbo-go/config_center" - "github.com/apache/dubbo-go/remoting" - "github.com/apache/dubbo-go/remoting/k8sCRD" +) + +import ( metav "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/watch" @@ -13,6 +29,13 @@ import ( "k8s.io/client-go/rest" ) +import ( + dubboConfig "github.com/apache/dubbo-go/config" + "github.com/apache/dubbo-go/config_center" + "github.com/apache/dubbo-go/remoting" + "github.com/apache/dubbo-go/remoting/k8sCRD" +) + const VirtualServiceEventKey = "virtualServiceEventKey" const DestinationRuleEventKey = "destinationRuleEventKe3y" diff --git a/cluster/router/uniform/match_judger/attachment_match_judger.go b/cluster/router/uniform/match_judger/attachment_match_judger.go index d9fb597c8..0c76cd8d5 100644 --- a/cluster/router/uniform/match_judger/attachment_match_judger.go +++ b/cluster/router/uniform/match_judger/attachment_match_judger.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package match_judger import ( diff --git a/cluster/router/uniform/match_judger/bool_match_judger.go b/cluster/router/uniform/match_judger/bool_match_judger.go index 3b4d4c54f..2b127b941 100644 --- a/cluster/router/uniform/match_judger/bool_match_judger.go +++ b/cluster/router/uniform/match_judger/bool_match_judger.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package match_judger import "github.com/apache/dubbo-go/config" diff --git a/cluster/router/uniform/match_judger/double_match_judger.go b/cluster/router/uniform/match_judger/double_match_judger.go index d64b3811c..b655e4747 100644 --- a/cluster/router/uniform/match_judger/double_match_judger.go +++ b/cluster/router/uniform/match_judger/double_match_judger.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package match_judger import ( diff --git a/cluster/router/uniform/match_judger/double_range_match_judger.go b/cluster/router/uniform/match_judger/double_range_match_judger.go index d6916d17b..a2af9b65d 100644 --- a/cluster/router/uniform/match_judger/double_range_match_judger.go +++ b/cluster/router/uniform/match_judger/double_range_match_judger.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package match_judger import ( diff --git a/cluster/router/uniform/match_judger/list_double_match_judger.go b/cluster/router/uniform/match_judger/list_double_match_judger.go index 011d71bd7..872c291f1 100644 --- a/cluster/router/uniform/match_judger/list_double_match_judger.go +++ b/cluster/router/uniform/match_judger/list_double_match_judger.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package match_judger import ( diff --git a/cluster/router/uniform/match_judger/list_string_match_judger.go b/cluster/router/uniform/match_judger/list_string_match_judger.go index 1bb8c3821..23e6a363e 100644 --- a/cluster/router/uniform/match_judger/list_string_match_judger.go +++ b/cluster/router/uniform/match_judger/list_string_match_judger.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package match_judger import ( diff --git a/cluster/router/uniform/match_judger/method_match_judger.go b/cluster/router/uniform/match_judger/method_match_judger.go index 7969c53d3..a87dde785 100644 --- a/cluster/router/uniform/match_judger/method_match_judger.go +++ b/cluster/router/uniform/match_judger/method_match_judger.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package match_judger import ( diff --git a/cluster/router/uniform/match_judger/string_match_judger.go b/cluster/router/uniform/match_judger/string_match_judger.go index e4cd0b6ad..d18c00b8b 100644 --- a/cluster/router/uniform/match_judger/string_match_judger.go +++ b/cluster/router/uniform/match_judger/string_match_judger.go @@ -1,11 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package match_judger import ( - "github.com/apache/dubbo-go/config" "regexp" "strings" ) +import ( + "github.com/apache/dubbo-go/config" +) + type StringMatchJudger struct { config.StringMatch } diff --git a/cluster/router/uniform/match_judger/string_match_judger_test.go b/cluster/router/uniform/match_judger/string_match_judger_test.go index 5538731c8..4f4f2d3e4 100644 --- a/cluster/router/uniform/match_judger/string_match_judger_test.go +++ b/cluster/router/uniform/match_judger/string_match_judger_test.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package match_judger import "testing" diff --git a/cluster/router/uniform/match_judger/url_label_match_judge.go b/cluster/router/uniform/match_judger/url_label_match_judge.go index b47b91016..c92e724bf 100644 --- a/cluster/router/uniform/match_judger/url_label_match_judge.go +++ b/cluster/router/uniform/match_judger/url_label_match_judge.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package match_judger import ( diff --git a/cluster/router/uniform/router_chain.go b/cluster/router/uniform/router_chain.go index 054bf9663..436fb0e36 100644 --- a/cluster/router/uniform/router_chain.go +++ b/cluster/router/uniform/router_chain.go @@ -1,3 +1,20 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package uniform import ( @@ -17,6 +34,8 @@ import ( "strings" ) +// RouterChain contains all uniform router logic +// it has UniformRouter list, type RouterChain struct { routers []*UniformRouter virtualServiceConfigBytes []byte @@ -24,6 +43,7 @@ type RouterChain struct { notify chan struct{} } +// NewUniformRouterChain return func NewUniformRouterChain(virtualServiceConfig, destinationRuleConfig []byte, notify chan struct{}) (router.PriorityRouter, error) { uniformRouters := make([]*UniformRouter, 0) var err error @@ -48,6 +68,7 @@ func NewUniformRouterChain(virtualServiceConfig, destinationRuleConfig []byte, n return r, nil } +// Route route invokers using RouterChain's routers one by one func (r *RouterChain) Route(invokers []protocol.Invoker, url *common.URL, invocation protocol.Invocation) []protocol.Invoker { for _, v := range r.routers { invokers = v.Route(invokers, url, invocation) @@ -151,7 +172,7 @@ func (r *RouterChain) URL() *common.URL { return nil } -// parseFromConfigToRouters file -> routers +// parseFromConfigToRouters parse virtualService and destinationRule yaml file bytes to target router list func parseFromConfigToRouters(virtualServiceConfig, destinationRuleConfig []byte, notify chan struct{}) ([]*UniformRouter, error) { var virtualServiceConfigList []*config.VirtualServiceConfig destRuleConfigsMap := make(map[string]map[string]map[string]string) @@ -220,3 +241,9 @@ func parseFromConfigToRouters(virtualServiceConfig, destinationRuleConfig []byte logger.Debug("parsed successed! with router size = ", len(routers)) return routers, nil } + +func mapCombine(dist map[string]map[string]string, from map[string]map[string]string) { + for k, v := range from { + dist[k] = v + } +} diff --git a/cluster/router/uniform/uniform_route.go b/cluster/router/uniform/uniform_route.go index 2bc03d308..20d38e375 100644 --- a/cluster/router/uniform/uniform_route.go +++ b/cluster/router/uniform/uniform_route.go @@ -22,7 +22,6 @@ import ( ) import ( - "github.com/apache/dubbo-go/cluster/router" "github.com/apache/dubbo-go/common" "github.com/apache/dubbo-go/protocol" ) @@ -31,18 +30,12 @@ const ( name = "uniform-router" ) -// UniformRouter provides a health-first routing mechanism through ConnChecker +// UniformRouter have type UniformRouter struct { dubboRouter *DubboRouterRule notify chan struct{} } -func mapCombine(dist map[string]map[string]string, from map[string]map[string]string) { - for k, v := range from { - dist[k] = v - } -} - // NewUniformRouter construct an NewConnCheckRouter via url func NewUniformRouter(dubboRouter *DubboRouterRule, notify chan struct{}) (*UniformRouter, error) { r := &UniformRouter{ @@ -57,26 +50,8 @@ func (r *UniformRouter) Route(invokers []protocol.Invoker, url *common.URL, invo return r.dubboRouter.route(invokers, url, invocation) } +// Process there is no process needs for uniform Router, as it upper struct RouterChain has done it func (r *UniformRouter) Process(event *config_center.ConfigChangeEvent) { - // todo deal with router change - -} - -// Pool separates healthy invokers from others. -func (r *UniformRouter) Pool(invokers []protocol.Invoker) (router.AddrPool, router.AddrMetadata) { - rb := make(router.AddrPool, 8) - //rb[uniformSelected] = roaring.NewBitmap() - //for i, invoker := range invokers { - // if r.checker.IsConnHealthy(invoker) { - // rb[connHealthy].Add(uint32(i)) - // } - //} - return rb, nil -} - -// ShouldPool will always return true to make sure healthy check constantly. -func (r *UniformRouter) ShouldPool() bool { - return true } // Name get name of ConnCheckerRouter diff --git a/cluster/router/uniform/uniform_rule.go b/cluster/router/uniform/uniform_rule.go index cd0667f5b..5d2e15f78 100644 --- a/cluster/router/uniform/uniform_rule.go +++ b/cluster/router/uniform/uniform_rule.go @@ -19,12 +19,18 @@ package uniform import ( "fmt" +) + +import ( + perrors "github.com/pkg/errors" +) + +import ( "github.com/apache/dubbo-go/cluster/router/uniform/match_judger" "github.com/apache/dubbo-go/common" "github.com/apache/dubbo-go/common/logger" "github.com/apache/dubbo-go/config" "github.com/apache/dubbo-go/protocol" - perrors "github.com/pkg/errors" ) // VirtualServiceRule is item of virtual service, it aims at judge if invocation context match it's condition, and @@ -146,7 +152,6 @@ func (vsr *VirtualServiceRule) getRuleTargetInvokers(invokers []protocol.Invoker for _, v := range resultInvokersMap { invokerList = append(invokerList, v) } - // todo return invokerList, nil } @@ -180,17 +185,21 @@ func (u *UniformRule) route(invokers []protocol.Invoker, url *common.URL, invoca resultInvokers := make([]protocol.Invoker, 0) matchService := false for _, v := range u.services { + // check if match service field if match_judger.NewStringMatchJudger(v).Judge(url.ServiceKey()) { matchService = true break } } if !matchService { + // if not match, jump this rule return resultInvokers } - // route Details level match + // match service field, route Details level(service level) match + // then, check all sub rule, if match, get destination rule target invokers, else do fail back logic for _, rule := range u.virtualServiceRules { if rule.match(url, invocation) { + // match this rule, do get target logic resultInvokers, err := rule.getRuleTargetInvokers(invokers) if err != nil { logger.Error("getRuleTargetInvokers from rule err = ", err) diff --git a/remoting/k8sCRD/deploy/unifom_router_crd.yml b/remoting/k8sCRD/deploy/unifom_router_crd.yml new file mode 100644 index 000000000..9acc7d787 --- /dev/null +++ b/remoting/k8sCRD/deploy/unifom_router_crd.yml @@ -0,0 +1,43 @@ +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + name: "virtualservices.service.dubbo.apache.org" +spec: + group: "service.dubbo.apache.org" + versions: + - name: "v1alpha1" + served: true + storage: true + schema: + openAPIV3Schema: + type: object + properties: + spec: + type: object + scope: "Namespaced" + names: + plural: "virtualservices" + singular: "virtualservice" + kind: "VirtualService" +--- +apiVersion: "apiextensions.k8s.io/v1" +kind: "CustomResourceDefinition" +metadata: + name: "destinationrules.service.dubbo.apache.org" +spec: + group: "service.dubbo.apache.org" + versions: + - name: "v1alpha1" + served: true + storage: true + schema: + openAPIV3Schema: + type: object + properties: + spec: + type: object + scope: "Namespaced" + names: + plural: "destinationrules" + singular: "destinationrule" + kind: "DestinationRule" \ No newline at end of file diff --git a/remoting/k8sCRD/deploy/virtualServiceCRD.yml b/remoting/k8sCRD/deploy/virtualServiceCRD.yml deleted file mode 100644 index 5ea0af6da..000000000 --- a/remoting/k8sCRD/deploy/virtualServiceCRD.yml +++ /dev/null @@ -1,21 +0,0 @@ -apiVersion: "apiextensions.k8sCRD.io/v1" -kind: "CustomResourceDefinition" -metadata: - name: "virtualservices.service.dubbo.apache.org" -spec: - group: "service.dubbo.apache.org" - versions: - - name: "v1alpha1" - served: true - storage: true - schema: - openAPIV3Schema: - type: object - properties: - spec: - type: object - scope: "Namespaced" - names: - plural: "virtualservices" - singular: "virtualservice" - kind: "VirtualService" \ No newline at end of file diff --git a/remoting/k8sCRD/register.go b/remoting/k8sCRD/register.go deleted file mode 100644 index 57d2e667d..000000000 --- a/remoting/k8sCRD/register.go +++ /dev/null @@ -1,6 +0,0 @@ -package k8sCRD - -//const GroupName = "service.dubbo.apache.org" -//const GroupVersion = "v1alpha1" -//const Resource = "virtualservices" -//const Namespace = "dubbo-workplace" -- GitLab