Skip to content

Commit 299fc1c

Browse files
TenStMichaelMraka
authored andcommitted
RHINENG-21445: config cleanup
1 parent 79214cd commit 299fc1c

5 files changed

Lines changed: 0 additions & 16 deletions

File tree

conf/database_admin.env

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ MANAGER_PASSWORD=manager
55
LISTENER_PASSWORD=listener
66
VMAAS_SYNC_PASSWORD=vmaas_sync
77
EVALUATOR_PASSWORD=evaluator
8-
CYNDI_PASSWORD=cyndi
98

109
# Optionally set schema_migration=XXX and/or reset_schema
1110
POD_CONFIG=update_users;update_db_config;wait_for_db=empty

database_admin/config.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ var (
1313
resetSchema = utils.PodConfig.GetBool("reset_schema", false)
1414
// Create users and update their password
1515
updateUsers = utils.PodConfig.GetBool("update_users", false)
16-
// Reset cyndi password
17-
updateCyndiPasswd = utils.PodConfig.GetBool("update_cyndi_passwd", false)
1816
// rerun config.sql
1917
updateDBConfig = utils.PodConfig.GetBool("update_db_config", false)
2018
)

database_admin/update.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,6 @@ func UpdateDB(migrationFilesURL string) {
134134
execOrPanic(db, "ALTER USER evaluator WITH PASSWORD '"+utils.GetenvOrFail("EVALUATOR_PASSWORD")+"'")
135135
execOrPanic(db, "ALTER USER manager WITH PASSWORD '"+utils.GetenvOrFail("MANAGER_PASSWORD")+"'")
136136
execOrPanic(db, "ALTER USER vmaas_sync WITH PASSWORD '"+utils.GetenvOrFail("VMAAS_SYNC_PASSWORD")+"'")
137-
if updateCyndiPasswd {
138-
execOrPanic(db, "ALTER USER cyndi WITH PASSWORD '"+utils.GetenvOrFail("CYNDI_PASSWORD")+"'")
139-
}
140137
}
141138

142139
if updateDBConfig {

manager/config/config.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ var (
1414
// Use in-memory package cache
1515
EnabledPackageCache = utils.PodConfig.GetBool("package_cache", true)
1616

17-
// Allow filtering by cyndi tags
18-
EnableCyndiTags = utils.PodConfig.GetBool("cyndi_tags", true)
1917
// Use precomputed system counts for advisories
2018
DisableCachedCounts = !utils.PodConfig.GetBool("cache_counts", true)
2119
// Satellite systems can't be assigned to baselines/templates

manager/controllers/utils.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"app/base/core"
66
"app/base/database"
77
"app/base/utils"
8-
"app/manager/config"
98
"app/manager/middlewares"
109
"encoding/csv"
1110
"fmt"
@@ -240,9 +239,6 @@ type Tag struct {
240239
}
241240

242241
func HasInventoryFilter(filters Filters) bool {
243-
if !config.EnableCyndiTags {
244-
return false
245-
}
246242
for _, data := range filters {
247243
switch data.Type {
248244
case InventoryFilter:
@@ -351,10 +347,6 @@ func parseTags(c *gin.Context, filters Filters) error {
351347

352348
// Filter systems by tags with subquery
353349
func ApplyInventoryFilter(filters map[string]FilterData, tx *gorm.DB, systemIDExpr string) (*gorm.DB, bool) {
354-
if !config.EnableCyndiTags {
355-
return tx, false
356-
}
357-
358350
subq := database.DB.
359351
Table("system_inventory si").
360352
Select("si.inventory_id")

0 commit comments

Comments
 (0)