Skip to content

Commit

Permalink
Revert "Only report edge plugin health if sync is enabled."
Browse files Browse the repository at this point in the history
This reverts commit 7a6f2ee.
  • Loading branch information
ronenh committed Oct 7, 2024
1 parent a52b165 commit 85b5400
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 5 additions & 0 deletions pkg/app/topaz.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@ func (e *Topaz) Start() error {
for serviceName := range e.Configuration.APIConfig.Services {
e.Manager.HealthServer.SetServiceStatus(serviceName, grpc_health_v1.HealthCheckResponse_SERVING)
}

// register phony sync service with status NOT_SERVING
service, servingStatus := "sync", grpc_health_v1.HealthCheckResponse_NOT_SERVING
e.Manager.HealthServer.Server.SetServingStatus(service, servingStatus)
e.Logger.Info().Str("component", "edge.plugin").Str("service", service).Str("status", servingStatus.String()).Msg("health")
}

return nil
Expand Down
6 changes: 0 additions & 6 deletions plugins/edge/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"context"
"strings"

"github.com/aserto-dev/topaz/pkg/app"
topaz "github.com/aserto-dev/topaz/pkg/cc/config"
"github.com/aserto-dev/topaz/plugins/noop"
"github.com/mitchellh/mapstructure"
Expand All @@ -14,7 +13,6 @@ import (
"github.com/pkg/errors"
"github.com/rs/zerolog"
"github.com/spf13/viper"
"google.golang.org/grpc/health/grpc_health_v1"
)

type PluginFactory struct {
Expand Down Expand Up @@ -44,10 +42,6 @@ func (f PluginFactory) New(m *plugins.Manager, config interface{}) plugins.Plugi
}
}

service, servingStatus := "sync", grpc_health_v1.HealthCheckResponse_NOT_SERVING
app.SetServiceStatus(f.logger, service, servingStatus)
f.logger.Info().Str("component", "edge.plugin").Str("service", service).Str("status", servingStatus.String()).Msg("health")

return newEdgePlugin(f.logger, cfg, f.cfg, m)
}

Expand Down

0 comments on commit 85b5400

Please sign in to comment.