diff --git a/control_plane.go b/control_plane.go index 8e0686e..73c31b7 100644 --- a/control_plane.go +++ b/control_plane.go @@ -107,15 +107,15 @@ func (c *ControlPlane) sendMessageToStream(stream model.OpenSergoTransportStream } func (c *ControlPlane) handleSubscribeRequest(clientIdentifier model.ClientIdentifier, request *trpb.SubscribeRequest, stream model.OpenSergoTransportStream) error { - //var labels []model.LabelKV - //if request.Target.Labels != nil { + // var labels []model.LabelKV + // if request.Target.Labels != nil { // for _, label := range request.Target.Labels { // labels = append(labels, model.LabelKV{ // Key: label.Key, // Value: label.Value, // }) // } - //} + // } for _, kind := range request.Target.Kinds { crdWatcher, err := c.operator.RegisterWatcher(model.SubscribeTarget{ Namespace: request.Target.Namespace, diff --git a/k8s/workload/opensergo-control-plane.yaml b/k8s/workload/opensergo-control-plane.yaml index 8079318..78ed2fa 100644 --- a/k8s/workload/opensergo-control-plane.yaml +++ b/k8s/workload/opensergo-control-plane.yaml @@ -21,7 +21,6 @@ spec: ports: - name: grpc containerPort: 10246 - serviceAccount: opensergo-control-plane serviceAccountName: opensergo-control-plane --- diff --git a/pkg/api/v1alpha1/fault_tolerance_rule_types.go b/pkg/api/v1alpha1/fault_tolerance_rule_types.go index b52717c..0e47c17 100644 --- a/pkg/api/v1alpha1/fault_tolerance_rule_types.go +++ b/pkg/api/v1alpha1/fault_tolerance_rule_types.go @@ -1,4 +1,4 @@ -/// Copyright 2022, OpenSergo Authors +// Copyright 2022, OpenSergo Authors // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/pkg/controller/k8s_operator.go b/pkg/controller/k8s_operator.go index 8ae15ad..6c72356 100644 --- a/pkg/controller/k8s_operator.go +++ b/pkg/controller/k8s_operator.go @@ -192,7 +192,7 @@ func (k *KubernetesOperator) AddWatcher(target model.SubscribeTarget) error { if err != nil { return err } - //_ = crdRunnable.Start(k.ctx) + // _ = crdRunnable.Start(k.ctx) k.controllers[target.Kind] = crdWatcher } diff --git a/pkg/model/subscribe.go b/pkg/model/subscribe.go index 18ff3bd..220cf90 100644 --- a/pkg/model/subscribe.go +++ b/pkg/model/subscribe.go @@ -25,7 +25,7 @@ type SubscribeTarget struct { Namespace string // AppName represents the target app name. Fast path for "app" label. AppName string - //Labels []LabelKV + // Labels []LabelKV Kind SubscribeKind } diff --git a/pkg/transport/grpc/server.go b/pkg/transport/grpc/server.go index fc43adc..ba94169 100644 --- a/pkg/transport/grpc/server.go +++ b/pkg/transport/grpc/server.go @@ -106,7 +106,7 @@ func (s *TransportServer) SubscribeConfig(stream trpb.OpenSergoUniversalTranspor return nil } if err != nil { - //remove stream + // remove stream _ = s.connectionManager.RemoveByIdentifier(clientIdentifier) return err }