Skip to content

Commit

Permalink
coordinator: add transit engine
Browse files Browse the repository at this point in the history
  • Loading branch information
jmxnzo committed Feb 4, 2025
1 parent 17b276b commit eed6fd3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions coordinator/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (

"github.com/edgelesssys/contrast/coordinator/history"
"github.com/edgelesssys/contrast/coordinator/internal/authority"
"github.com/edgelesssys/contrast/coordinator/internal/transitengine"
"github.com/edgelesssys/contrast/internal/atls"
"github.com/edgelesssys/contrast/internal/atls/issuer"
"github.com/edgelesssys/contrast/internal/grpc/atlscredentials"
Expand Down Expand Up @@ -129,6 +130,19 @@ func run() (retErr error) {
return nil
})

eg.Go(func() error {
logger.Info("Creating transit engine API")
if err != nil {
logger.Error("Serving transit engine API", "err", err)
return fmt.Errorf("getting seed engine: %w", err)
}
if err := transitengine.NewTransitEngineAPI(8200, nil, logger); err != nil {
logger.Error("Serving transit engine API", "err", err)
return fmt.Errorf("serving transit engine API: %w", err)
}
return nil
})

eg.Go(func() error {
<-ctx.Done()
logger.Info("Error detected, shutting down")
Expand Down
3 changes: 3 additions & 0 deletions internal/kuberesource/parts.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,9 @@ func Coordinator(namespace string) *CoordinatorConfig {
ContainerPort().
WithName("meshapi").
WithContainerPort(7777),
ContainerPort().
WithName("transitapi").
WithContainerPort(8200),
).
WithReadinessProbe(Probe().
WithInitialDelaySeconds(1).
Expand Down

0 comments on commit eed6fd3

Please sign in to comment.