Fetch the data correct
This commit is contained in:
parent
4fc5494525
commit
fa26c24d15
@ -10,7 +10,7 @@ function App() {
|
|||||||
const [sections, setSections] = useState([]);
|
const [sections, setSections] = useState([]);
|
||||||
|
|
||||||
const fetchSections = () => {
|
const fetchSections = () => {
|
||||||
fetch('/apps')
|
fetch('/api/apps')
|
||||||
.then(res => res.json())
|
.then(res => res.json())
|
||||||
.then(data => setSections(data.sections || []));
|
.then(data => setSections(data.sections || []));
|
||||||
};
|
};
|
||||||
|
|||||||
@ -14,7 +14,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: backend
|
- name: backend
|
||||||
image: "{{ .Values.backend.image.repository }}:{{ .Values.backend.image.tag }}"
|
image: "{{ .Values.backend.image.repository }}:{{ .Values.backend.tag }}"
|
||||||
imagePullPolicy: {{ .Values.backend.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.backend.image.pullPolicy }}
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8000
|
- containerPort: 8000
|
||||||
|
|||||||
@ -24,7 +24,7 @@ spec:
|
|||||||
|
|
||||||
containers:
|
containers:
|
||||||
- name: frontend
|
- name: frontend
|
||||||
image: "{{ .Values.frontend.image.repository }}:{{ .Values.frontend.image.tag }}"
|
image: "{{ .Values.frontend.image.repository }}:{{ .Values.frontend.tag }}"
|
||||||
imagePullPolicy: {{ .Values.frontend.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.frontend.image.pullPolicy }}
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
|
|||||||
@ -10,16 +10,20 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
ingressClassName: {{ .Values.frontend.ingress.className }}
|
ingressClassName: {{ .Values.frontend.ingress.className }}
|
||||||
rules:
|
rules:
|
||||||
- host: {{ .Values.frontend.ingress.hosts[0].host }}
|
{{- range .Values.frontend.ingress.hosts }}
|
||||||
|
- host: {{ .host }}
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /
|
{{- range .paths }}
|
||||||
pathType: Prefix
|
- path: {{ .path }}
|
||||||
|
pathType: {{ .pathType }}
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
name: navix-frontend
|
name: navix-frontend
|
||||||
port:
|
port:
|
||||||
number: {{ .Values.frontend.service.port }}
|
number: {{ $.Values.frontend.service.port }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -36,14 +40,18 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
ingressClassName: {{ .Values.backend.ingress.className }}
|
ingressClassName: {{ .Values.backend.ingress.className }}
|
||||||
rules:
|
rules:
|
||||||
- host: {{ .Values.backend.ingress.hosts[0].host }}
|
{{- range .Values.backend.ingress.hosts }}
|
||||||
|
- host: {{ .host }}
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- path: /api
|
{{- range .paths }}
|
||||||
pathType: Prefix
|
- path: {{ .path }}
|
||||||
|
pathType: {{ .pathType }}
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
name: navix-backend
|
name: navix-backend
|
||||||
port:
|
port:
|
||||||
number: {{ .Values.backend.service.port }}
|
number: {{ $.Values.backend.service.port }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
@ -1,8 +1,8 @@
|
|||||||
frontend:
|
frontend:
|
||||||
image:
|
image:
|
||||||
repository: harbor.dvirlabs.com/my-apps/navix-front
|
repository: harbor.dvirlabs.com/my-apps/navix-frontend
|
||||||
tag: latest
|
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
|
tag: master-4fc5494
|
||||||
service:
|
service:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
port: 80
|
port: 80
|
||||||
@ -21,12 +21,12 @@ frontend:
|
|||||||
API_BASE: "https://navix.dvirlabs.com/api"
|
API_BASE: "https://navix.dvirlabs.com/api"
|
||||||
MINIO_ENDPOINT: "s3.dvirlabs.com"
|
MINIO_ENDPOINT: "s3.dvirlabs.com"
|
||||||
MINIO_BUCKET: "navix-icons"
|
MINIO_BUCKET: "navix-icons"
|
||||||
|
tag: master-4fc5494
|
||||||
backend:
|
backend:
|
||||||
image:
|
image:
|
||||||
repository: harbor.dvirlabs.com/my-apps/navix-back
|
repository: harbor.dvirlabs.com/my-apps/navix-backend
|
||||||
tag: latest
|
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
|
tag: master-4fc5494
|
||||||
service:
|
service:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
port: 8000
|
port: 8000
|
||||||
@ -42,7 +42,8 @@ backend:
|
|||||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
traefik.ingress.kubernetes.io/router.tls: "true"
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
hosts:
|
hosts:
|
||||||
- host: navix.dvirlabs.com
|
- host: api-navix.dvirlabs.com
|
||||||
paths:
|
paths:
|
||||||
- path: /api
|
- path: /api
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user