Skip to content

Commit

Permalink
Remove deprecated field (#59)
Browse files Browse the repository at this point in the history
Signed-off-by: fengshunli <[email protected]>
  • Loading branch information
fengshunli authored Feb 27, 2023
1 parent c8e75a4 commit b2a03ac
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions control_plane.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion k8s/workload/opensergo-control-plane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ spec:
ports:
- name: grpc
containerPort: 10246
serviceAccount: opensergo-control-plane
serviceAccountName: opensergo-control-plane

---
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/v1alpha1/fault_tolerance_rule_types.go
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion pkg/controller/k8s_operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

}
Expand Down
2 changes: 1 addition & 1 deletion pkg/model/subscribe.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/transport/grpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit b2a03ac

Please sign in to comment.