Skip to content

Commit

Permalink
add usernotif url
Browse files Browse the repository at this point in the history
  • Loading branch information
obmagnusson committed Dec 5, 2024
1 parent 69c02b2 commit efa36c3
Show file tree
Hide file tree
Showing 8 changed files with 86 additions and 75 deletions.
151 changes: 77 additions & 74 deletions apps/application-system/api/infra/application-system-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,80 +49,83 @@ export const GRAPHQL_API_URL_ENV_VAR_NAME = 'GRAPHQL_API_URL' // This property i

const namespace = 'application-system'
const serviceAccount = 'application-system-api'
export const workerSetup =
(): ServiceBuilder<'application-system-api-worker'> =>
service('application-system-api-worker')
.namespace(namespace)
.image('application-system-api')
.db()
.serviceAccount('application-system-api-worker')
.redis()
.codeOwner(CodeOwners.NordaApplications)
.env({
IDENTITY_SERVER_CLIENT_ID: '@island.is/clients/application-system',
IDENTITY_SERVER_ISSUER_URL: {
dev: 'https://identity-server.dev01.devland.is',
staging: 'https://identity-server.staging01.devland.is',
prod: 'https://innskra.island.is',
},
XROAD_CHARGE_FJS_V2_PATH: {
dev: 'IS-DEV/GOV/10021/FJS-Public/chargeFJS_v2',
staging: 'IS-TEST/GOV/10021/FJS-Public/chargeFJS_v2',
prod: 'IS/GOV/5402697509/FJS-Public/chargeFJS_v2',
},
APPLICATION_ATTACHMENT_BUCKET: {
dev: 'island-is-dev-storage-application-system',
staging: 'island-is-staging-storage-application-system',
prod: 'island-is-prod-storage-application-system',
},
FILE_SERVICE_PRESIGN_BUCKET: {
dev: 'island-is-dev-fs-presign-bucket',
staging: 'island-is-staging-fs-presign-bucket',
prod: 'island-is-prod-fs-presign-bucket',
},
FILE_STORAGE_UPLOAD_BUCKET: {
dev: 'island-is-dev-upload-api',
staging: 'island-is-staging-upload-api',
prod: 'island-is-prod-upload-api',
},
CLIENT_LOCATION_ORIGIN: {
dev: 'https://beta.dev01.devland.is/umsoknir',
staging: 'https://beta.staging01.devland.is/umsoknir',
prod: 'https://island.is/umsoknir',
local: 'http://localhost:4200/umsoknir',
},
})
.xroad(Base, Client, Payment, Inna, EHIC, WorkMachines)
.secrets({
IDENTITY_SERVER_CLIENT_SECRET:
'/k8s/application-system/api/IDENTITY_SERVER_CLIENT_SECRET',
SYSLUMENN_HOST: '/k8s/application-system-api/SYSLUMENN_HOST',
SYSLUMENN_USERNAME: '/k8s/application-system/api/SYSLUMENN_USERNAME',
SYSLUMENN_PASSWORD: '/k8s/application-system/api/SYSLUMENN_PASSWORD',
DRIVING_LICENSE_BOOK_XROAD_PATH:
'/k8s/application-system-api/DRIVING_LICENSE_BOOK_XROAD_PATH',
DRIVING_LICENSE_BOOK_USERNAME:
'/k8s/application-system-api/DRIVING_LICENSE_BOOK_USERNAME',
DRIVING_LICENSE_BOOK_PASSWORD:
'/k8s/application-system-api/DRIVING_LICENSE_BOOK_PASSWORD',
DOKOBIT_ACCESS_TOKEN:
'/k8s/application-system/api/DOKOBIT_ACCESS_TOKEN',
DOKOBIT_URL: '/k8s/application-system-api/DOKOBIT_URL',
ARK_BASE_URL: '/k8s/application-system-api/ARK_BASE_URL',
DOMSYSLA_PASSWORD: '/k8s/application-system-api/DOMSYSLA_PASSWORD',
DOMSYSLA_USERNAME: '/k8s/application-system-api/DOMSYSLA_USERNAME',
})
.args('main.js', '--job', 'worker')
.command('node')
.extraAttributes({
dev: { schedule: '*/30 * * * *' },
staging: { schedule: '*/30 * * * *' },
prod: { schedule: '*/30 * * * *' },
})
.resources({
limits: { cpu: '400m', memory: '768Mi' },
requests: { cpu: '150m', memory: '384Mi' },
})
export const workerSetup = (services: {
userNotificationService: ServiceBuilder<'services-user-notification'>
}): ServiceBuilder<'application-system-api-worker'> =>
service('application-system-api-worker')
.namespace(namespace)
.image('application-system-api')
.db()
.serviceAccount('application-system-api-worker')
.redis()
.codeOwner(CodeOwners.NordaApplications)
.env({
IDENTITY_SERVER_CLIENT_ID: '@island.is/clients/application-system',
IDENTITY_SERVER_ISSUER_URL: {
dev: 'https://identity-server.dev01.devland.is',
staging: 'https://identity-server.staging01.devland.is',
prod: 'https://innskra.island.is',
},
XROAD_CHARGE_FJS_V2_PATH: {
dev: 'IS-DEV/GOV/10021/FJS-Public/chargeFJS_v2',
staging: 'IS-TEST/GOV/10021/FJS-Public/chargeFJS_v2',
prod: 'IS/GOV/5402697509/FJS-Public/chargeFJS_v2',
},
APPLICATION_ATTACHMENT_BUCKET: {
dev: 'island-is-dev-storage-application-system',
staging: 'island-is-staging-storage-application-system',
prod: 'island-is-prod-storage-application-system',
},
FILE_SERVICE_PRESIGN_BUCKET: {
dev: 'island-is-dev-fs-presign-bucket',
staging: 'island-is-staging-fs-presign-bucket',
prod: 'island-is-prod-fs-presign-bucket',
},
FILE_STORAGE_UPLOAD_BUCKET: {
dev: 'island-is-dev-upload-api',
staging: 'island-is-staging-upload-api',
prod: 'island-is-prod-upload-api',
},
CLIENT_LOCATION_ORIGIN: {
dev: 'https://beta.dev01.devland.is/umsoknir',
staging: 'https://beta.staging01.devland.is/umsoknir',
prod: 'https://island.is/umsoknir',
local: 'http://localhost:4200/umsoknir',
},
USER_NOTIFICATION_API_URL: ref(
(h) => `http://${h.svc(services.userNotificationService)}`,
),
})
.xroad(Base, Client, Payment, Inna, EHIC, WorkMachines)
.secrets({
IDENTITY_SERVER_CLIENT_SECRET:
'/k8s/application-system/api/IDENTITY_SERVER_CLIENT_SECRET',
SYSLUMENN_HOST: '/k8s/application-system-api/SYSLUMENN_HOST',
SYSLUMENN_USERNAME: '/k8s/application-system/api/SYSLUMENN_USERNAME',
SYSLUMENN_PASSWORD: '/k8s/application-system/api/SYSLUMENN_PASSWORD',
DRIVING_LICENSE_BOOK_XROAD_PATH:
'/k8s/application-system-api/DRIVING_LICENSE_BOOK_XROAD_PATH',
DRIVING_LICENSE_BOOK_USERNAME:
'/k8s/application-system-api/DRIVING_LICENSE_BOOK_USERNAME',
DRIVING_LICENSE_BOOK_PASSWORD:
'/k8s/application-system-api/DRIVING_LICENSE_BOOK_PASSWORD',
DOKOBIT_ACCESS_TOKEN: '/k8s/application-system/api/DOKOBIT_ACCESS_TOKEN',
DOKOBIT_URL: '/k8s/application-system-api/DOKOBIT_URL',
ARK_BASE_URL: '/k8s/application-system-api/ARK_BASE_URL',
DOMSYSLA_PASSWORD: '/k8s/application-system-api/DOMSYSLA_PASSWORD',
DOMSYSLA_USERNAME: '/k8s/application-system-api/DOMSYSLA_USERNAME',
})
.args('main.js', '--job', 'worker')
.command('node')
.extraAttributes({
dev: { schedule: '*/30 * * * *' },
staging: { schedule: '*/30 * * * *' },
prod: { schedule: '*/30 * * * *' },
})
.resources({
limits: { cpu: '400m', memory: '768Mi' },
requests: { cpu: '150m', memory: '384Mi' },
})

export const serviceSetup = (services: {
documentsService: ServiceBuilder<'services-documents'>
Expand Down
1 change: 1 addition & 0 deletions charts/islandis/values.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,7 @@ application-system-api-worker:
NODE_OPTIONS: '--max-old-space-size=691 -r dd-trace/init'
REDIS_URL_NODE_01: '["clustercfg.general-redis-cluster-group.5fzau3.euw1.cache.amazonaws.com:6379"]'
SERVERSIDE_FEATURES_ON: ''
USER_NOTIFICATION_API_URL: 'http://web-user-notification.user-notification.svc.cluster.local'
XROAD_BASE_PATH: 'http://securityserver.dev01.devland.is'
XROAD_BASE_PATH_WITH_ENV: 'http://securityserver.dev01.devland.is/r1/IS-DEV'
XROAD_CHARGE_FJS_V2_PATH: 'IS-DEV/GOV/10021/FJS-Public/chargeFJS_v2'
Expand Down
1 change: 1 addition & 0 deletions charts/islandis/values.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,7 @@ application-system-api-worker:
NODE_OPTIONS: '--max-old-space-size=691 -r dd-trace/init'
REDIS_URL_NODE_01: '["clustercfg.general-redis-cluster-group.whakos.euw1.cache.amazonaws.com:6379"]'
SERVERSIDE_FEATURES_ON: 'driving-license-use-v1-endpoint-for-v2-comms'
USER_NOTIFICATION_API_URL: 'http://web-user-notification.user-notification.svc.cluster.local'
XROAD_BASE_PATH: 'http://securityserver.island.is'
XROAD_BASE_PATH_WITH_ENV: 'http://securityserver.island.is/r1/IS'
XROAD_CHARGE_FJS_V2_PATH: 'IS/GOV/5402697509/FJS-Public/chargeFJS_v2'
Expand Down
1 change: 1 addition & 0 deletions charts/islandis/values.staging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,7 @@ application-system-api-worker:
NODE_OPTIONS: '--max-old-space-size=691 -r dd-trace/init'
REDIS_URL_NODE_01: '["clustercfg.general-redis-cluster-group.ab9ckb.euw1.cache.amazonaws.com:6379"]'
SERVERSIDE_FEATURES_ON: ''
USER_NOTIFICATION_API_URL: 'http://web-user-notification.user-notification.svc.cluster.local'
XROAD_BASE_PATH: 'http://securityserver.staging01.devland.is'
XROAD_BASE_PATH_WITH_ENV: 'http://securityserver.staging01.devland.is/r1/IS-TEST'
XROAD_CHARGE_FJS_V2_PATH: 'IS-TEST/GOV/10021/FJS-Public/chargeFJS_v2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ env:
NODE_OPTIONS: '--max-old-space-size=691 -r dd-trace/init'
REDIS_URL_NODE_01: '["clustercfg.general-redis-cluster-group.5fzau3.euw1.cache.amazonaws.com:6379"]'
SERVERSIDE_FEATURES_ON: ''
USER_NOTIFICATION_API_URL: 'http://web-user-notification.user-notification.svc.cluster.local'
XROAD_BASE_PATH: 'http://securityserver.dev01.devland.is'
XROAD_BASE_PATH_WITH_ENV: 'http://securityserver.dev01.devland.is/r1/IS-DEV'
XROAD_CHARGE_FJS_V2_PATH: 'IS-DEV/GOV/10021/FJS-Public/chargeFJS_v2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ env:
NODE_OPTIONS: '--max-old-space-size=691 -r dd-trace/init'
REDIS_URL_NODE_01: '["clustercfg.general-redis-cluster-group.whakos.euw1.cache.amazonaws.com:6379"]'
SERVERSIDE_FEATURES_ON: 'driving-license-use-v1-endpoint-for-v2-comms'
USER_NOTIFICATION_API_URL: 'http://web-user-notification.user-notification.svc.cluster.local'
XROAD_BASE_PATH: 'http://securityserver.island.is'
XROAD_BASE_PATH_WITH_ENV: 'http://securityserver.island.is/r1/IS'
XROAD_CHARGE_FJS_V2_PATH: 'IS/GOV/5402697509/FJS-Public/chargeFJS_v2'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ env:
NODE_OPTIONS: '--max-old-space-size=691 -r dd-trace/init'
REDIS_URL_NODE_01: '["clustercfg.general-redis-cluster-group.ab9ckb.euw1.cache.amazonaws.com:6379"]'
SERVERSIDE_FEATURES_ON: ''
USER_NOTIFICATION_API_URL: 'http://web-user-notification.user-notification.svc.cluster.local'
XROAD_BASE_PATH: 'http://securityserver.staging01.devland.is'
XROAD_BASE_PATH_WITH_ENV: 'http://securityserver.staging01.devland.is/r1/IS-TEST'
XROAD_CHARGE_FJS_V2_PATH: 'IS-TEST/GOV/10021/FJS-Public/chargeFJS_v2'
Expand Down
4 changes: 3 additions & 1 deletion infra/src/uber-charts/islandis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ const appSystemApi = appSystemApiSetup({
servicePortalApi,
userNotificationService,
})
const appSystemApiWorker = appSystemApiWorkerSetup()
const appSystemApiWorker = appSystemApiWorkerSetup({
userNotificationService,
})

const nameRegistryBackend = serviceNameRegistryBackendSetup()

Expand Down

0 comments on commit efa36c3

Please sign in to comment.