File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6363 timeoutSeconds : 5
6464 successThreshold : 1
6565 failureThreshold : 3
66+ resources :
67+ {{- toYaml .Values.backend.resources | nindent 12 }}
6668 volumes :
6769 - name : log-volume
6870 emptyDir : {}
Original file line number Diff line number Diff line change 1+ {{- if .Values.ingress.enabled -}}
2+ apiVersion : networking.k8s.io/v1
3+ kind : Ingress
4+ metadata :
5+ name : {{ include "helm.fullname" . }}-ingress
6+ labels :
7+ {{- include "helm.labels" . | nindent 4 }}
8+ annotations :
9+ kubernetes.io/ingress.class : traefik
10+ traefik.ingress.kubernetes.io/router.entrypoints : web
11+ spec :
12+ rules :
13+ - host : {{ .Values.ingress.host }}
14+ http :
15+ paths :
16+ - path : {{ .Values.ingress.path }}
17+ pathType : Prefix
18+ backend :
19+ service :
20+ name : {{ include "helm.fullname" . }}-service
21+ port :
22+ number : {{ .Values.backend.service.port }}
23+ {{- end }}
Original file line number Diff line number Diff line change @@ -13,6 +13,10 @@ backend:
1313 service :
1414 type : ClusterIP
1515 port : 8080
16+ ingress :
17+ enabled : true
18+ host : " api.unipoint.ngtukien.id.vn"
19+ path : /api
1620 environment :
1721 SPRING_PROFILES_ACTIVE : " default"
1822 CORS_ALLOWED_ORIGINS : " *"
@@ -43,6 +47,13 @@ backend:
4347 FACE_INTEGRATION_BASE_URL : " http://ttcs-opencv:8000"
4448 # Mail
4549 MAIL_USERNAME : " "
50+ resources :
51+ requests :
52+ memory : " 512Mi"
53+ cpu : " 250m"
54+ limits :
55+ memory : " 1Gi"
56+ cpu : " 500m"
4657 secrets :
4758 POSTGRES_PASSWORD : ttcs_2026
4859 REDIS_PASSWORD : TTCS_2026
Original file line number Diff line number Diff line change 88 default.conf : |
99 server {
1010 listen 80;
11+ client_max_body_size 10m;
12+
1113 location / {
1214 root /usr/share/nginx/html;
1315 index index.html index.htm;
2022 location /api/ {
2123 proxy_pass http://{{ .Values.backend.name }}:{{ .Values.backend.service.port }}/api/;
2224 proxy_http_version 1.1;
25+ set $forwarded_proto $scheme;
26+ if ($http_x_forwarded_proto != "") {
27+ set $forwarded_proto $http_x_forwarded_proto;
28+ }
2329 proxy_set_header Host $host;
2430 proxy_set_header X-Real-IP $remote_addr;
2531 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
26- proxy_set_header X-Forwarded-Proto $scheme ;
32+ proxy_set_header X-Forwarded-Proto $forwarded_proto ;
2733 }
2834 }
Original file line number Diff line number Diff line change 1+ {{- if .Values.ingress.enabled -}}
2+ apiVersion : networking.k8s.io/v1
3+ kind : Ingress
4+ metadata :
5+ name : {{ include "helm.fullname" . }}-ingress
6+ labels :
7+ {{- include "helm.labels" . | nindent 4 }}
8+ annotations :
9+ kubernetes.io/ingress.class : traefik
10+ traefik.ingress.kubernetes.io/router.entrypoints : web
11+ spec :
12+ rules :
13+ - host : {{ .Values.ingress.host }}
14+ http :
15+ paths :
16+ - path : {{ .Values.ingress.path }}
17+ pathType : Prefix
18+ backend :
19+ service :
20+ name : {{ include "helm.fullname" . }}-service
21+ port :
22+ number : {{ .Values.frontend.service.port }}
23+ {{- end }}
Original file line number Diff line number Diff line change @@ -14,6 +14,10 @@ frontend:
1414 type : NodePort
1515 port : 80
1616 nodePort : 30030
17+ ingress :
18+ enabled : true
19+ host : " unipoint.ngtukien.id.vn"
20+ path : /
1721
1822backend :
1923 name : unipoint-backend
You can’t perform that action at this time.
0 commit comments