Skip to content

Commit

Permalink
Merge branch 'main' into remove-project-auth-react
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Dec 10, 2024
2 parents ce753c3 + 83ba8fa commit eb3c244
Show file tree
Hide file tree
Showing 892 changed files with 14,186 additions and 12,910 deletions.
68 changes: 67 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -102,4 +102,70 @@ apps/**/index.html
# E2E outputs
test-results/
playwright-report/
tmp-sessions/
tmp-sessions/

# React Native

# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.dSYM.zip
*.xcuserstate
**/.xcode.env.local
ios/*.cer
ios/*.certSigningRequest
ios/*.mobileprovision
ios/*.p12

# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
*.hprof
.cxx/
*.keystore
!debug.keystore
google-services.json
service-account.json

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/

**/fastlane/report.xml
**/fastlane/Preview.html
**/fastlane/screenshots
**/fastlane/test_output

# Bundle artifact
*.jsbundle

# Ruby / CocoaPods
**/Pods/
**/vendor/bundle/

# Temporary files created by Metro to check the health of the file watcher
.metro-health-check*

# testing
/coverage
Binary file not shown.
1 change: 1 addition & 0 deletions apps/api/infra/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -478,5 +478,6 @@ export const serviceSetup = (services: {
'consultation-portal',
'portals-admin',
'service-portal',
'portals-my-pages',
)
}
6 changes: 6 additions & 0 deletions apps/api/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ import {
IdsClientConfig,
XRoadConfig,
} from '@island.is/nest/config'
import { CodeOwnerInterceptor } from '@island.is/nest/core'
import { DataLoaderInterceptor } from '@island.is/nest/dataloader'
import { FeatureFlagConfig } from '@island.is/nest/feature-flags'
import { ProblemModule } from '@island.is/nest/problem'
Expand All @@ -175,6 +176,7 @@ import { FormSystemModule } from '@island.is/api/domains/form-system'
import { HealthDirectorateModule } from '@island.is/api/domains/health-directorate'

import { VehiclesMileageClientConfig } from '@island.is/clients/vehicles-mileage'

import { getConfig } from './environments'
import { GraphqlOptionsFactory } from './graphql-options.factory'
import { GraphQLConfig } from './graphql.config'
Expand Down Expand Up @@ -212,6 +214,10 @@ const environment = getConfig
provide: APP_INTERCEPTOR,
useClass: DataLoaderInterceptor,
},
{
provide: APP_INTERCEPTOR,
useClass: CodeOwnerInterceptor,
},
],
imports: [
GraphQLModule.forRootAsync({
Expand Down
158 changes: 84 additions & 74 deletions apps/application-system/api/infra/application-system-api.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { ref, service, ServiceBuilder } from '../../../../infra/src/dsl/dsl'
import {
CodeOwners,
ref,
service,
ServiceBuilder,
} from '../../../../infra/src/dsl/dsl'
import {
Base,
ChargeFjsV2,
Expand Down Expand Up @@ -44,79 +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()
.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 All @@ -131,6 +140,7 @@ export const serviceSetup = (services: {
.serviceAccount(serviceAccount)
.command('node')
.redis()
.codeOwner(CodeOwners.NordaApplications)
.args('main.js')
.env({
EMAIL_REGION: 'eu-west-1',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ import { environment } from '../../../../environments'
import { SequelizeConfigService } from '../../../sequelizeConfig.service'
import { ApplicationChargeModule } from '../charge/application-charge.module'
import { ApplicationLifeCycleService } from './application-lifecycle.service'
import {
UserNotificationClientConfig,
UserNotificationEagerClientModule,
} from '@island.is/clients/user-notification'

@Module({
imports: [
Expand All @@ -26,10 +30,16 @@ import { ApplicationLifeCycleService } from './application-lifecycle.service'
LoggingModule,
ApplicationChargeModule,
ApplicationFilesModule,
UserNotificationEagerClientModule,
AuditModule.forRoot(environment.audit),
ConfigModule.forRoot({
isGlobal: true,
load: [signingModuleConfig, ApplicationFilesConfig, FileStorageConfig],
load: [
UserNotificationClientConfig,
signingModuleConfig,
ApplicationFilesConfig,
FileStorageConfig,
],
}),
],
providers: [ApplicationLifeCycleService],
Expand Down
Loading

0 comments on commit eb3c244

Please sign in to comment.