fix template
This commit is contained in:
parent
35d3db7400
commit
17f5a900d5
@ -38,13 +38,10 @@ spec:
|
|||||||
- containerPort: {{ .Values.frontend.service.targetPort }}
|
- containerPort: {{ .Values.frontend.service.targetPort }}
|
||||||
name: http
|
name: http
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
{{- with .Values.frontend.env }}
|
volumeMounts:
|
||||||
env:
|
- name: env-config
|
||||||
{{- range $key, $value := . }}
|
mountPath: /usr/share/nginx/html/env.js
|
||||||
- name: {{ $key }}
|
subPath: env.js
|
||||||
value: {{ $value | quote }}
|
|
||||||
{{- end }}
|
|
||||||
{{- end }}
|
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /
|
path: /
|
||||||
@ -67,4 +64,7 @@ spec:
|
|||||||
memory: {{ .Values.frontend.resources.requests.memory }}
|
memory: {{ .Values.frontend.resources.requests.memory }}
|
||||||
limits:
|
limits:
|
||||||
cpu: {{ .Values.frontend.resources.limits.cpu }}
|
cpu: {{ .Values.frontend.resources.limits.cpu }}
|
||||||
memory: {{ .Values.frontend.resources.limits.memory }}
|
memory: {{ .Values.frontend.resources.limits.memory }} volumes:
|
||||||
|
- name: env-config
|
||||||
|
configMap:
|
||||||
|
name: {{ .Release.Name }}-frontend-env-config
|
||||||
13
charts/dateme-chart/templates/frontend-env-configmap.yaml
Normal file
13
charts/dateme-chart/templates/frontend-env-configmap.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: {{ .Release.Name }}-frontend-env-config
|
||||||
|
namespace: {{ .Values.global.namespace }}
|
||||||
|
labels:
|
||||||
|
app: {{ .Release.Name }}-{{ .Values.frontend.name }}
|
||||||
|
component: frontend
|
||||||
|
data:
|
||||||
|
env.js: |
|
||||||
|
window.__ENV__ = {
|
||||||
|
API_BASE: "{{ .Values.frontend.env.API_BASE }}"
|
||||||
|
};
|
||||||
@ -66,8 +66,8 @@ frontend:
|
|||||||
host: yourdomain.com
|
host: yourdomain.com
|
||||||
path: /
|
path: /
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
environment:
|
env:
|
||||||
VITE_API_URL: "https://api.yourdomain.com"
|
API_BASE: "https://api.yourdomain.com"
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|||||||
@ -71,8 +71,8 @@ frontend:
|
|||||||
host: app.lab.local
|
host: app.lab.local
|
||||||
path: /
|
path: /
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
environment:
|
env:
|
||||||
VITE_API_URL: "http://api.lab.local"
|
API_BASE: "http://api.lab.local"
|
||||||
|
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user