feat: registry credentials from k8s Secret via env vars
- main.go: REGISTRY_USERNAME / REGISTRY_TOKEN env vars override config file - manifests/hub.yaml: reference Secret/gitea-creds, remove plaintext creds from ConfigMap Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -71,6 +71,14 @@ func main() {
|
||||
// Load config
|
||||
cfg := loadConfig(*configPath, logger)
|
||||
|
||||
// Environment variable overrides (for k8s Secrets)
|
||||
if v := os.Getenv("REGISTRY_USERNAME"); v != "" {
|
||||
cfg.Registry.Username = v
|
||||
}
|
||||
if v := os.Getenv("REGISTRY_TOKEN"); v != "" {
|
||||
cfg.Registry.Token = v
|
||||
}
|
||||
|
||||
// Ensure data dir exists
|
||||
os.MkdirAll(cfg.Server.DataDir, 0755)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user