use relative path for backend URLs
This commit is contained in:
parent
e15ac52be7
commit
18276be75d
7 changed files with 28 additions and 14 deletions
4
.env
4
.env
|
@ -1,2 +1,2 @@
|
|||
REACT_APP_API_URL=https://oas-api.initdevelopment.com/api/v1
|
||||
EXTEND_ESLINT=true
|
||||
REACT_APP_API_URL=/api/v1
|
||||
EXTEND_ESLINT=true
|
||||
|
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -25,3 +25,6 @@ yarn-error.log*
|
|||
|
||||
.eslintcache
|
||||
cypress/videos/
|
||||
|
||||
# Helm dependencies
|
||||
deployment/helmchart/charts/
|
||||
|
|
|
@ -10,10 +10,8 @@ metadata:
|
|||
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
|
||||
{{- end }}
|
||||
data:
|
||||
REACT_APP_API_URL: "{{ include "adminBackend.serviceName" .}}"
|
||||
EXTEND_ESLINT: "{{ .Values.adminFrontend.extendEslint }}"
|
||||
ADMIN_FRONTEND_HOST: "{{ include "adminFrontend.host" . }}"
|
||||
ADMIN_BACKEND_HOST: "{{ include "adminBackend.host" . }}"
|
||||
# ADMIN_FRONTEND_HOST: "{{ include "adminFrontend.host" . }}"
|
||||
# ADMIN_BACKEND_HOST: "{{ include "adminBackend.host" . }}"
|
||||
# Probably needed in the future:
|
||||
# ADMIN_BACKEND_USERNAME: {{ .Values.adminBackend.username | quote }}
|
||||
# ADMIN_BACKEND_EMAIL: {{ .Values.adminBackend.email | quote }}
|
||||
|
|
|
@ -87,7 +87,7 @@ spec:
|
|||
{{- if .Values.adminFrontend.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /srv/status
|
||||
path: /
|
||||
port: frontend-http
|
||||
initialDelaySeconds: {{ .Values.adminFrontend.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.adminFrontend.livenessProbe.periodSeconds }}
|
||||
|
@ -100,7 +100,7 @@ spec:
|
|||
{{- if .Values.adminFrontend.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /srv/status
|
||||
path: /
|
||||
port: frontend-http
|
||||
initialDelaySeconds: {{ .Values.adminFrontend.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.adminFrontend.readinessProbe.periodSeconds }}
|
||||
|
@ -161,7 +161,7 @@ spec:
|
|||
{{- if .Values.adminBackend.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /srv/status
|
||||
path: /
|
||||
port: backend-http
|
||||
initialDelaySeconds: {{ .Values.adminBackend.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.adminBackend.livenessProbe.periodSeconds }}
|
||||
|
@ -174,7 +174,7 @@ spec:
|
|||
{{- if .Values.adminBackend.readinessProbe.enabled }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /srv/status
|
||||
path: /
|
||||
port: backend-http
|
||||
initialDelaySeconds: {{ .Values.adminBackend.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.adminBackend.readinessProbe.periodSeconds }}
|
||||
|
|
|
@ -41,6 +41,12 @@ spec:
|
|||
pathType: {{ .Values.ingress.pathType }}
|
||||
{{- end }}
|
||||
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "adminFrontend.serviceName" .) "servicePort" "frontend-http" "context" $) | nindent 14 }}
|
||||
# Forward API calls to the back-end container
|
||||
- path: {{ .Values.ingress.path }}api/v1
|
||||
{{- if eq "true" (include "common.ingress.supportsPathType" .) }}
|
||||
pathType: {{ .Values.ingress.pathType }}
|
||||
{{- end }}
|
||||
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "adminBackend.serviceName" .) "servicePort" "backend-http" "context" $) | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- range .Values.ingress.extraHosts }}
|
||||
- host: {{ .name }}
|
||||
|
@ -51,5 +57,10 @@ spec:
|
|||
pathType: {{ default "ImplementationSpecific" .pathType }}
|
||||
{{- end }}
|
||||
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "adminFrontend.serviceName" $) "servicePort" "frontend-http" "context" $) | nindent 14 }}
|
||||
- path: {{ default "/" .path }}api/v1
|
||||
{{- if eq "true" (include "common.ingress.supportsPathType" $) }}
|
||||
pathType: {{ default "ImplementationSpecific" .pathType }}
|
||||
{{- end }}
|
||||
backend: {{- include "common.ingress.backend" (dict "serviceName" (include "adminBackend.serviceName" .) "servicePort" "backend-http" "context" $) | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
@ -4,6 +4,8 @@ adminFrontend:
|
|||
enabled: false
|
||||
readinessProbe:
|
||||
enabled: false
|
||||
image:
|
||||
tag: 2-add-helm-chart
|
||||
|
||||
adminBackend:
|
||||
livenessProbe:
|
||||
|
|
|
@ -165,7 +165,7 @@ adminFrontend:
|
|||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 500
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
|
@ -183,7 +183,7 @@ adminFrontend:
|
|||
##
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 30
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
|
@ -377,7 +377,7 @@ adminBackend:
|
|||
##
|
||||
livenessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 500
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
|
@ -395,7 +395,7 @@ adminBackend:
|
|||
##
|
||||
readinessProbe:
|
||||
enabled: true
|
||||
initialDelaySeconds: 30
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
timeoutSeconds: 5
|
||||
failureThreshold: 6
|
||||
|
|
Loading…
Reference in a new issue