From 0dcf5eb6c8ecc5e4b150e6ed96e7dfe007fcd052 Mon Sep 17 00:00:00 2001 From: Kevin Petremann Date: Tue, 13 Feb 2024 16:53:12 +0100 Subject: [PATCH 1/2] docs: update settings example --- settings.example.yaml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/settings.example.yaml b/settings.example.yaml index f5bb9ee..73d8750 100644 --- a/settings.example.yaml +++ b/settings.example.yaml @@ -1,5 +1,4 @@ Datacenter: "europe" -LogLevel: "error" API: ListenAddress: "127.0.0.1" @@ -11,17 +10,21 @@ Log: Authentication: LDAP: - InsecureSkipVerify: "false" URL: "ldaps://URL.local" BindDN: "cn=,OU=,DC=" BaseDN: "DC=" Password: "" - MaxWorkers: 10 + WorkersCount: 10 + Timeout: 5s + MaxConnectionLifetime: 1m + InsecureSkipVerify: false NetBox: URL: "https://netbox.local" APIKey: "" DatacenterFilterKey: "site_group" + LimitPerPage: 500 Build: - Interval: "30m" \ No newline at end of file + Interval: "30m" + AllDevicesMustBuild: false From d61a0efe21cebb66ad94138dca970326dd556d25 Mon Sep 17 00:00:00 2001 From: Kevin Petremann Date: Tue, 20 Feb 2024 15:14:11 +0100 Subject: [PATCH 2/2] fix: make the CI happy --- internal/api/auth/basic_auth.go | 2 +- internal/api/router/endpoints.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/api/auth/basic_auth.go b/internal/api/auth/basic_auth.go index 57e5f37..8d44023 100644 --- a/internal/api/auth/basic_auth.go +++ b/internal/api/auth/basic_auth.go @@ -81,7 +81,7 @@ func (b *BasicAuth) Wrap(next httprouter.Handle) httprouter.Handle { case ldapMode: return BasicAuthLDAP(b.ldapAuth, next) default: - return func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { + return func(w http.ResponseWriter, _ *http.Request, _ httprouter.Params) { log.Error().Str("auth-method", string(b.mode)).Str("authentication issue", "bad server configuration").Send() http.Error(w, "authentication issue: bad server configuration", http.StatusInternalServerError) } diff --git a/internal/api/router/endpoints.go b/internal/api/router/endpoints.go index bf71201..352a18f 100644 --- a/internal/api/router/endpoints.go +++ b/internal/api/router/endpoints.go @@ -28,7 +28,7 @@ func getVersion(w http.ResponseWriter, _ *http.Request, _ httprouter.Params) { } func prometheusMetrics(h http.Handler) httprouter.Handle { - return func(w http.ResponseWriter, r *http.Request, ps httprouter.Params) { + return func(w http.ResponseWriter, r *http.Request, _ httprouter.Params) { h.ServeHTTP(w, r) } }