Skip to content

Commit

Permalink
fix: Agent exposes the readinessProbe on port 6080 by default if it's…
Browse files Browse the repository at this point in the history
… not in a container
  • Loading branch information
Danny-Wei committed Dec 31, 2024
1 parent c416990 commit b32be51
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions internal/agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,14 @@ func NewAgent(
})

go func() {
if err := r.Run(fmt.Sprintf(":%d", varmorconfig.AgentServicePort)); err != nil {
log.Error(err, "fatal error: agent service failed to start")
if inContainer {
if err := r.Run(fmt.Sprintf(":%d", varmorconfig.AgentServicePort)); err != nil {
log.Error(err, "fatal error: agent service failed to start")
}
} else {
if err := r.Run(":6080"); err != nil {
log.Error(err, "fatal error: agent service failed to start")
}
}
}()

Expand Down

0 comments on commit b32be51

Please sign in to comment.