-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor profiles and update URLs for local and dev environments #dep…
…loy-test-synt-sykemelding-api #deploy-test-sykemelding-api Updated the configuration to differentiate between 'local' and 'dev' profiles, ensuring appropriate URL endpoints for each environment. This includes changes in the OAuth2 setup, Spring profiles, and Dockerfile adjustments. Added new configuration files to support "prod" and "local" environments.
- Loading branch information
Showing
10 changed files
with
116 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
FROM ghcr.io/navikt/baseimages/temurin:21 | ||
LABEL maintainer="Team Dolly" | ||
|
||
ENV JAVA_OPTS="-Dspring.profiles.active=prod" | ||
|
||
ADD /build/libs/app.jar /app/app.jar | ||
COPY /build/libs/app.jar /app/app.jar | ||
|
||
EXPOSE 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
apiVersion: "nais.io/v1alpha1" | ||
kind: "Application" | ||
metadata: | ||
name: testnav-synt-sykemelding-api-dev | ||
namespace: dolly | ||
annotations: | ||
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600" | ||
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600" | ||
labels: | ||
team: dolly | ||
spec: | ||
image: "{{image}}" | ||
port: 8080 | ||
webproxy: true | ||
tokenx: | ||
enabled: true | ||
azure: | ||
application: | ||
allowAllUsers: true | ||
enabled: true | ||
tenant: nav.no | ||
liveness: | ||
path: /internal/isAlive | ||
initialDelay: 4 | ||
periodSeconds: 5 | ||
failureThreshold: 500 | ||
observability: | ||
logging: | ||
destinations: | ||
- id: elastic | ||
autoInstrumentation: | ||
enabled: true | ||
runtime: java | ||
readiness: | ||
path: /internal/isReady | ||
initialDelay: 4 | ||
periodSeconds: 5 | ||
failureThreshold: 500 | ||
prometheus: | ||
enabled: true | ||
path: /internal/metrics | ||
replicas: | ||
min: 1 | ||
max: 1 | ||
vault: | ||
enabled: true | ||
resources: | ||
requests: | ||
cpu: 200m | ||
memory: 4000Mi | ||
limits: | ||
memory: 5000Mi | ||
accessPolicy: | ||
inbound: | ||
rules: | ||
- application: dolly-backend | ||
- application: dolly-backend-dev | ||
- application: team-dolly-lokal-app | ||
- application: testnav-oversikt-frontend | ||
outbound: | ||
rules: | ||
- application: synthdata-elsam-gcp | ||
- application: testnav-organisasjon-service | ||
- application: testnav-arbeidsforhold-service | ||
- application: testnav-helsepersonell-service | ||
- application: testnav-sykemelding-api-dev | ||
external: | ||
- host: testnav-pdl-proxy.dev-fss-pub.nais.io | ||
ingresses: | ||
- "https://testnav-synt-sykemelding-api-dev.intern.dev.nav.no" | ||
env: | ||
- name: SPRING_PROFILES_ACTIVE | ||
value: dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 15 additions & 5 deletions
20
apps/synt-sykemelding-api/src/main/resources/application-dev.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
|
||
TOKEN_X_CLIENT_ID: dev-gcp:dolly:testnav-synt-sykemelding-api | ||
spring: | ||
security: | ||
oauth2: | ||
resourceserver: | ||
tokenx: | ||
issuer-uri: ${TOKEN_X_ISSUER} | ||
jwk-set-uri: ${TOKEN_X_JWKS_URI} | ||
accepted-audience: ${TOKEN_X_CLIENT_ID} | ||
|
||
consumers: | ||
synt-sykemelding: | ||
url: https://synthdata-elsam-gcp.intern.dev.nav.no | ||
url: http://synthdata-elsam-gcp.intern.dolly.svc.cluster.local | ||
testnav-organisasjon-service: | ||
url: https://testnav-organisasjon-service.intern.dev.nav.no | ||
url: http://testnav-organisasjon-service.dolly.svc.cluster.local | ||
testnav-arbeidsforhold-service: | ||
url: https://testnav-arbeidsforhold-service.intern.dev.nav.no | ||
url: http://testnav-arbeidsforhold-service.dolly.svc.cluster.local | ||
testnav-helsepersonell-service: | ||
url: https://testnav-helsepersonell-service.intern.dev.nav.no | ||
url: http://testnav-helsepersonell-service.dolly.svc.cluster.local | ||
sykemelding-api: | ||
url: http://testnav-sykemelding-api-dev.dolly.svc.cluster.local | ||
name: testnav-sykemelding-api-dev |
13 changes: 13 additions & 0 deletions
13
apps/synt-sykemelding-api/src/main/resources/application-local.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
|
||
consumers: | ||
synt-sykemelding: | ||
url: https://synthdata-elsam-gcp.intern.dev.nav.no | ||
testnav-organisasjon-service: | ||
url: https://testnav-organisasjon-service.intern.dev.nav.no | ||
testnav-arbeidsforhold-service: | ||
url: https://testnav-arbeidsforhold-service.intern.dev.nav.no | ||
testnav-helsepersonell-service: | ||
url: https://testnav-helsepersonell-service.intern.dev.nav.no | ||
sykemelding-api: | ||
url: https://testnav-sykemelding-api-dev.intern.dev.nav.no | ||
name: testnav-sykemelding-api-dev |
8 changes: 8 additions & 0 deletions
8
apps/synt-sykemelding-api/src/main/resources/application-prod.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
spring: | ||
security: | ||
oauth2: | ||
resourceserver: | ||
tokenx: | ||
issuer-uri: ${TOKEN_X_ISSUER} | ||
jwk-set-uri: ${TOKEN_X_JWKS_URI} | ||
accepted-audience: ${TOKEN_X_CLIENT_ID} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters