Skip to content

Commit

Permalink
fix: env var to disable newer release version updates
Browse files Browse the repository at this point in the history
RHINENG-13676

RHINENG-4854
  • Loading branch information
psegedy authored and jdobes committed Oct 15, 2024
1 parent ee3e652 commit 1513a35
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
10 changes: 10 additions & 0 deletions deploy/clowdapp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ objects:
value: ${VMAAS_LIB_MAX_GOROUTINES}
- name: SSL_CERT_DIR
value: ${SSL_CERT_DIR}
- name: NEWER_RELEASEVER_REPOS
value: ${NEWER_RELEASEVER_REPOS}
- name: NEWER_RELEASEVER_CSAF
value: ${NEWER_RELEASEVER_CSAF}
resources:
limits:
cpu: ${CPU_LIMIT_WEBAPP_GO}
Expand Down Expand Up @@ -480,3 +484,9 @@ parameters:
value: ''
- name: CSAF_PRODUCT_STATUS_LIST
value: "known_affected,fixed" # comma delimited list of products to parse
- name: NEWER_RELEASEVER_REPOS
description: Enable finding updates/cves in newer releaseversion from repositories
value: "true"
- name: NEWER_RELEASEVER_CSAF
description: Enable finding updates/cves in newer releaseversion from CSAF
value: "true"
2 changes: 2 additions & 0 deletions vmaas-go/base/core/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ func ConfigureCache() {
utils.Cfg.DumpAddress,
vmaas.WithMaxGoroutines(utils.Cfg.VmaasLibMaxGoroutines),
vmaas.WithUnfixed(utils.Cfg.UnfixedEvalEnabled),
vmaas.WithNewerReleaseverRepos(utils.Cfg.NewerReleaseverRepos),
vmaas.WithNewerReleaseverCsaf(utils.Cfg.NewerReleaseverCsaf),
)
if err != nil {
utils.LogWarn("err", err.Error(), "Cache not available on app start")
Expand Down
4 changes: 4 additions & 0 deletions vmaas-go/base/utils/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ type Config struct {
// lib
UnfixedEvalEnabled bool
VmaasLibMaxGoroutines int
NewerReleaseverRepos bool
NewerReleaseverCsaf bool
}

type (
Expand Down Expand Up @@ -130,6 +132,8 @@ func initEnv() {
Cfg.EnableProfiler = GetBoolEnvOrDefault("ENABLE_PROFILER", false)
Cfg.UnfixedEvalEnabled = GetBoolEnvOrDefault("CSAF_UNFIXED_EVAL_ENABLED", true)
Cfg.VmaasLibMaxGoroutines = GetIntEnvOrDefault("VMAAS_LIB_MAX_GOROUTINES", 20)
Cfg.NewerReleaseverRepos = GetBoolEnvOrDefault("NEWER_RELEASEVER_REPOS", true)
Cfg.NewerReleaseverCsaf = GetBoolEnvOrDefault("NEWER_RELEASEVER_CSAF", true)
}

func (e *Endpoint) BuildURL(scheme string) string {
Expand Down

0 comments on commit 1513a35

Please sign in to comment.