Change front and back tag and the chart
This commit is contained in:
parent
be619c0138
commit
6a78e90681
23
charts/navix-helm/templates/backend-ingress.yaml
Normal file
23
charts/navix-helm/templates/backend-ingress.yaml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{{- if .Values.backend.ingress.enabled }}
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: navix-backend
|
||||||
|
annotations:
|
||||||
|
{{- range $key, $value := .Values.backend.ingress.annotations }}
|
||||||
|
{{ $key }}: {{ $value | quote }}
|
||||||
|
{{- end }}
|
||||||
|
spec:
|
||||||
|
ingressClassName: {{ .Values.backend.ingress.className }}
|
||||||
|
rules:
|
||||||
|
- host: {{ .Values.backend.ingress.hosts[0].host }}
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /api
|
||||||
|
pathType: Prefix
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: navix-backend
|
||||||
|
port:
|
||||||
|
number: {{ .Values.backend.service.port }}
|
||||||
|
{{- end }}
|
||||||
@ -12,12 +12,33 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: navix-frontend
|
app: navix-frontend
|
||||||
spec:
|
spec:
|
||||||
|
initContainers:
|
||||||
|
- name: copy-env
|
||||||
|
image: busybox
|
||||||
|
command: ["sh", "-c", "cp /config/env.js /env/env.js"]
|
||||||
|
volumeMounts:
|
||||||
|
- name: env-config
|
||||||
|
mountPath: /config
|
||||||
|
- name: env-volume
|
||||||
|
mountPath: /env
|
||||||
|
|
||||||
containers:
|
containers:
|
||||||
- name: frontend
|
- name: frontend
|
||||||
image: "{{ .Values.frontend.image.repository }}:{{ .Values.frontend.image.tag }}"
|
image: "{{ .Values.frontend.image.repository }}:{{ .Values.frontend.image.tag }}"
|
||||||
imagePullPolicy: {{ .Values.frontend.image.pullPolicy }}
|
imagePullPolicy: {{ .Values.frontend.image.pullPolicy }}
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
env:
|
volumeMounts:
|
||||||
- name: VITE_API_URL
|
- name: env-volume
|
||||||
value: "http://navix-backend.{{ .Release.Namespace }}.svc.cluster.local:8000"
|
mountPath: /usr/share/nginx/html/env.js
|
||||||
|
subPath: env.js
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: env-volume
|
||||||
|
emptyDir: {}
|
||||||
|
- name: env-config
|
||||||
|
configMap:
|
||||||
|
name: navix-frontend-env
|
||||||
|
items:
|
||||||
|
- key: env.js
|
||||||
|
path: env.js
|
||||||
|
|||||||
9
charts/navix-helm/templates/frontend-env-configmap.yaml
Normal file
9
charts/navix-helm/templates/frontend-env-configmap.yaml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ConfigMap
|
||||||
|
metadata:
|
||||||
|
name: navix-frontend-env
|
||||||
|
data:
|
||||||
|
env.js: |
|
||||||
|
window.env = {
|
||||||
|
VITE_API_URL: "{{ .Values.frontend.env.VITE_API_URL }}"
|
||||||
|
};
|
||||||
@ -17,6 +17,8 @@ frontend:
|
|||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
|
env:
|
||||||
|
VITE_API_URL: "/api"
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
image:
|
image:
|
||||||
@ -32,4 +34,13 @@ backend:
|
|||||||
MINIO_ENDPOINT: "s3.dvirlabs.com"
|
MINIO_ENDPOINT: "s3.dvirlabs.com"
|
||||||
MINIO_BUCKET: "navix-icons"
|
MINIO_BUCKET: "navix-icons"
|
||||||
ingress:
|
ingress:
|
||||||
enabled: false
|
enabled: true
|
||||||
|
className: traefik
|
||||||
|
annotations:
|
||||||
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
|
hosts:
|
||||||
|
- host: navix.dvirlabs.com
|
||||||
|
paths:
|
||||||
|
- path: /api
|
||||||
|
pathType: Prefix
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
frontend:
|
frontend:
|
||||||
image:
|
image:
|
||||||
repository: harbor.dvirlabs.com/my-apps/navix-front
|
repository: harbor.dvirlabs.com/my-apps/navix-front
|
||||||
tag: v6-no-cicd
|
tag: latest
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
service:
|
service:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
@ -17,11 +17,13 @@ frontend:
|
|||||||
paths:
|
paths:
|
||||||
- path: /
|
- path: /
|
||||||
pathType: Prefix
|
pathType: Prefix
|
||||||
|
env:
|
||||||
|
VITE_API_URL: "/api"
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
image:
|
image:
|
||||||
repository: harbor.dvirlabs.com/my-apps/navix-back
|
repository: harbor.dvirlabs.com/my-apps/navix-back
|
||||||
tag: v2-no-cicd
|
tag: latest
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
service:
|
service:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
@ -32,4 +34,13 @@ backend:
|
|||||||
MINIO_ENDPOINT: "s3.dvirlabs.com"
|
MINIO_ENDPOINT: "s3.dvirlabs.com"
|
||||||
MINIO_BUCKET: "navix-icons"
|
MINIO_BUCKET: "navix-icons"
|
||||||
ingress:
|
ingress:
|
||||||
enabled: false
|
enabled: true
|
||||||
|
className: traefik
|
||||||
|
annotations:
|
||||||
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
|
hosts:
|
||||||
|
- host: navix.dvirlabs.com
|
||||||
|
paths:
|
||||||
|
- path: /api
|
||||||
|
pathType: Prefix
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user