caas-team / sparrow

A monitoring tool to gather infrastructure network information
Apache License 2.0
6 stars 4 forks source link

Feature: Make target manager branch configurable #179

Closed lvlcn-t closed 2 weeks ago

lvlcn-t commented 3 weeks ago

Is there an existing feature request for this?

Problem Description

Currently the target manager always pushes to the main branch. This should be configurable to ensure that even if the registration repository's default branch is protected by a group or instance wide policy, the target manager still works correctly under another branch.

Solution Description

Add another option to the target manager config, that allows to configure a reference to push the registration files to.

I'd propose the following config:

targetManager:
  enabled: true
  type: gitlab
  checkInterval: 1m
  registrationInterval: 1m
  updateInterval: 120m
  unhealthyThreshold: 360m
  scheme: http
  gitlab:
    baseUrl: https://gitlab.com
    token: glpat-xxxxxxxx
    projectId: 18923
    # The branch to use for the target manager
    # Defaults to 'main'
    branch: main

Who can address the issue?

Everyone

Additional Context

No response