Skip to content

Commit

Permalink
RHINENG-7684: allow template API enablement from env
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelMraka committed Mar 21, 2024
1 parent c72503f commit 8750a58
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions deploy/clowdapp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ objects:
- {name: ADVISORY_DETAIL_CACHE_SIZE, value: '${ADVISORY_DETAIL_CACHE_SIZE}'}
- {name: PRELOAD_ADVISORY_DETAIL_CACHE, value: '${PRELOAD_ADVISORY_DETAIL_CACHE}'}
- {name: ENABLE_BASELINES_API, value: '${ENABLE_BASELINES_API}'}
- {name: ENABLE_TEMPLATES_API, value: '${ENABLE_TEMPLATES_API}'}
- {name: ENABLE_BASELINE_CHANGE_EVAL, value: '${ENABLE_BASELINE_CHANGE_EVAL}'}
- {name: KAFKA_GROUP, value: patchman}
- {name: KAFKA_WRITER_MAX_ATTEMPTS, value: '${KAFKA_WRITER_MAX_ATTEMPTS}'}
Expand Down Expand Up @@ -589,6 +590,7 @@ parameters:
- {name: ADVISORY_DETAIL_CACHE_SIZE, value: '100'} # Advisory detail cache size (cached items count)
- {name: PRELOAD_ADVISORY_DETAIL_CACHE, value: 'true'} # Enable advisory detail cache preloading
- {name: ENABLE_BASELINES_API, value: 'true'} # Enable baselines API endpoints
- {name: ENABLE_TEMPLATES_API, value: 'true'} # Enable baselines API endpoints
- {name: ENABLE_BASELINE_CHANGE_EVAL, value: 'true'} # Send Kafka eval messages on baseline update
- {name: ENABLE_PACKAGE_CACHE_MANAGER, value: 'true'} # Enable caching for /packages endpoint
- {name: EVAL_TOPIC_MANAGER, value: patchman.evaluator.upload}
Expand Down
1 change: 1 addition & 0 deletions manager/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ func RunManager() {
func getEndpointsConfig() docs.EndpointsConfig {
config := docs.EndpointsConfig{
EnableBaselines: utils.GetBoolEnvOrDefault("ENABLE_BASELINES_API", true),
EnableTemplates: utils.GetBoolEnvOrDefault("ENABLE_TEMPLATES_API", true),
}
return config
}

0 comments on commit 8750a58

Please sign in to comment.