Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaime Martinez <jmartinez@gitlab.com>2020-04-21 08:00:05 +0300
committerVladimir Shushlin <v.shushlin@gmail.com>2020-05-08 15:06:07 +0300
commit2d9fda6b31bc405ddace566aba650ff79ebe061e (patch)
tree116ff6e13204215cfc1f5999e052c0ccbc396e2b /main.go
parent62c8fd873f1c4150f26cddb3a9d6763d95c13b0a (diff)
Fix deprecated args validation
Fixes check for deprecated arguments to cater for key=value arugments. It also logs the warning if a deprecated flag is used.
Diffstat (limited to 'main.go')
-rw-r--r--main.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/main.go b/main.go
index 40aef813..d550b387 100644
--- a/main.go
+++ b/main.go
@@ -58,15 +58,15 @@ var (
_ = flag.String("admin-https-listener", "", "DEPRECATED")
_ = flag.String("admin-https-cert", "", "DEPRECATED")
_ = flag.String("admin-https-key", "", "DEPRECATED")
- secret = flag.String("auth-secret", "", "Cookie store hash key, should be at least 32 bytes long.")
+ secret = flag.String("auth-secret", "", "Cookie store hash key, should be at least 32 bytes long; will be deprecated soon")
gitLabAuthServer = flag.String("auth-server", "", "DEPRECATED, use gitlab-server instead. GitLab server, for example https://www.gitlab.com")
gitLabServer = flag.String("gitlab-server", "", "GitLab server, for example https://www.gitlab.com")
internalGitLabServer = flag.String("internal-gitlab-server", "", "Internal GitLab server used for API requests, useful if you want to send that traffic over an internal load balancer, example value https://www.gitlab.com (defaults to value of gitlab-server)")
gitLabAPISecretKey = flag.String("api-secret-key", "", "File with secret key used to authenticate with the GitLab API")
gitlabClientHTTPTimeout = flag.Duration("gitlab-client-http-timeout", 10*time.Second, "GitLab API HTTP client connection timeout in seconds (default: 10s)")
gitlabClientJWTExpiry = flag.Duration("gitlab-client-jwt-expiry", 30*time.Second, "JWT Token expiry time in seconds (default: 30s)")
- clientID = flag.String("auth-client-id", "", "GitLab application Client ID")
- clientSecret = flag.String("auth-client-secret", "", "GitLab application Client Secret")
+ clientID = flag.String("auth-client-id", "", "GitLab application Client ID; will be deprecated soon")
+ clientSecret = flag.String("auth-client-secret", "", "GitLab application Client Secret; will be deprecated soon")
redirectURI = flag.String("auth-redirect-uri", "", "GitLab application redirect URI")
maxConns = flag.Uint("max-conns", 5000, "Limit on the number of concurrent connections to the HTTP, HTTPS or proxy listeners")
insecureCiphers = flag.Bool("insecure-ciphers", false, "Use default list of cipher suites, may contain insecure ones like 3DES and RC4")
@@ -241,7 +241,7 @@ func initErrorReporting(sentryDSN, sentryEnvironment string) {
func loadConfig() appConfig {
if err := deprecatedargs.Validate(os.Args[1:]); err != nil {
- log.WithError(err)
+ log.WithError(err).Warn("Using deprecated arguments")
}
config := configFromFlags()