Open lvlcn-t opened 2 weeks ago
The new viper pre-release removes the cumbersome feature flag from the build process. Instead we can apply a new option to apply the feature flag on runtime: https://github.com/spf13/viper/issues/1706#issuecomment-2157458096 https://github.com/spf13/viper/pull/1854
Relates to #78
I've removed the feature flag from our goreleaser configs and am now using the viper option.
For additional information look at the commits.
Works locally with setting the gitlab token for the target manager per environment variable:
{"time":"2024-06-10T12:53:04.362093156+02:00","level":"INFO","source":{"function":"github.com/caas-team/sparrow/cmd.NewCmdRun.run.func1","file":"/home/installadm/dev/github/sparrow/cmd/run.go","line":89},"msg":"Running sparrow"} {"time":"2024-06-10T12:53:04.36232596+02:00","level":"INFO","source":{"function":"github.com/caas-team/sparrow/pkg/sparrow/targets.(*manager).Reconcile","file":"/home/installadm/dev/github/sparrow/pkg/sparrow/targets/manager.go","line":82},"msg":"Starting target manager reconciliation"} {"time":"2024-06-10T12:53:04.36241834+02:00","level":"INFO","source":{"function":"github.com/caas-team/sparrow/pkg/config.(*FileLoader).Run","file":"/home/installadm/dev/github/sparrow/pkg/config/file.go","line":71},"msg":"File Loader disabled"} {"time":"2024-06-10T12:53:04.362358777+02:00","level":"INFO","source":{"function":"github.com/caas-team/sparrow/pkg/api.(*api).Run.func1","file":"/home/installadm/dev/github/sparrow/pkg/api/api.go","line":101},"msg":"Serving Api","addr":":8080"} {"time":"2024-06-10T12:54:04.854148679+02:00","level":"INFO","source":{"function":"github.com/caas-team/sparrow/pkg/sparrow/targets/remote/gitlab.(*client).FetchFiles","file":"/home/installadm/dev/github/sparrow/pkg/sparrow/targets/remote/gitlab/gitlab.go","line":88},"msg":"Successfully fetched all target files","files":2}
Motivation
The new viper pre-release removes the cumbersome feature flag from the build process. Instead we can apply a new option to apply the feature flag on runtime: https://github.com/spf13/viper/issues/1706#issuecomment-2157458096 https://github.com/spf13/viper/pull/1854
Relates to #78
Changes
I've removed the feature flag from our goreleaser configs and am now using the viper option.
For additional information look at the commits.
Tests done
Works locally with setting the gitlab token for the target manager per environment variable:
TODO