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>2021-10-08 02:29:35 +0300
committerJaime Martinez <jmartinez@gitlab.com>2021-10-08 02:29:35 +0300
commit247bd7ba2fd9139711218c6a42ed03c551f958d9 (patch)
tree5f34b0cf1bf51aed35fe35d5396916e89eef5485 /internal
parentc48bb316739e39ba1b225f12147fad45337aa711 (diff)
parentbf039d89071e527e2e5c1bc2e64c7513d87cba1a (diff)
Merge branch 'remove/root' into 'master'
Remove gitlab-pages daemon Closes #114 and #133 See merge request gitlab-org/gitlab-pages!542
Diffstat (limited to 'internal')
-rw-r--r--internal/config/config.go15
-rw-r--r--internal/config/flags.go4
2 files changed, 3 insertions, 16 deletions
diff --git a/internal/config/config.go b/internal/config/config.go
index 61767a57..94c22328 100644
--- a/internal/config/config.go
+++ b/internal/config/config.go
@@ -18,7 +18,6 @@ type Config struct {
General General
ArtifactsServer ArtifactsServer
Authentication Auth
- Daemon Daemon
GitLab GitLab
Listeners Listeners
Log Log
@@ -80,12 +79,6 @@ type Auth struct {
Scope string
}
-// Daemon groups settings related to configuring GitLab Pages daemon
-type Daemon struct {
- UID uint
- GID uint
-}
-
// Cache configuration for GitLab API
type Cache struct {
CacheExpiry time.Duration
@@ -215,10 +208,6 @@ func loadConfig() (*Config, error) {
RedirectURI: *redirectURI,
Scope: *authScope,
},
- Daemon: Daemon{
- UID: *daemonUID,
- GID: *daemonGID,
- },
Log: Log{
Format: *logFormat,
Verbose: *logVerbose,
@@ -281,8 +270,6 @@ func LogConfig(config *Config) {
log.WithFields(log.Fields{
"artifacts-server": *artifactsServer,
"artifacts-server-timeout": *artifactsServerTimeout,
- "daemon-gid": *daemonGID,
- "daemon-uid": *daemonUID,
"default-config-filename": flag.DefaultConfigFlagname,
"disable-cross-origin-requests": *disableCrossOriginRequests,
"domain": config.General.Domain,
@@ -313,7 +300,7 @@ func LogConfig(config *Config) {
"zip-cache-cleanup": config.Zip.CleanupInterval,
"zip-cache-refresh": config.Zip.RefreshInterval,
"zip-open-timeout": config.Zip.OpenTimeout,
- }).Debug("Start daemon with configuration")
+ }).Debug("Start Pages with configuration")
}
// LoadConfig parses configuration settings passed as command line arguments or
diff --git a/internal/config/flags.go b/internal/config/flags.go
index aa5bf1c5..52b7be18 100644
--- a/internal/config/flags.go
+++ b/internal/config/flags.go
@@ -21,8 +21,8 @@ var (
metricsAddress = flag.String("metrics-address", "", "The address to listen on for metrics requests")
sentryDSN = flag.String("sentry-dsn", "", "The address for sending sentry crash reporting to")
sentryEnvironment = flag.String("sentry-environment", "", "The environment for sentry crash reporting")
- daemonUID = flag.Uint("daemon-uid", 0, "Drop privileges to this user")
- daemonGID = flag.Uint("daemon-gid", 0, "Drop privileges to this group")
+ _ = flag.Uint("daemon-uid", 0, "DEPRECATED and ignored, will be removed in 15.0")
+ _ = flag.Uint("daemon-gid", 0, "DEPRECATED and ignored, will be removed in 15.0")
_ = flag.Bool("daemon-enable-jail", false, "DEPRECATED and ignored, will be removed in 15.0")
_ = flag.Bool("daemon-inplace-chroot", false, "DEPRECATED and ignored, will be removed in 15.0") // TODO: https://gitlab.com/gitlab-org/gitlab-pages/-/issues/599
propagateCorrelationID = flag.Bool("propagate-correlation-id", false, "Reuse existing Correlation-ID from the incoming request header `X-Request-ID` if present")