Skip to content

Commit

Permalink
feat(log-level): Make RHDH log level configurable (#134)
Browse files Browse the repository at this point in the history
Signed-off-by: Pavel Macík <[email protected]>
  • Loading branch information
pmacik committed Dec 3, 2024
1 parent c075c12 commit 9d2c821
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ export DURATION ?= 1m
# Used to set --spawn-rate option of locust CLI (Rate to spawn users at (users per second)). See https://docs.locust.io/en/stable/configuration.html#command-line-options for details
export SPAWN_RATE ?= 20

# Used to set logging level of RHDH
export RHDH_LOG_LEVEL ?= warn

# RHDH image to deploy. Uncomment and set to override RHDH image to deploy and test.
export RHDH_IMAGE_REGISTRY ?=
export RHDH_IMAGE_REPO ?=
Expand Down
2 changes: 2 additions & 0 deletions ci-scripts/rhdh-setup/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export AUTH_PROVIDER="${AUTH_PROVIDER:-''}"
export ENABLE_RBAC="${ENABLE_RBAC:-false}"
export ENABLE_PROFILING="${ENABLE_PROFILING:-false}"
export RBAC_POLICY="${RBAC_POLICY:-all_groups_admin}"
export RHDH_LOG_LEVEL="${RHDH_LOG_LEVEL:-warn}"

export PSQL_LOG="${PSQL_LOG:-true}"
export RHDH_METRIC="${RHDH_METRIC:-true}"
Expand Down Expand Up @@ -342,6 +343,7 @@ install_rhdh_with_helm() {
${RHDH_IMAGE_TAG} \
${RHDH_NAMESPACE} \
${RHDH_METRIC} \
${RHDH_LOG_LEVEL} \
${COOKIE_SECRET} \
' <"$TMP_DIR/chart-values.temp.yaml" >"$TMP_DIR/chart-values.yaml"
if [ -n "${RHDH_RESOURCES_CPU_REQUESTS}" ]; then yq -i '.upstream.backstage.resources.requests.cpu = "'"${RHDH_RESOURCES_CPU_REQUESTS}"'"' "$TMP_DIR/chart-values.yaml"; fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ upstream:
key: CLIENT_SECRET
name: keycloak-client-secret-backstage
- name: LOG_LEVEL
value: "warn"
value: "${RHDH_LOG_LEVEL}"
- name: NODE_TLS_REJECT_UNAUTHORIZED
value: "0"
image:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ upstream:
key: CLIENT_SECRET
name: keycloak-client-secret-backstage
- name: LOG_LEVEL
value: "warn"
value: "${RHDH_LOG_LEVEL}"
- name: NODE_TLS_REJECT_UNAUTHORIZED
value: "0"
installDir: /app
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
- name: KEYCLOAK_REALM
value: "backstage"
- name: LOG_LEVEL
value: "warn"
value: "${RHDH_LOG_LEVEL}"
- name: NODE_TLS_REJECT_UNAUTHORIZED
value: "0"
secrets:
Expand Down
1 change: 1 addition & 0 deletions test.env
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
# export RBAC_POLICY=all_groups_admin
# export RBAC_POLICY_SIZE=10000
# export ENABLE_PROFILING=false
# export RHDH_LOG_LEVEL=warn

## Scalability testing
# export SCALE_WORKERS="1 2"
Expand Down

0 comments on commit 9d2c821

Please sign in to comment.