From afb3696164ac9e91710b82f2df4fe708fe9ea13b Mon Sep 17 00:00:00 2001 From: Jenkins CI Date: Thu, 19 Jun 2025 10:35:51 +0000 Subject: [PATCH] Update smarketing-frontend to 20250619103354 - Build 40 --- .../deployments/frontend-deployment.yaml | 114 ++++++++++++++++++ 1 file changed, 114 insertions(+) create mode 100644 smarketing-frontend/deployments/frontend-deployment.yaml diff --git a/smarketing-frontend/deployments/frontend-deployment.yaml b/smarketing-frontend/deployments/frontend-deployment.yaml new file mode 100644 index 0000000..3d52ad8 --- /dev/null +++ b/smarketing-frontend/deployments/frontend-deployment.yaml @@ -0,0 +1,114 @@ +--- +apiVersion: v1 +kind: ConfigMap +metadata: + name: smarketing-frontend-config + namespace: smarketing +data: + runtime-env.js: | + window.__runtime_config__ = { + AUTH_URL: 'http://smarketing.20.249.184.228.nip.io/api/auth', + MEMBER_URL: 'http://smarketing.20.249.184.228.nip.io/api/member', + STORE_URL: 'http://smarketing.20.249.184.228.nip.io/api/store', + MENU_URL: 'http://smarketing.20.249.184.228.nip.io/api/menu', + SALES_URL: 'http://smarketing.20.249.184.228.nip.io/api/sales', + CONTENT_URL: 'http://smarketing.20.249.184.228.nip.io/api/content', + RECOMMEND_URL: 'http://smarketing.20.249.184.228.nip.io/api/recommend', + GATEWAY_URL: 'http://smarketing.20.249.184.228.nip.io', + ENV: 'production', + DEBUG: false + }; + +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: smarketing-frontend + namespace: smarketing + labels: + app: smarketing-frontend +spec: + replicas: 1 + selector: + matchLabels: + app: smarketing-frontend + template: + metadata: + labels: + app: smarketing-frontend + spec: + imagePullSecrets: + - name: acr-secret + containers: + - name: smarketing-frontend + image: acrdigitalgarage02.azurecr.io/smarketing/smarketing-frontend:20250619103354 + imagePullPolicy: Always + ports: + - containerPort: 18080 + resources: + requests: + cpu: 128m # 프론트엔드는 CPU 사용량이 적음 + memory: 128Mi # 메모리도 적게 사용 + limits: + cpu: 512m # 제한도 낮게 설정 + memory: 512Mi + volumeMounts: + - name: runtime-config + mountPath: /usr/share/nginx/html/runtime-env.js + subPath: runtime-env.js + livenessProbe: + httpGet: + path: /health + port: 18080 + initialDelaySeconds: 30 + periodSeconds: 10 + readinessProbe: + httpGet: + path: /health + port: 18080 + initialDelaySeconds: 5 + periodSeconds: 5 + volumes: + - name: runtime-config + configMap: + name: smarketing-frontend-config + +--- +apiVersion: v1 +kind: Service +metadata: + name: smarketing-frontend-service + namespace: smarketing + labels: + app: smarketing-frontend +spec: + type: LoadBalancer + ports: + - port: 80 + targetPort: 18080 + protocol: TCP + name: http + selector: + app: smarketing-frontend + +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: smarketing-frontend-ingress + namespace: smarketing + annotations: + nginx.ingress.kubernetes.io/rewrite-target: / + nginx.ingress.kubernetes.io/ssl-redirect: "false" +spec: + rules: + - host: smarketing.20.249.184.228.nip.io + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: smarketing-frontend-service + port: + number: 80