You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "MasterKenway (via GitHub)" <gi...@apache.org> on 2023/05/21 08:57:30 UTC

[GitHub] [dubbo-go-pixiu] MasterKenway opened a new pull request, #540: Control Panel: Feat/service metadata

MasterKenway opened a new pull request, #540:
URL: https://github.com/apache/dubbo-go-pixiu/pull/540

   (no comment)


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] codecov-commenter commented on pull request #540: Control Panel: Feat/service metadata

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #540:
URL: https://github.com/apache/dubbo-go-pixiu/pull/540#issuecomment-1575363231

   ## [Codecov](https://app.codecov.io/gh/apache/dubbo-go-pixiu/pull/540?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   > Merging [#540](https://app.codecov.io/gh/apache/dubbo-go-pixiu/pull/540?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (2e371cb) into [develop](https://app.codecov.io/gh/apache/dubbo-go-pixiu/commit/d3ee6747bf75e36d328138c0fc42d91d42891d81?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (d3ee674) will **decrease** coverage by `0.16%`.
   > The diff coverage is `21.23%`.
   
   > :exclamation: Current head 2e371cb differs from pull request most recent head ebac3e1. Consider uploading reports for the commit ebac3e1 to get more accurate results
   
   ```diff
   @@             Coverage Diff             @@
   ##           develop     #540      +/-   ##
   ===========================================
   - Coverage    54.78%   54.63%   -0.16%     
   ===========================================
     Files          669      671       +2     
     Lines        78323    78615     +292     
   ===========================================
   + Hits         42912    42954      +42     
   - Misses       31750    31994     +244     
   - Partials      3661     3667       +6     
   ```
   
   
   | [Impacted Files](https://app.codecov.io/gh/apache/dubbo-go-pixiu/pull/540?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [...perator/pkg/apis/istio/v1alpha1/values\_types.pb.go](https://app.codecov.io/gh/apache/dubbo-go-pixiu/pull/540?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-b3BlcmF0b3IvcGtnL2FwaXMvaXN0aW8vdjFhbHBoYTEvdmFsdWVzX3R5cGVzLnBiLmdv) | `0.78% <ø> (ø)` | |
   | [...ot/pkg/networking/dubbo/v1alpha1/debouncehelper.go](https://app.codecov.io/gh/apache/dubbo-go-pixiu/pull/540?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlsb3QvcGtnL25ldHdvcmtpbmcvZHViYm8vdjFhbHBoYTEvZGVib3VuY2VoZWxwZXIuZ28=) | `0.00% <0.00%> (ø)` | |
   | [...networking/dubbo/v1alpha1/servicemetadataserver.go](https://app.codecov.io/gh/apache/dubbo-go-pixiu/pull/540?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlsb3QvcGtnL25ldHdvcmtpbmcvZHViYm8vdjFhbHBoYTEvc2VydmljZW1ldGFkYXRhc2VydmVyLmdv) | `0.00% <0.00%> (ø)` | |
   | [pilot/pkg/model/push\_context.go](https://app.codecov.io/gh/apache/dubbo-go-pixiu/pull/540?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlsb3QvcGtnL21vZGVsL3B1c2hfY29udGV4dC5nbw==) | `56.68% <44.82%> (-0.36%)` | :arrow_down: |
   | [pilot/pkg/config/kube/crdclient/types.gen.go](https://app.codecov.io/gh/apache/dubbo-go-pixiu/pull/540?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlsb3QvcGtnL2NvbmZpZy9rdWJlL2NyZGNsaWVudC90eXBlcy5nZW4uZ28=) | `80.17% <95.74%> (+0.61%)` | :arrow_up: |
   | [pilot/pkg/bootstrap/server.go](https://app.codecov.io/gh/apache/dubbo-go-pixiu/pull/540?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlsb3QvcGtnL2Jvb3RzdHJhcC9zZXJ2ZXIuZ28=) | `54.76% <100.00%> (+1.01%)` | :arrow_up: |
   
   ... and [16 files with indirect coverage changes](https://app.codecov.io/gh/apache/dubbo-go-pixiu/pull/540/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] mark4z commented on pull request #540: Control Panel: Feat/service metadata

Posted by "mark4z (via GitHub)" <gi...@apache.org>.
mark4z commented on PR #540:
URL: https://github.com/apache/dubbo-go-pixiu/pull/540#issuecomment-1537424794

   https://github.com/dubbo-go-pixiu/operator-api/pull/2


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] mark4z commented on pull request #540: Control Panel: Feat/service metadata

Posted by "mark4z (via GitHub)" <gi...@apache.org>.
mark4z commented on PR #540:
URL: https://github.com/apache/dubbo-go-pixiu/pull/540#issuecomment-1575388316

   是不是没有添加cluster role?


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] sonarcloud[bot] commented on pull request #540: Control Panel: Feat/service metadata

Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #540:
URL: https://github.com/apache/dubbo-go-pixiu/pull/540#issuecomment-1575359726

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_dubbo-go-pixiu&pullRequest=540)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL)
   
   [![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540) No Coverage information  
   [![1.4%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '1.4%')](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540&metric=new_duplicated_lines_density&view=list) [1.4% Duplication](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540&metric=new_duplicated_lines_density&view=list)
   
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] mark4z commented on a diff in pull request #540: Control Panel: Feat/service metadata

Posted by "mark4z (via GitHub)" <gi...@apache.org>.
mark4z commented on code in PR #540:
URL: https://github.com/apache/dubbo-go-pixiu/pull/540#discussion_r1216185006


##########
pilot/pkg/bootstrap/server.go:
##########
@@ -277,6 +280,10 @@ func NewServer(args *PilotArgs, initFuncs ...func(*Server)) (*Server, error) {
 		return nil, err
 	}
 
+	if s.kubeClient != nil {
+		s.metadataServer = dubbov1alpha1.NewServiceMetadataServer(s.environment, s.kubeClient)

Review Comment:
   这个不需要传入env的



-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] sonarcloud[bot] commented on pull request #540: Control Panel: Feat/service metadata

Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #540:
URL: https://github.com/apache/dubbo-go-pixiu/pull/540#issuecomment-1575362702

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_dubbo-go-pixiu&pullRequest=540)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL)
   
   [![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540) No Coverage information  
   [![1.4%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '1.4%')](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540&metric=new_duplicated_lines_density&view=list) [1.4% Duplication](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540&metric=new_duplicated_lines_density&view=list)
   
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] mark4z commented on a diff in pull request #540: Control Panel: Feat/service metadata

Posted by "mark4z (via GitHub)" <gi...@apache.org>.
mark4z commented on code in PR #540:
URL: https://github.com/apache/dubbo-go-pixiu/pull/540#discussion_r1216270504


##########
pilot/pkg/networking/dubbo/v1alpha1/servicemetadataserver.go:
##########
@@ -0,0 +1,302 @@
+/*
+ * 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 v1alpha1
+
+import (
+	"context"
+	"fmt"
+	"strconv"
+	"time"
+)
+
+import (
+	"github.com/pkg/errors"
+	"go.uber.org/atomic"
+	"google.golang.org/grpc"
+	"google.golang.org/grpc/codes"
+	"google.golang.org/grpc/status"
+	dubbov1alpha1 "istio.io/api/dubbo/v1alpha1"
+	istioextensionsv1alpha1 "istio.io/api/extensions/v1alpha1"
+	"istio.io/client-go/pkg/apis/extensions/v1alpha1"
+	apierror "k8s.io/apimachinery/pkg/api/errors"
+	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+)
+
+import (
+	"github.com/apache/dubbo-go-pixiu/pilot/pkg/features"
+	"github.com/apache/dubbo-go-pixiu/pilot/pkg/model"
+	"github.com/apache/dubbo-go-pixiu/pkg/kube"
+)
+
+type ServiceMetadataServer struct {
+	dubbov1alpha1.UnimplementedServiceMetadataServiceServer
+
+	KubeClient kube.Client
+
+	// CommittedUpdates describes the number of configuration updates the discovery server has
+	// received, process, and stored in the push context. If this number is less than InboundUpdates,
+	// there are updates we have not yet processed.
+	// Note: This does not mean that all proxies have received these configurations; it is strictly
+	// the push context, which means that the next push to a proxy will receive this configuration.
+	CommittedUpdates *atomic.Int64
+
+	ch chan *pushRequest
+
+	debounceOptions debounceOptions
+	debounceHelper  DebounceHelper
+}
+
+type pushRequest struct {
+	// application name + revision => metadata info
+	ConfigsUpdated map[model.ConfigKey]metadataConfig
+}
+
+type metadataConfig struct {
+	applicationName string
+	revision        string
+	metadataInfo    string
+	timestamp       time.Time
+}
+
+func (pr *pushRequest) Merge(other *pushRequest) *pushRequest {
+	if pr == nil {
+		return other
+	}
+	if other == nil {
+		return pr
+	}
+
+	// Keep the first (older) start time
+
+	// Do not merge when any one is empty
+	if len(pr.ConfigsUpdated) == 0 || len(other.ConfigsUpdated) == 0 {
+		pr.ConfigsUpdated = nil
+	} else {
+		for key, value := range other.ConfigsUpdated {
+			if prValue, ok := pr.ConfigsUpdated[key]; ok {
+				if value.timestamp.After(prValue.timestamp) {
+					pr.ConfigsUpdated[key] = value
+				}
+			} else {
+				pr.ConfigsUpdated[key] = value
+			}
+		}
+	}
+
+	return pr
+}
+
+func NewServiceMetadataServer(env *model.Environment, client kube.Client) *ServiceMetadataServer {
+	return &ServiceMetadataServer{
+		CommittedUpdates: atomic.NewInt64(0),
+		KubeClient:       client,
+		ch:               make(chan *pushRequest, 10),
+		debounceOptions: debounceOptions{
+			debounceAfter:  features.SMDebounceAfter,
+			debounceMax:    features.SMDebounceMax,
+			enableDebounce: features.SMEnableDebounce,
+		},
+	}
+}
+
+func (s *ServiceMetadataServer) Start(stopCh <-chan struct{}) {
+	go s.handleUpdate(stopCh)
+	go s.removeOutdatedCRD(stopCh)
+}
+
+func (s *ServiceMetadataServer) Register(rpcs *grpc.Server) {
+	// Register v3 server
+	dubbov1alpha1.RegisterServiceMetadataServiceServer(rpcs, s)
+}
+
+func (s *ServiceMetadataServer) Publish(ctx context.Context, request *dubbov1alpha1.PublishServiceMetadataRequest) (*dubbov1alpha1.PublishServiceMetadataResponse, error) {
+	if exists, err := s.isNamespaceExists(ctx, request.GetNamespace()); err != nil {
+		if !exists {
+			return nil, status.Errorf(codes.Aborted, "Namespace Not Exists")
+		}
+	} else {
+		return nil, status.Errorf(codes.Aborted, err.Error())
+	}
+
+	pushReq := &pushRequest{ConfigsUpdated: map[model.ConfigKey]metadataConfig{}}
+
+	key := model.ConfigKey{
+		Name:      getConfigKeyName(request.GetApplicationName(), request.GetRevision()),
+		Namespace: request.GetNamespace(),
+	}
+
+	pushReq.ConfigsUpdated[key] = metadataConfig{
+		applicationName: request.GetApplicationName(),
+		revision:        request.GetRevision(),
+		metadataInfo:    request.GetMetadataInfo(),
+		timestamp:       time.Now(),
+	}
+
+	s.ch <- pushReq
+
+	return &dubbov1alpha1.PublishServiceMetadataResponse{}, nil
+}
+
+func getConfigKeyName(applicationName, revision string) string {
+	log.Infof("application name: %s, revision: %s", applicationName, revision)
+	return fmt.Sprintf("%s-%s", applicationName, revision)
+}
+
+func (s *ServiceMetadataServer) Get(ctx context.Context, request *dubbov1alpha1.GetServiceMetadataRequest) (*dubbov1alpha1.GetServiceMetadataResponse, error) {
+	metadata, err := s.KubeClient.Istio().ExtensionsV1alpha1().ServiceMetadatas(request.Namespace).Get(ctx, getConfigKeyName(request.GetApplicationName(), request.GetRevision()), v1.GetOptions{})
+	if err != nil {
+		return nil, status.Errorf(codes.Aborted, err.Error())
+	}
+
+	return &dubbov1alpha1.GetServiceMetadataResponse{MetadataInfo: metadata.Spec.GetMetadataInfo()}, nil
+}
+
+func (s *ServiceMetadataServer) isNamespaceExists(ctx context.Context, namespace string) (bool, error) {
+	_, err := s.KubeClient.Kube().CoreV1().Namespaces().Get(ctx, namespace, v1.GetOptions{})
+	if err != nil {
+		if !apierror.IsNotFound(err) {
+			return false, err
+		}
+	}
+	return true, nil
+}
+
+func (s *ServiceMetadataServer) handleUpdate(stopCh <-chan struct{}) {
+	s.debounce(stopCh)
+}
+
+func (s *ServiceMetadataServer) Push(req *pushRequest) {
+	ctx := context.TODO()
+
+	for key, config := range req.ConfigsUpdated {
+		metadata, err := getOrCreateCRD(s.KubeClient, ctx, key.Namespace, config.applicationName, config.revision, config.metadataInfo, config.timestamp)
+		if err != nil {
+			log.Errorf("Failed to getOrCreateCRD, %s", err.Error())
+			return
+		}
+
+		metadata.Spec.MetadataInfo = config.metadataInfo
+
+		_, err = s.KubeClient.Istio().ExtensionsV1alpha1().ServiceMetadatas(metadata.Namespace).Update(ctx, metadata, v1.UpdateOptions{})
+		if err != nil {
+			log.Errorf("Failed to update metadata, %s", err.Error())
+			return
+		}
+	}
+}
+
+func getOrCreateCRD(kubeClient kube.Client, ctx context.Context, namespace string, applicationName, revision, metadataInfo string, createTime time.Time) (*v1alpha1.ServiceMetadata, error) {
+	var (
+		metadata *v1alpha1.ServiceMetadata
+	)
+
+	serviceMetadataInterface := kubeClient.Istio().ExtensionsV1alpha1().ServiceMetadatas(namespace)
+	crdName := getConfigKeyName(applicationName, revision)
+	metadata, err := serviceMetadataInterface.Get(ctx, crdName, v1.GetOptions{})
+
+	log.Infof("metadata: %+v", metadata)
+
+	if err != nil {
+		if apierror.IsNotFound(err) {
+			mt := &v1alpha1.ServiceMetadata{
+				ObjectMeta: v1.ObjectMeta{
+					Name:      crdName,
+					Namespace: namespace,
+					Annotations: map[string]string{
+						"updateTime": strconv.FormatInt(createTime.Unix(), 10),
+					},
+				},
+				Spec: istioextensionsv1alpha1.ServiceMetadata{
+					ApplicationName: applicationName,
+					Revision:        revision,
+					MetadataInfo:    metadataInfo,
+				},
+			}
+
+			metadata, err = serviceMetadataInterface.Create(ctx, mt, v1.CreateOptions{})
+			if err != nil {
+				return nil, errors.Wrap(err, "Failed to create metadata")
+			}
+		} else {
+			return nil, errors.Wrap(err, "Failed to check metadata exists or not")
+		}
+	} else {
+		// if metadata exist in crd, then update timestamp
+		if metadata.ObjectMeta.Annotations != nil {
+			metadata.ObjectMeta.Annotations["updateTime"] = strconv.FormatInt(createTime.Unix(), 10)
+		} else {
+			metadata.ObjectMeta.Annotations = map[string]string{
+				"updateTime": strconv.FormatInt(createTime.Unix(), 10),
+			}
+		}
+	}
+
+	return metadata, nil
+}
+
+func (s *ServiceMetadataServer) debounce(stopCh <-chan struct{}) {
+	s.debounceHelper.Debounce(s.ch, stopCh, s.debounceOptions, s.Push, s.CommittedUpdates)
+}
+
+func (s *ServiceMetadataServer) removeOutdatedCRD(stopChan <-chan struct{}) {
+	ctx, cancel := context.WithCancel(context.TODO())
+	ticker := time.NewTicker(2 * 60 * time.Hour)

Review Comment:
   这里的定时器可以考虑用配置而不是写固定值



-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] sonarcloud[bot] commented on pull request #540: Control Panel: Feat/service metadata

Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #540:
URL: https://github.com/apache/dubbo-go-pixiu/pull/540#issuecomment-1556127734

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_dubbo-go-pixiu&pullRequest=540)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL)
   
   [![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540) No Coverage information  
   [![1.4%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '1.4%')](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540&metric=new_duplicated_lines_density&view=list) [1.4% Duplication](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540&metric=new_duplicated_lines_density&view=list)
   
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] MasterKenway commented on a diff in pull request #540: Control Panel: Feat/service metadata

Posted by "MasterKenway (via GitHub)" <gi...@apache.org>.
MasterKenway commented on code in PR #540:
URL: https://github.com/apache/dubbo-go-pixiu/pull/540#discussion_r1244538755


##########
manifests/charts/base/files/gen-istio-cluster.yaml:
##########
@@ -6842,14 +6960,14 @@ subjects:
 ---
 # Source: base/templates/default.yaml
 apiVersion: admissionregistration.k8s.io/v1
-kind: ValidatingWebhookConfiguration
+kind: Val:wqidatingWebhookConfiguration

Review Comment:
   看起来是vim的命令导致的 我修改下



-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] mark4z commented on pull request #540: Control Panel: Feat/service metadata

Posted by "mark4z (via GitHub)" <gi...@apache.org>.
mark4z commented on PR #540:
URL: https://github.com/apache/dubbo-go-pixiu/pull/540#issuecomment-1575356186

   Fix test like this  in TestInitPushContext
   
   ```go
   	// Check to ensure the update is identical to the old one
   	// There is probably a better way to do this.
   	diff := cmp.Diff(old, newPush,
   		// AllowUnexported for metadataindex
   		cmp.AllowUnexported(PushContext{}, exportToDefaults{}, serviceIndex{}, virtualServiceIndex{},
   			destinationRuleIndex{}, gatewayIndex{}, consolidatedDestRules{}, IstioEgressListenerWrapper{}, SidecarScope{},
   			AuthenticationPolicies{}, NetworkManager{}, sidecarIndex{}, Telemetries{}, ProxyConfigs{}, consolidatedDestRule{}, serviceNameMappingIndex{}),
   		// These are not feasible/worth comparing
   		cmpopts.IgnoreTypes(sync.RWMutex{}, localServiceDiscovery{}, FakeStore{}, atomic.Bool{}, sync.Mutex{}),
   		cmpopts.IgnoreInterfaces(struct{ mesh.Holder }{}),
   		protocmp.Transform(),
   	)
   ```


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] sonarcloud[bot] commented on pull request #540: Control Panel: Feat/service metadata

Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #540:
URL: https://github.com/apache/dubbo-go-pixiu/pull/540#issuecomment-1556159400

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_dubbo-go-pixiu&pullRequest=540)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL)
   
   [![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540) No Coverage information  
   [![1.4%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '1.4%')](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540&metric=new_duplicated_lines_density&view=list) [1.4% Duplication](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540&metric=new_duplicated_lines_density&view=list)
   
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] sonarcloud[bot] commented on pull request #540: Control Panel: Feat/service metadata

Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #540:
URL: https://github.com/apache/dubbo-go-pixiu/pull/540#issuecomment-1556188199

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_dubbo-go-pixiu&pullRequest=540)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL)
   
   [![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540) No Coverage information  
   [![1.4%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '1.4%')](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540&metric=new_duplicated_lines_density&view=list) [1.4% Duplication](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540&metric=new_duplicated_lines_density&view=list)
   
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] sonarcloud[bot] commented on pull request #540: [WIP] Control Panel: Feat/service metadata

Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #540:
URL: https://github.com/apache/dubbo-go-pixiu/pull/540#issuecomment-1419230957

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_dubbo-go-pixiu&pullRequest=540)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL) [2 Code Smells](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL)
   
   [![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540) No Coverage information  
   [![0.0%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '0.0%')](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540&metric=new_duplicated_lines_density&view=list) [0.0% Duplication](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540&metric=new_duplicated_lines_density&view=list)
   
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] sonarcloud[bot] commented on pull request #540: Control Panel: Feat/service metadata

Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #540:
URL: https://github.com/apache/dubbo-go-pixiu/pull/540#issuecomment-1556119800

   SonarCloud Quality Gate failed.&nbsp; &nbsp; [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_dubbo-go-pixiu&pullRequest=540)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT) [![E](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/E-16px.png 'E')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT) [1 Security Hotspot](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL) [7 Code Smells](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL)
   
   [![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540) No Coverage information  
   [![1.4%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '1.4%')](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540&metric=new_duplicated_lines_density&view=list) [1.4% Duplication](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540&metric=new_duplicated_lines_density&view=list)
   
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] MasterKenway closed pull request #540: Control Panel: Feat/service metadata

Posted by "MasterKenway (via GitHub)" <gi...@apache.org>.
MasterKenway closed pull request #540: Control Panel: Feat/service metadata
URL: https://github.com/apache/dubbo-go-pixiu/pull/540


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] AlexStocks merged pull request #540: Control Panel: Feat/service metadata

Posted by "AlexStocks (via GitHub)" <gi...@apache.org>.
AlexStocks merged PR #540:
URL: https://github.com/apache/dubbo-go-pixiu/pull/540


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] AlexStocks commented on pull request #540: Control Panel: Feat/service metadata

Posted by "AlexStocks (via GitHub)" <gi...@apache.org>.
AlexStocks commented on PR #540:
URL: https://github.com/apache/dubbo-go-pixiu/pull/540#issuecomment-1510354525

   @MasterKenway pls fix the ci failure.


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] sonarcloud[bot] commented on pull request #540: Control Panel: Feat/service metadata

Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #540:
URL: https://github.com/apache/dubbo-go-pixiu/pull/540#issuecomment-1556123710

   SonarCloud Quality Gate failed.&nbsp; &nbsp; [![Quality Gate failed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/failed-16px.png 'Quality Gate failed')](https://sonarcloud.io/dashboard?id=apache_dubbo-go-pixiu&pullRequest=540)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT) [![E](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/E-16px.png 'E')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT) [1 Security Hotspot](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL) [7 Code Smells](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL)
   
   [![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540) No Coverage information  
   [![1.4%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '1.4%')](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540&metric=new_duplicated_lines_density&view=list) [1.4% Duplication](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540&metric=new_duplicated_lines_density&view=list)
   
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] mark4z commented on a diff in pull request #540: Control Panel: Feat/service metadata

Posted by "mark4z (via GitHub)" <gi...@apache.org>.
mark4z commented on code in PR #540:
URL: https://github.com/apache/dubbo-go-pixiu/pull/540#discussion_r1216117589


##########
manifests/charts/base/files/gen-istio-cluster.yaml:
##########
@@ -6842,14 +6960,14 @@ subjects:
 ---
 # Source: base/templates/default.yaml
 apiVersion: admissionregistration.k8s.io/v1
-kind: ValidatingWebhookConfiguration
+kind: Val:wqidatingWebhookConfiguration

Review Comment:
   这里是不是不小心改的?理论上这里的文件是自动生成的



##########
bin/update_crds.sh:
##########
@@ -29,14 +29,14 @@ SCRIPTPATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 ROOTDIR=$(dirname "${SCRIPTPATH}")
 cd "${ROOTDIR}"
 
-REPO="github.com/istio/api"
+REPO="github.com/MasterKenway/operator-api"
 # using the pseudo version we have in go.mod file. e.g. v.0.0.0-<timestamp>-<SHA>
 # first check if there's a replace: e.g. replace istio.io/api => github.com/USER/istioapi v0.0.0-<timestamp>-<SHA>
-SHA=$(grep "istio.io/api" go.mod | grep "^replace" | awk -F "-" '{print $NF}')
+SHA=$(grep "MasterKenway/operator-api" go.mod | grep "^replace" | awk -F "-" '{print $NF}')

Review Comment:
   现在可以改回去了



-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-pixiu] sonarcloud[bot] commented on pull request #540: [WIP] Control Panel: Feat/service metadata

Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #540:
URL: https://github.com/apache/dubbo-go-pixiu/pull/540#issuecomment-1492871884

   Kudos, SonarCloud Quality Gate passed!&nbsp; &nbsp; [![Quality Gate passed](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/QualityGateBadge/passed-16px.png 'Quality Gate passed')](https://sonarcloud.io/dashboard?id=apache_dubbo-go-pixiu&pullRequest=540)
   
   [![Bug](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/bug-16px.png 'Bug')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG) [0 Bugs](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=BUG)  
   [![Vulnerability](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/vulnerability-16px.png 'Vulnerability')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY) [0 Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=VULNERABILITY)  
   [![Security Hotspot](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/security_hotspot-16px.png 'Security Hotspot')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT) [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=SECURITY_HOTSPOT)  
   [![Code Smell](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/common/code_smell-16px.png 'Code Smell')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL) [![A](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/RatingBadge/A-16px.png 'A')](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL) [6 Code Smells](https://sonarcloud.io/project/issues?id=apache_dubbo-go-pixiu&pullRequest=540&resolved=false&types=CODE_SMELL)
   
   [![No Coverage information](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/CoverageChart/NoCoverageInfo-16px.png 'No Coverage information')](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540) No Coverage information  
   [![1.9%](https://sonarsource.github.io/sonarcloud-github-static-resources/v2/checks/Duplications/3-16px.png '1.9%')](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540&metric=new_duplicated_lines_density&view=list) [1.9% Duplication](https://sonarcloud.io/component_measures?id=apache_dubbo-go-pixiu&pullRequest=540&metric=new_duplicated_lines_density&view=list)
   
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org