Skip to content

Commit

Permalink
debug: added variables to make the sparrow testable after building
Browse files Browse the repository at this point in the history
Signed-off-by: Bruno Bressi <[email protected]>
  • Loading branch information
puffitos committed Dec 14, 2023
1 parent f0b6b31 commit 6a1d041
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pkg/sparrow/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"context"
"fmt"
"net/http"
"os"
"time"

"github.com/caas-team/sparrow/pkg/sparrow/gitlab"
Expand All @@ -36,10 +37,11 @@ import (
)

const (
gitlabRegistrationProjectID = 1
gitlabRegistrationProjectID = 237078
globalTargetsCheckInterval = 5 * time.Minute
registrationUnhealthyThreshold = 15 * time.Minute
registrationInterval = 5 * time.Minute
gitlabBaseUrl = "https://gitlab.devops.telekom.de"
)

type Sparrow struct {
Expand Down Expand Up @@ -73,8 +75,8 @@ func New(cfg *config.Config) *Sparrow {
routingTree: api.NewRoutingTree(),
router: chi.NewRouter(),
targets: targets.NewGitlabManager(
gitlab.New("targetsRepo", "gitlabToken", gitlabRegistrationProjectID),
"DNS-Name",
gitlab.New(gitlabBaseUrl, os.Getenv("GITLAB_TOKEN"), gitlabRegistrationProjectID),
"cool-sparrow.de",
globalTargetsCheckInterval,
registrationUnhealthyThreshold,
registrationInterval,
Expand Down

0 comments on commit 6a1d041

Please sign in to comment.