Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

chore: update chart to call js and go apis #2

Merged
merged 1 commit into from
Aug 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions charts/metaphor-frontend/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ spec:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
envFrom:
- configMapRef:
name: {{ template "metaphor.fullname" . }}
- secretRef:
name: {{ template "metaphor.fullname" . }}
env:
- name: METAPHOR_JS_API_BASE_URL
value: "{{ .Values.metaphor.host }}"
- name: METAPHOR_GO_API_BASE_URL
value: "{{ .Values.metaphorGo.host }}"
ports:
- name: http
containerPort: 80
Expand Down
6 changes: 6 additions & 0 deletions charts/metaphor-frontend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,9 @@ nodeSelector: {}
tolerations: []

affinity: {}

metaphor:
host: metaphor-development.<AWS_HOSTED_ZONE_NAME>

metaphorGo:
host: metaphor-go-development.<AWS_HOSTED_ZONE_NAME>
4 changes: 2 additions & 2 deletions src/services/api.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import axios from "axios"

export const metaphorJsApi = axios.create({
baseURL: process.env.METAPHOR_JS_API_BASE_URL
baseURL: `https://${process.env.METAPHOR_JS_API_BASE_URL}`
})

export const metaphorGoApi = axios.create({
baseURL: process.env.METAPHOR_GO_API_BASE_URL
baseURL: `https://${process.env.METAPHOR_GO_API_BASE_URL}`
})