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:
authorfeistel <6742251-feistel@users.noreply.gitlab.com>2021-08-10 19:44:16 +0300
committerfeistel <6742251-feistel@users.noreply.gitlab.com>2021-10-07 16:40:43 +0300
commitdc7d694f00eadd078a05991bff7c78cb29efeff4 (patch)
treeca2c07cc40a46e67623c598a6735d49458a2e157 /main.go
parent64f914a804a4da8a521c5cbe7df1b8cb73f45a4f (diff)
refactor: stop running gitlab-pages as root
We have now disabled chroot by default since %14.1, and recently removed support for disk-based configuration coming in %14.3. And we've also removed the chroot completely from Pages. Since nginx can do TCP proxying and there's no need to use privileged ports, Pages has been confirmed to run as non-root in k8s environment without any issues. This MR removes support for the gitlab-pages daemon completely. Changelog: removed
Diffstat (limited to 'main.go')
-rw-r--r--main.go16
1 files changed, 0 insertions, 16 deletions
diff --git a/main.go b/main.go
index 042e5974..f89d10fa 100644
--- a/main.go
+++ b/main.go
@@ -5,7 +5,6 @@ import (
"io"
"math/rand"
"os"
- "strings"
"time"
"github.com/sirupsen/logrus"
@@ -82,20 +81,6 @@ func appMain() {
defer closeAll(cs)
}
- if config.Daemon.UID != 0 || config.Daemon.GID != 0 {
- if err := daemonize(config); err != nil {
- if strings.Contains(err.Error(), "signal:") {
- log.WithField("signal", err.Error()).Info("daemon received signal")
- return
- }
-
- errortracking.Capture(err)
- fatal(err, "could not create pages daemon")
- }
-
- return
- }
-
runApp(config)
}
@@ -202,6 +187,5 @@ func main() {
metrics.MustRegister()
- daemonMain()
appMain()
}