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:
|
||||
app: navix-frontend
|
||||
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:
|
||||
- name: frontend
|
||||
image: "{{ .Values.frontend.image.repository }}:{{ .Values.frontend.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.frontend.image.pullPolicy }}
|
||||
ports:
|
||||
- containerPort: 80
|
||||
env:
|
||||
- name: VITE_API_URL
|
||||
value: "http://navix-backend.{{ .Release.Namespace }}.svc.cluster.local:8000"
|
||||
volumeMounts:
|
||||
- name: env-volume
|
||||
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:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
env:
|
||||
VITE_API_URL: "/api"
|
||||
|
||||
backend:
|
||||
image:
|
||||
@ -32,4 +34,13 @@ backend:
|
||||
MINIO_ENDPOINT: "s3.dvirlabs.com"
|
||||
MINIO_BUCKET: "navix-icons"
|
||||
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:
|
||||
image:
|
||||
repository: harbor.dvirlabs.com/my-apps/navix-front
|
||||
tag: v6-no-cicd
|
||||
tag: latest
|
||||
pullPolicy: IfNotPresent
|
||||
service:
|
||||
type: ClusterIP
|
||||
@ -17,11 +17,13 @@ frontend:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
env:
|
||||
VITE_API_URL: "/api"
|
||||
|
||||
backend:
|
||||
image:
|
||||
repository: harbor.dvirlabs.com/my-apps/navix-back
|
||||
tag: v2-no-cicd
|
||||
tag: latest
|
||||
pullPolicy: IfNotPresent
|
||||
service:
|
||||
type: ClusterIP
|
||||
@ -32,4 +34,13 @@ backend:
|
||||
MINIO_ENDPOINT: "s3.dvirlabs.com"
|
||||
MINIO_BUCKET: "navix-icons"
|
||||
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