diff --git a/changelog/unreleased/storage-registry-envvar-config.md b/changelog/unreleased/storage-registry-envvar-config.md new file mode 100644 index 000000000..d2e2a7d14 --- /dev/null +++ b/changelog/unreleased/storage-registry-envvar-config.md @@ -0,0 +1,5 @@ +Enhancement: Allow configuring storage registry with envvars + +Introduced new envvars to configure the storage registry in the gateway service + +https://github.com/owncloud/ocis/pull/7554 diff --git a/services/gateway/pkg/config/config.go b/services/gateway/pkg/config/config.go index c19f88785..0d4343be1 100644 --- a/services/gateway/pkg/config/config.go +++ b/services/gateway/pkg/config/config.go @@ -76,9 +76,9 @@ type GRPCConfig struct { } type StorageRegistry struct { - Driver string `yaml:"driver"` // TODO: configure via env? - Rules []string `yaml:"rules"` // TODO: configure via env? - JSON string `yaml:"json"` // TODO: configure via env? + Driver string `yaml:"driver" env:"GATEWAY_STORAGE_REGISTRY_DRIVER" desc:"The driver name of the storage registry to use"` + Rules []string `yaml:"rules" env:"GATEWAY_STORAGE_REGISTRY_RULES" desc:"The rules for the storage registry"` + JSON string `yaml:"json" env:"GATEWAY_STORAGE_REGISTRY_CONFIG_JSON" desc:"Additional configuration for the storage registry in json format"` StorageUsersMountID string `yaml:"storage_users_mount_id" env:"GATEWAY_STORAGE_USERS_MOUNT_ID" desc:"Mount ID of this storage. Admins can set the ID for the storage in this config option manually which is then used to reference the storage. Any reasonable long string is possible, preferably this would be an UUIDv4 format."` }