-
Notifications
You must be signed in to change notification settings - Fork 292
Expand file tree
/
Copy pathconstants.ts
More file actions
175 lines (167 loc) · 5.07 KB
/
constants.ts
File metadata and controls
175 lines (167 loc) · 5.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
import * as path from 'path';
import './dotenv';
import { DashboardConfig, KnownLabels, NotebookSize } from '../types';
export const PORT = Number(process.env.PORT) || Number(process.env.BACKEND_PORT) || 8080;
export const IP = process.env.IP || '0.0.0.0';
export const LOG_LEVEL = process.env.FASTIFY_LOG_LEVEL || process.env.LOG_LEVEL || 'info';
export const LOG_DIR = path.join(__dirname, '../../../logs');
export const DEV_MODE = process.env.APP_ENV === 'development';
/** Allows a username to be impersonated in place of the logged in user for testing purposes -- impacts only some API */
export const DEV_IMPERSONATE_USER = DEV_MODE ? process.env.DEV_IMPERSONATE_USER : undefined;
export const DEV_IMPERSONATE_PASSWORD = DEV_MODE ? process.env.DEV_IMPERSONATE_PASSWORD : undefined;
export const DEV_OAUTH_PREFIX = process.env.DEV_OAUTH_PREFIX || 'oauth-openshift.apps';
export const APP_ENV = process.env.APP_ENV;
export const USER_ACCESS_TOKEN = 'x-forwarded-access-token';
export const KUBE_RBAC_USER_HEADER = 'x-auth-request-user';
export const KUBE_RBAC_GROUPS_HEADER = 'x-auth-request-groups';
export const yamlRegExp = /\.ya?ml$/;
export const mdRegExp = /\.md$/;
export const IMAGE_ANNOTATIONS = {
DESC: 'opendatahub.io/notebook-image-desc',
DISP_NAME: 'opendatahub.io/notebook-image-name',
URL: 'opendatahub.io/notebook-image-url',
DEFAULT: 'opendatahub.io/default-image',
SOFTWARE: 'opendatahub.io/notebook-software',
DEPENDENCIES: 'opendatahub.io/notebook-python-dependencies',
IMAGE_ORDER: 'opendatahub.io/notebook-image-order',
RECOMMENDED: 'opendatahub.io/workbench-image-recommended',
OUTDATED: 'opendatahub.io/image-tag-outdated',
};
/**
* Our defaults for our app. Foundation for anything defined in the OdhDashboardConfig yaml on cluster.
* @see odhdashboardconfig.yaml
*/
export const blankDashboardCR: DashboardConfig = {
apiVersion: 'opendatahub.io/v1alpha',
kind: 'OdhDashboardConfig',
metadata: {
name: 'odh-dashboard-config',
labels: {
'opendatahub.io/dashboard': 'true',
},
},
spec: {
dashboardConfig: {
// Defaults, do not need to be redeclared in any OdhDashboardConfig.yaml files
enablement: true,
disableInfo: false,
disableSupport: false,
disableClusterManager: false,
disableTracking: true,
disableBYONImageStream: false,
disableISVBadges: false,
disableAppLauncher: false,
disableUserManagement: false,
disableHome: false,
disableProjects: false,
disableModelServing: false,
disableProjectScoped: false,
disableProjectSharing: false,
disableCustomServingRuntimes: false,
disableTrustyBiasMetrics: false,
disablePerformanceMetrics: false,
disablePipelines: false,
disableKServe: false,
disableKServeAuth: false,
disableKServeMetrics: false,
disableKServeRaw: false,
disableDistributedWorkloads: false,
disableModelCatalog: false,
disableModelRegistry: false,
disableModelRegistrySecureDB: false,
disableServingRuntimeParams: false,
disableConnectionTypes: false,
disableStorageClasses: false,
disableNIMModelServing: false,
disableAdminConnectionTypes: false,
disableFeatureStore: false,
genAiStudio: false,
automl: false,
autorag: false,
modelAsService: false,
aiAssetCustomEndpoints: false,
disableFineTuning: true,
disableKueue: true,
disableLMEval: true,
mlflow: false,
mcpCatalog: false,
trainingJobs: true,
disableLLMd: false,
projectRBAC: true,
deploymentWizardYAMLViewer: false,
vLLMDeploymentOnMaaS: false,
promptManagement: false,
},
notebookController: {
enabled: true,
},
templateOrder: [],
genAiStudioConfig: {
aiAssetCustomEndpoints: {
externalProviders: false,
clusterDomains: [],
},
},
// templateDisablement: [], Don't create this field, will be used in migration
},
};
export const MOUNT_PATH = '/opt/app-root/src';
export const DEFAULT_PVC_SIZE = '20Gi';
export const DEFAULT_NOTEBOOK_SIZES: NotebookSize[] = [
{
name: 'Small',
resources: {
requests: {
cpu: '1',
memory: '8Gi',
},
limits: {
cpu: '2',
memory: '8Gi',
},
},
},
{
name: 'Medium',
resources: {
requests: {
cpu: '3',
memory: '24Gi',
},
limits: {
cpu: '6',
memory: '24Gi',
},
},
},
{
name: 'Large',
resources: {
requests: {
cpu: '7',
memory: '56Gi',
},
limits: {
cpu: '14',
memory: '56Gi',
},
},
},
{
name: 'X Large',
resources: {
requests: {
cpu: '15',
memory: '120Gi',
},
limits: {
cpu: '30',
memory: '120Gi',
},
},
},
];
export const THANOS_RBAC_PORT = '9092';
export const THANOS_INSTANCE_NAME = 'thanos-querier';
export const THANOS_NAMESPACE = 'openshift-monitoring';
export const LABEL_SELECTOR_DASHBOARD_RESOURCE = `${KnownLabels.DASHBOARD_RESOURCE}=true`;