refactor: remove korean in configmap
This commit is contained in:
parent
e544645d7c
commit
44275a91e6
@ -5,10 +5,10 @@ metadata:
|
|||||||
namespace: ${namespace}
|
namespace: ${namespace}
|
||||||
data:
|
data:
|
||||||
runtime-env.js: |
|
runtime-env.js: |
|
||||||
console.log('=== RUNTIME-ENV.JS 로드됨 (배포 환경) ===');
|
console.log('=== RUNTIME-ENV.JS LOADED (PRODUCTION) ===');
|
||||||
|
|
||||||
window.__runtime_config__ = {
|
window.__runtime_config__ = {
|
||||||
// 백엔드 API 구조에 맞게 URL 설정 - ingress host 사용
|
// Backend API URLs using ingress host
|
||||||
AUTH_URL: 'http://${ingress_host}/api/auth',
|
AUTH_URL: 'http://${ingress_host}/api/auth',
|
||||||
MEMBER_URL: 'http://${ingress_host}/api/member',
|
MEMBER_URL: 'http://${ingress_host}/api/member',
|
||||||
STORE_URL: 'http://${ingress_host}/api/store',
|
STORE_URL: 'http://${ingress_host}/api/store',
|
||||||
@ -17,10 +17,10 @@ data:
|
|||||||
CONTENT_URL: 'http://${ingress_host}/api/content',
|
CONTENT_URL: 'http://${ingress_host}/api/content',
|
||||||
RECOMMEND_URL: 'http://${ingress_host}/api/recommend',
|
RECOMMEND_URL: 'http://${ingress_host}/api/recommend',
|
||||||
|
|
||||||
// Gateway URL (운영 환경)
|
// Gateway URL (production environment)
|
||||||
GATEWAY_URL: 'http://${ingress_host}',
|
GATEWAY_URL: 'http://${ingress_host}',
|
||||||
|
|
||||||
// 기능 플래그
|
// Feature flags
|
||||||
FEATURES: {
|
FEATURES: {
|
||||||
ANALYTICS: true,
|
ANALYTICS: true,
|
||||||
PUSH_NOTIFICATIONS: true,
|
PUSH_NOTIFICATIONS: true,
|
||||||
@ -29,46 +29,46 @@ data:
|
|||||||
API_HEALTH_CHECK: true,
|
API_HEALTH_CHECK: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
// 환경 설정 (배포 환경)
|
// Environment settings (production)
|
||||||
ENV: 'production',
|
ENV: 'production',
|
||||||
DEBUG: false,
|
DEBUG: false,
|
||||||
|
|
||||||
// API 타임아웃 설정
|
// API timeout settings
|
||||||
API_TIMEOUT: 30000,
|
API_TIMEOUT: 30000,
|
||||||
|
|
||||||
// 재시도 설정
|
// Retry settings
|
||||||
RETRY_ATTEMPTS: 3,
|
RETRY_ATTEMPTS: 3,
|
||||||
RETRY_DELAY: 1000,
|
RETRY_DELAY: 1000,
|
||||||
|
|
||||||
// 버전 정보
|
// Version info
|
||||||
VERSION: '1.0.0',
|
VERSION: '1.0.0',
|
||||||
BUILD_DATE: new Date().toISOString()
|
BUILD_DATE: new Date().toISOString()
|
||||||
};
|
};
|
||||||
|
|
||||||
// 설정 검증 함수
|
// Config validation function
|
||||||
const validateConfig = () => {
|
const validateConfig = () => {
|
||||||
const config = window.__runtime_config__;
|
const config = window.__runtime_config__;
|
||||||
const requiredUrls = ['AUTH_URL', 'STORE_URL', 'SALES_URL', 'RECOMMEND_URL'];
|
const requiredUrls = ['AUTH_URL', 'STORE_URL', 'SALES_URL', 'RECOMMEND_URL'];
|
||||||
|
|
||||||
for (const url of requiredUrls) {
|
for (const url of requiredUrls) {
|
||||||
if (!config[url]) {
|
if (!config[url]) {
|
||||||
console.error(`❌ [CONFIG] 필수 URL 누락: ${url}`);
|
console.error('Missing required URL: ' + url);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('✅ [CONFIG] 설정 검증 완료');
|
console.log('Config validation completed');
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 전역 설정 접근 함수
|
// Global config access functions
|
||||||
window.getApiConfig = () => window.__runtime_config__;
|
window.getApiConfig = () => window.__runtime_config__;
|
||||||
window.getApiUrl = (serviceName) => {
|
window.getApiUrl = (serviceName) => {
|
||||||
const config = window.__runtime_config__;
|
const config = window.__runtime_config__;
|
||||||
const urlKey = `${serviceName.toUpperCase()}_URL`;
|
const urlKey = serviceName.toUpperCase() + '_URL';
|
||||||
return config[urlKey] || null;
|
return config[urlKey] || null;
|
||||||
};
|
};
|
||||||
|
|
||||||
// 설정 검증 실행
|
// Execute validation
|
||||||
validateConfig();
|
validateConfig();
|
||||||
console.log('✅ [RUNTIME] 런타임 설정 로드 완료 (배포 환경)');
|
console.log('Runtime config loaded successfully (PRODUCTION)');
|
||||||
Loading…
x
Reference in New Issue
Block a user