mirror of
https://gitea.com/gitea/runner.git
synced 2026-11-08 16:20:29 +00:00
feat: support reading cache.external_secret from a file (#1100)
This PR adds a new `cache.external_secret_file` config, which points at a file holding the secret. So the secret can come from a mounted Kubernetes/Docker secret while the rest of the config stays plain text. ```yaml cache: external_server: "http://cache-host:8088/" external_secret_file: /path/to/cache_external_secret ``` --------- Co-authored-by: bircni <[email protected]> Reviewed-on: https://gitea.com/gitea/runner/pulls/1100 Reviewed-by: bircni <[email protected]> Co-authored-by: Zettat123 <[email protected]>
This commit is contained in:
1 parent
b1a02cdd5d
commit
c9c4957e38
6 files changed
+154
-16
No files matched your search
@@ -50,7 +50,7 @@ func runCacheServer(configFile *string, cacheArgs *cacheServerArgs) func(cmd *co
|
||||
|
||||
secret := cfg.Cache.ExternalSecret
|
||||
if secret == "" {
|
||||
return errors.New("cache.external_secret must be set for cache-server; configure the same value on each runner that points at this server via cache.external_server")
|
||||
return errors.New("cache.external_secret (or cache.external_secret_file) must be set for cache-server; configure the same value on each runner that points at this server via cache.external_server")
|
||||
}
|
||||
cacheHandler, err := artifactcache.StartHandler(
|
||||
dir,
|
||||
|
||||
Reference in new issue
Block a user