Skip to content

Commit

Permalink
Merge pull request #4077 from wkloucek/config-descriptions-reloaded
Browse files Browse the repository at this point in the history
config descriptions reloaded
  • Loading branch information
mmattel committed Jul 1, 2022
2 parents 74c66cd + 9b4c746 commit 6ec933c
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
7 changes: 7 additions & 0 deletions changelog/unreleased/fix-remove-unused-ocs-backend-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Bugfix: Remove static ocs user backend config

We've remove the `OCS_ACCOUNT_BACKEND_TYPE` configuration option.
It was intended to allow configuration of different user backends for the ocs service.
Right now the ocs service only has a "cs3" backend. Therefor it's a static entry and not configurable.

https://github.com/owncloud/ocis/pull/4077
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ services:

OCS_HTTP_ADDR: 0.0.0.0:9110

OCS_ACCOUNT_BACKEND_TYPE: cs3
OCS_IDM_ADDRESS: https://${OCIS_DOMAIN}

OCS_JWT_SECRET: ${OCIS_JWT_SECRET}
Expand Down
6 changes: 5 additions & 1 deletion docs/helpers/environment-variable-docs-generator.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,11 @@ func GetAnnotatedVariables(s interface{}) []ConfigField {
continue
}
v := fmt.Sprintf("%v", value.Interface())
fields = append(fields, ConfigField{Name: strings.ReplaceAll(env, ";", "<br/>"), DefaultValue: html.EscapeString(strings.Replace(v, "|", "\\|", -1)), Description: desc, Type: value.Type().Name()})
typeName := value.Type().Name()
if typeName == "" {
typeName = value.Type().String()
}
fields = append(fields, ConfigField{Name: strings.ReplaceAll(env, ";", "<br/>"), DefaultValue: html.EscapeString(strings.Replace(v, "|", "\\|", -1)), Description: desc, Type: typeName})
case reflect.Ptr:
// PolicySelectors in the Proxy are being skipped atm
// they are not configurable via env vars, if that changes
Expand Down
4 changes: 2 additions & 2 deletions services/ocs/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ type Config struct {

IdentityManagement IdentityManagement `yaml:"identity_management"`

AccountBackend string `yaml:"account_backend" env:"OCS_ACCOUNT_BACKEND_TYPE"`
MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;OCS_MACHINE_AUTH_API_KEY" desc: "Machine auth API key used for accessing the 'auth-machine' service to impersonate users."`
AccountBackend string `yaml:"-"` // we only support cs3 backend, no need to have this configurable
MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;OCS_MACHINE_AUTH_API_KEY" desc:"Machine auth API key used for accessing the 'auth-machine' service to impersonate users."`

Context context.Context `yaml:"-"`
}
Expand Down
4 changes: 2 additions & 2 deletions services/search/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ type Config struct {

GRPC GRPC `yaml:"grpc"`

Datapath string `yaml:"data_path" env:"SEARCH_DATA_PATH"`
Datapath string `yaml:"data_path" env:"SEARCH_DATA_PATH" desc:"Path for the search persistence directory."`
Reva Reva `yaml:"reva"`
Events Events `yaml:"events"`

MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;SEARCH_MACHINE_AUTH_API_KEY" desc: "Machine auth API key used for accessing the 'auth-machine' service to impersonate users."`
MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;SEARCH_MACHINE_AUTH_API_KEY" desc:"Machine auth API key used for accessing the 'auth-machine' service to impersonate users."`

Context context.Context `yaml:"-"`
}
Expand Down

0 comments on commit 6ec933c

Please sign in to comment.