Skip to content

Commit

Permalink
PIC-3530 read secretss from k8s secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
rschallapalli committed Dec 11, 2023
1 parent d6e3aa6 commit d202c55
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
1 change: 1 addition & 0 deletions config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module.exports = {
casesTotalDays: get('CASES_TOTAL_DAYS', 13),
casesPastDays: get('CASES_PAST_DAYS', 6),
caseTrackingPrePilotUsers: getCsvParamAsArray('CASE_TRACKING_PRE_PILOT_USERS'),
liverpoolPrePilotUsers: getCsvParamAsArray('LIVERPOOL_PRE_PILOT_USERS'),
caseSearchUsers: getCsvParamAsArray('CASE_SEARCH_USERS'),
pacEnvironment: get('PAC_ENV', 'UNKNOWN'),
enablePastCasesNavigation: getBooleanParam('ENABLE_PAST_CASES_NAVIGATION'),
Expand Down
14 changes: 13 additions & 1 deletion helm_deploy/prepare-a-case/templates/_envs.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,21 @@ env:
- name: NOTIFICATION_PASSWORD
valueFrom:
secretKeyRef:
name: prepare-a-case
name: case-tracking-pre-pilot-users
key: NOTIFICATION_PASSWORD

- name: CASE_TRACKING_PRE_PILOT_USERS
valueFrom:
secretKeyRef:
name: liverpool-pre-pilot-users
key: CASE_TRACKING_PRE_PILOT_USERS

- name: LIVERPOOL_PRE_PILOT_USERS
valueFrom:
secretKeyRef:
name: case-tracking-pre-pilot-users
key: LIVERPOOL_PRE_PILOT_USERS

- name: NOMIS_AUTH_URL
value: {{ .Values.env.NOMIS_AUTH_URL | quote }}

Expand Down
1 change: 0 additions & 1 deletion helm_deploy/values-preprod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ env:
ENABLE_CASE_PROGRESS: true
ENABLE_APP_INSIGHTS: true
ENABLE_HEARING_OUTCOMES: true
CASE_TRACKING_PRE_PILOT_USERS: joana.aguia,tony.howard,tfe58u,ravishankar.challapalli
CASE_SEARCH_USERS: all
ENABLE_SERVERSIDE_PAGING: true

Expand Down
1 change: 0 additions & 1 deletion helm_deploy/values-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ env:
ENABLE_CASE_PROGRESS: true
ENABLE_APP_INSIGHTS: true
ENABLE_HEARING_OUTCOMES: true
CASE_TRACKING_PRE_PILOT_USERS: ZAP37S,BEVERLEYWILLMOTTNPS,ZRX14Y,wyi97r,mdy87w,sarahclarkenps,bethanylilleynps,jenniferrawlingsnps,maxholgatenps,wjf65j,xzu68s,CZE89A,serenacannannps,qgd46q,santoshchakrabartnps
CASE_SEARCH_USERS: all
ENABLE_SERVERSIDE_PAGING: true

Expand Down
5 changes: 1 addition & 4 deletions server/utils/features.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ const {
} = require('./featureTogglePredicates')
const { settings } = require('../../config')

const LIVERPOOL_PRE_PILOT_USERS = ['TaylorColinoNPS', 'debbieleenps', 'emmacaddicknps', 'qml95k', 'brn63n']

const PLYMOUTH_MAGS_COURT_CODE = 'B50KH'

const PILOT_COURTS = ['B20EB', 'B23HS']

const features = {
Expand All @@ -33,7 +30,7 @@ const features = {
),
allOf(
enabledForCourts('B05PK'),
enabledForUsers(...settings.caseTrackingPrePilotUsers, ...LIVERPOOL_PRE_PILOT_USERS)
enabledForUsers(...settings.caseTrackingPrePilotUsers, ...settings.liverpoolPrePilotUsers)
),
enabledForCourts(...PILOT_COURTS)
)
Expand Down

0 comments on commit d202c55

Please sign in to comment.