Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 32 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions cincinnati/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ url = "^1.7.2"
log = "^0.4.3"
futures = "0.1"
tokio = "0.1"
toml = "^0.4.10"
try_from = "0.3.2"

[dev-dependencies]
Expand Down
1 change: 1 addition & 0 deletions dist/openshift/cincinnati.configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
type: Opaque
data:
gb.address: "0.0.0.0"
gb.status.address: "0.0.0.0"
gb.registry: "quay.io"
gb.repository: "steveej/cincinnati-test"
gb.log.verbosity: "vvv"
Expand Down
14 changes: 13 additions & 1 deletion dist/openshift/cincinnati.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ objects:
configMapKeyRef:
key: gb.address
name: cincinnati
- name: STATUS_ADDRESS
valueFrom:
configMapKeyRef:
key: gb.status.address
name: cincinnati
- name: REGISTRY
valueFrom:
configMapKeyRef:
Expand All @@ -54,7 +59,14 @@ objects:
configMapKeyRef:
key: gb.log.verbosity
name: cincinnati
args: ["-$(GB_LOG_VERBOSITY)", "--address", "$(ADDRESS)", "--port", "${GB_PORT}", "--registry", "$(REGISTRY)", "--repository", "$(REPOSITORY)", "--credentials-file=/etc/secrets/registry-credentials"]
args: ["-$(GB_LOG_VERBOSITY)",
"--service.address", "$(ADDRESS)",
"--service.port", "${GB_PORT}",
"--status.address", "$(STATUS_ADDRESS)",
"--status.port", "${GB_STATUS_PORT}",
"--upstream.registry.url", "$(REGISTRY)",
"--upstream.registry.repository", "$(REPOSITORY)",
"--upstream.registry.credentials_path", "/etc/secrets/registry-credentials"]
ports:
- name: graph-builder
containerPort: ${{GB_PORT}}
Expand Down
25 changes: 25 additions & 0 deletions docs/user/graph-builder-configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Graph-builder configuration

Graph-builder can be configured via TOML files and command-line options, with the latter having higher priority.

## TOML options

TOML configuration currently supports the following sections and options:

- `verbosity` (unsigned integer): log verbosity level, from 0 (errors and warnings only) to 3 (all trace messages). Default: 0.
- `service` (section): configuration options related to the main HTTP Cincinnati service.
- `address` (string): local IP for the main service. Default: "127.0.0.1".
- `mandatory_client_parameters` (list of strings): Cincinnati query parameters that must be present in client requests. Default: empty.
- `path_prefix` (string): namespace prefix for all API endpoints. Default: "".
- `port` (unsigned integer): local port for the main service. Default: 8080.
- `status` (section): configuration options related to the HTTP status service.
- `address` (string): local IP for the status service. Default: "127.0.0.1".
- `port` (unsigned integer): local port for the status service. Default: 9080.
- `upstream` (section): configuration options related to upstream release-data provider.
- `method` (string): upstream provider selector. Allowed values: "registry". Default: "registry".
- `registry` (section): configuration for Docker-v2 registry provider.
- `credentials_path` (string): path to file containing registry credentials, in "dockercfg" format. Default: unset.
- `manifestref_key` (string): metadata key where to record the manifest-reference. Default: "com.openshift.upgrades.graph.release.manifestref".
- `pause_secs` (unsigned integer): pause between repository scrapes, in seconds. Default: 30.
- `repository` (string): target image in the registry. Default: "openshift".
- `url` (string): URL for the registry. Default: "http://localhost:5000".
2 changes: 2 additions & 0 deletions graph-builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ semver = { version = "^0.9.0", features = [ "serde" ] }
serde = "^1.0.70"
serde_derive = "^1.0.70"
serde_json = "^1.0.22"
smart-default = "^0.5.1"
structopt = "^0.2.10"
tar = "^0.4.16"
tokio = "0.1"
toml = "^0.4.10"
url = "^1.7.2"

[features]
Expand Down
110 changes: 0 additions & 110 deletions graph-builder/src/config.rs

This file was deleted.

Loading