Skip to content

Commit

Permalink
Add support for env variables in config map.
Browse files Browse the repository at this point in the history
  • Loading branch information
weskubo-cgi authored and weskubo-cgi committed Sep 20, 2023
1 parent ffdae92 commit a52861d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
1 change: 1 addition & 0 deletions backend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ local.*
local-*.*
.env.local
.env.*.local
env.list

# Log files
npm-debug.log*
Expand Down
4 changes: 2 additions & 2 deletions frontend/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# base-level env settings
VITE_APP_API_ROOT=http://localhost:8080
VITE_APP_TITLE=Operating Funding Model

VITE_BANNER_COLOR=blue
VITE_BANNER_ENVIRONMENT=Local
14 changes: 11 additions & 3 deletions frontend/src/components/util/NavBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ export default {
},
data() {
return {
drawer: null,
bannerEnvironment: '{tbd}', //TODO: replace value with null during integration with backend
bannerColor: 'blue' //TODO: replace value with null during integration with backend
drawer: null
// bannerEnvironment: '{tbd}', //TODO: replace value with null during integration with backend
// bannerColor: 'blue' //TODO: replace value with null during integration with backend
}
},
async created() {
Expand All @@ -142,6 +142,14 @@ export default {
//will render a home screen and menu with minimal errors given no authorization/backend integration.
//Thus the following related code is only temporarly and expected to be replaced.
...mapState(useAuthStore, ['isAuthorizedUser', 'CCP_ROLE', 'OPS_ROLE', 'PCM_ROLE']),
bannerColor() {
console.log('color', import.meta.env.VITE_BANNER_COLOR)
return import.meta.env.VITE_BANNER_COLOR
},
bannerEnvironment() {
console.log('env', import.meta.env.VITE_BANNER_ENVIRONMENT)
return import.meta.env.VITE_BANNER_ENVIRONMENT
},
items() {
return [
{
Expand Down
3 changes: 3 additions & 0 deletions tools/openshift/frontend.dc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ objects:
ports:
- containerPort: 2015
protocol: TCP
envFrom:
- configMapRef:
name: ecc-ofm-frontend-config-map
readinessProbe:
failureThreshold: 3
httpGet:
Expand Down

0 comments on commit a52861d

Please sign in to comment.