--- 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:20250619110303 imagePullPolicy: Always ports: - containerPort: 18080 resources: requests: cpu: 128m 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