Skip to content

Commit

Permalink
KB: set API_EXTERNAL_HOSTNAME
Browse files Browse the repository at this point in the history
  • Loading branch information
js-sub committed Sep 3, 2024
1 parent 47bdfb4 commit fe52356
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/knowledge-base/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: knowledge-base
description: Knowledge Base frontend and API/backend
type: application
version: 0.1.5
version: 0.1.6
appVersion: "0.0.1"
4 changes: 3 additions & 1 deletion charts/knowledge-base/templates/frontend_deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ spec:
imagePullPolicy: {{ .Values.frontend.image.pullPolicy }}
env:
- name: API_ADDRESS
value: {{ .Values.frontend.apiBaseAddress }}
value: "http://{{ include "knowledge-base.fullname.api" . }}"
- name: API_EXTERNAL_HOSTNAME
value: {{ join " " .Values.ingress.hosts | quote }}
ports:
- name: http
containerPort: 80
Expand Down
2 changes: 1 addition & 1 deletion charts/knowledge-base/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
- host: {{ . | quote }}
http:
paths:
- path: /
Expand Down
4 changes: 2 additions & 2 deletions charts/knowledge-base/values-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ frontend:
limits:
cpu: 888m
memory: 4321Mi
apiBaseAddress: "test-api.address"

api:
image:
Expand Down Expand Up @@ -55,7 +54,8 @@ ingress:
kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: frontend.knowledge-base.test
- frontend.knowledge-base.test
- frontend2.knowledge-base.test
tls: []
# - secretName: chart-example-tls
# hosts:
Expand Down
1 change: 0 additions & 1 deletion charts/knowledge-base/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ frontend:
limits:
cpu: 500m
memory: 1024Mi
apiBaseAddress: ""

api:
image:
Expand Down

0 comments on commit fe52356

Please sign in to comment.