fix template
This commit is contained in:
parent
35d3db7400
commit
17f5a900d5
@ -38,13 +38,10 @@ spec:
|
||||
- containerPort: {{ .Values.frontend.service.targetPort }}
|
||||
name: http
|
||||
protocol: TCP
|
||||
{{- with .Values.frontend.env }}
|
||||
env:
|
||||
{{- range $key, $value := . }}
|
||||
- name: {{ $key }}
|
||||
value: {{ $value | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: env-config
|
||||
mountPath: /usr/share/nginx/html/env.js
|
||||
subPath: env.js
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
@ -67,4 +64,7 @@ spec:
|
||||
memory: {{ .Values.frontend.resources.requests.memory }}
|
||||
limits:
|
||||
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
|
||||
path: /
|
||||
pathType: Prefix
|
||||
environment:
|
||||
VITE_API_URL: "https://api.yourdomain.com"
|
||||
env:
|
||||
API_BASE: "https://api.yourdomain.com"
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
|
||||
@ -71,8 +71,8 @@ frontend:
|
||||
host: app.lab.local
|
||||
path: /
|
||||
pathType: Prefix
|
||||
environment:
|
||||
VITE_API_URL: "http://api.lab.local"
|
||||
env:
|
||||
API_BASE: "http://api.lab.local"
|
||||
|
||||
ingress:
|
||||
enabled: true
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user