Merge pull request #5272 from kobergj/ExtendedEnvvars

[docs-only] Extended Envvars Improvements
This commit is contained in:
kobergj
2022-12-21 15:39:14 +01:00
committed by GitHub
3 changed files with 84 additions and 76 deletions

View File

@@ -0,0 +1,81 @@
variables:
- rawname: CS3_GATEWAY
path: services/idp/pkg/backends/cs3/bootstrap/cs3.go:76
foundincode: true
name: CS3_GATEWAY
type: ""
default_value: ""
description: ""
do_ignore: true
- rawname: CS3_MACHINE_AUTH_API_KEY
path: services/idp/pkg/backends/cs3/bootstrap/cs3.go:77
foundincode: true
name: CS3_MACHINE_AUTH_API_KEY
type: ""
default_value: ""
description: ""
do_ignore: true
- rawname: MICRO_LOG_LEVEL
path: ocis-pkg/log/log.go:34
foundincode: true
name: MICRO_LOG_LEVEL
type: string
default_value: Error
description: Set the log level for the internal go micro framework. Only change
on supervision of ownCloud Support.
do_ignore: false
- rawname: MICRO_LOG_LEVEL
path: ocis-pkg/log/log.go:30
foundincode: true
name: MICRO_LOG_LEVEL
type: ""
default_value: ""
description: ""
do_ignore: true
- rawname: registryEnv
path: ocis-pkg/registry/registry.go:44
foundincode: true
name: MICRO_REGISTRY
type: string
default_value: ""
description: 'Go micro registry type to use. Supported types are: ''nats'', ''kubernetes'',
''etcd'', ''consul'' and ''memory''. Will be selected automatically. Only change
on supervision of ownCloud Support.'
do_ignore: false
- rawname: registryAddressEnv
path: ocis-pkg/registry/registry.go:42
foundincode: true
name: MICRO_REGISTRY_ADDRESS
type: string
default_value: ""
description: The bind address of the internal go micro framework. Only change on
supervision of ownCloud Support.
do_ignore: false
- rawname: OCIS_BASE_DATA_PATH
path: ocis-pkg/config/defaults/paths.go:23
foundincode: true
name: OCIS_BASE_DATA_PATH
type: string
default_value: '''/var/lib/ocis'' or ''$HOME/.ocis/'''
description: The base directory location used by several services and for user data.
Predefined to '/var/lib/ocis' for container images (inside the container) or '$HOME/.ocis/'
for binary releases. Can be adapted for services individually.
do_ignore: false
- rawname: OCIS_CONFIG_DIR
path: ocis-pkg/config/defaults/paths.go:56
foundincode: true
name: OCIS_CONFIG_DIR
type: string
default_value: '''/etc/ocis'' or ''$HOME/.ocis/config'''
description: The default directory location for config files. Predefined to '/etc/ocis'
for container images (inside the container) or '$HOME/.ocis/config' for binary
releases.
do_ignore: false
- rawname: parts[0]
path: ocis-pkg/config/envdecode/envdecode.go:382
foundincode: true
name: parts[0]
type: ""
default_value: ""
description: false positive - code that extract envvars for config structs
do_ignore: true

View File

@@ -1,73 +0,0 @@
variables:
- rawname: CS3_GATEWAY
path: services/idp/pkg/backends/cs3/bootstrap/cs3.go:76
foundincode: true
name: "CS3_GATEWAY"
type: ""
default_value: ""
description: ""
do_ignore: true
- rawname: CS3_MACHINE_AUTH_API_KEY
path: services/idp/pkg/backends/cs3/bootstrap/cs3.go:77
foundincode: true
name: "CS3_MACHINE_AUTH_API_KEY"
type: ""
default_value: ""
description: ""
do_ignore: true
- rawname: MICRO_LOG_LEVEL
path: ocis-pkg/log/log.go:34
foundincode: true
name: "MICRO_LOG_LEVEL"
type: "string"
default_value: "Error"
description: "Set the log level for the internal go micro framework. Only change on supervision of ownCloud Support."
do_ignore: false
- rawname: MICRO_LOG_LEVEL
path: ocis-pkg/log/log.go:30
foundincode: true
name: "MICRO_LOG_LEVEL"
type: ""
default_value: ""
description: ""
do_ignore: true
- rawname: registryEnv
path: ocis-pkg/registry/registry.go:44
foundincode: true
name: "MICRO_REGISTRY"
type: "string"
default_value: ""
description: "Go micro registry type to use. Supported types are: 'nats', 'kubernetes', 'etcd', 'consul' and 'memory'. Will be selected automatically. Only change on supervision of ownCloud Support."
do_ignore: false
- rawname: registryAddressEnv
path: ocis-pkg/registry/registry.go:42
foundincode: true
name: "MICRO_REGISTRY_ADDRESS"
type: "string"
default_value: ""
description: "The bind address of the internal go micro framework. Only change on supervision of ownCloud Support."
do_ignore: false
- rawname: OCIS_BASE_DATA_PATH
path: ocis-pkg/config/defaults/paths.go:23
foundincode: true
name: "OCIS_BASE_DATA_PATH"
type: "string"
default_value: "'/var/lib/ocis' or '$HOME/.ocis/'"
description: "The base directory location used by several services and for user data. Predefined to '/var/lib/ocis' for container images (inside the container) or '$HOME/.ocis/' for binary releases. Can be adapted for services individually."
do_ignore: false
- rawname: OCIS_CONFIG_DIR
path: ocis-pkg/config/defaults/paths.go:56
foundincode: true
name: "OCIS_CONFIG_DIR"
type: "string"
default_value: "'/etc/ocis' or '$HOME/.ocis/config'"
description: "The default directory location for config files. Predefined to '/etc/ocis' for container images (inside the container) or '$HOME/.ocis/config' for binary releases."
do_ignore: false
- rawname: parts[0]
path: ocis-pkg/config/envdecode/envdecode.go:382
foundincode: true
name: parts[0]
type: ""
default_value: ""
description: false positive - code that extract envvars for config structs
do_ignore: true

View File

@@ -15,7 +15,7 @@ import (
"gopkg.in/yaml.v2"
)
const yamlSource = "global_vars.yaml"
const yamlSource = "extended_vars.yaml"
// ConfigVars is the main yaml source
type ConfigVars struct {
@@ -70,7 +70,7 @@ func GetRogueEnvs() {
log.Fatal(err)
}
fmt.Println("Gathering variable definitions from source")
out, err := exec.Command("bash", "-c", "grep -RHn os.Getenv | grep -v rogueEnv.go |grep \\.go").Output()
out, err := exec.Command("sh", "-c", "grep -RHn os.Getenv | grep -v rogueEnv.go |grep \\.go").Output()
if err != nil {
log.Fatal(err)
}
@@ -164,7 +164,7 @@ func RenderGlobalVarsTemplate() {
log.Fatal(err)
}
targetFile, err := os.Create(filepath.Join(targetFolder, "global_configvars.adoc"))
targetFile, err := os.Create(filepath.Join(targetFolder, "extended_configvars.adoc"))
if err != nil {
log.Fatalf("Failed to create target file: %s", err)
}