Skip to content

Commit 1acd71f

Browse files
ElderMattsvcAPLBot
andauthored
feat: hide falco app (#765)
* feat: hide falco app * fix: remove log --------- Co-authored-by: svcAPLBot <[email protected]>
1 parent 5f64fc3 commit 1acd71f

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/otomi-stack.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ import {
8181
GIT_REPO_URL,
8282
GIT_USER,
8383
HELM_CHART_CATALOG,
84+
HIDDEN_APPS,
8485
OBJ_STORAGE_APPS,
8586
PREINSTALLED_EXCLUDED_APPS,
8687
TOOLS_HOST,
@@ -136,6 +137,7 @@ const env = cleanEnv({
136137
TOOLS_HOST,
137138
VERSIONS,
138139
PREINSTALLED_EXCLUDED_APPS,
140+
HIDDEN_APPS,
139141
OBJ_STORAGE_APPS,
140142
})
141143

@@ -541,7 +543,9 @@ export default class OtomiStack {
541543
}
542544

543545
filterExcludedApp(apps: App | App[]) {
544-
const excludedApps = PREINSTALLED_EXCLUDED_APPS.default.apps
546+
const preInstalledExcludedApps = PREINSTALLED_EXCLUDED_APPS.default.apps
547+
const hiddenApps = HIDDEN_APPS.default.apps
548+
const excludedApps = preInstalledExcludedApps.concat(hiddenApps)
545549
const settingsInfo = this.getSettingsInfo()
546550
if (!Array.isArray(apps)) {
547551
if (settingsInfo.otomi && settingsInfo.otomi.isPreInstalled && excludedApps.includes(apps.id)) {

src/validators.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { bool, CleanedEnvAccessors, cleanEnv as clean, CleanOptions, json, num, str, ValidatorSpec } from 'envalid'
1+
import { bool, cleanEnv as clean, CleanedEnvAccessors, CleanOptions, json, num, str, ValidatorSpec } from 'envalid'
22

33
export const AUTHZ_MOCK_IS_PLATFORM_ADMIN = bool({
44
desc: 'Indicate if a mocked user is a platform admin',
@@ -65,6 +65,12 @@ export const PREINSTALLED_EXCLUDED_APPS = json({
6565
apps: ['cert-manager', 'minio', 'kured', 'velero', 'drone', 'external-dns'],
6666
},
6767
})
68+
export const HIDDEN_APPS = json({
69+
desc: 'Applications that are hidden from the apps page',
70+
default: {
71+
apps: ['falco'],
72+
},
73+
})
6874
export const OBJ_STORAGE_APPS = json({
6975
desc: 'Applications',
7076
default: [

0 commit comments

Comments
 (0)