Skip to content

Commit 3ddb5c4

Browse files
Merge branch 'dev' into dependabot/maven/org.apache.avro-avro-1.12.0
2 parents ab90413 + aa48cd2 commit 3ddb5c4

File tree

53 files changed

+1626
-521
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1626
-521
lines changed

.github/workflows/deploy-opensearch-dev.yaml .github/workflows/deploy-opensearch-prod.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy opensearch til Dev
1+
name: Deploy opensearch til Prod
22
on:
33
workflow_dispatch:
44

@@ -13,5 +13,5 @@ jobs:
1313
- uses: actions/checkout@v4
1414
- uses: nais/deploy/actions/deploy@v2
1515
env:
16-
CLUSTER: dev-gcp
17-
RESOURCE: ".nais/application/opensearch-dev.yaml"
16+
CLUSTER: prod-gcp
17+
RESOURCE: ".nais/application/gcp/opensearch-prod.yaml"

.github/workflows/main-gcp.yml

+103
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Build, push and deploy GCP
2+
on: push
3+
env:
4+
IMAGE_TAG: ${{ github.sha }}
5+
PRINT_PAYLOAD: true
6+
permissions:
7+
packages: write
8+
contents: write
9+
id-token: write
10+
jobs:
11+
test:
12+
name: Run tests
13+
runs-on: ubuntu-latest
14+
if: github.ref != 'refs/heads/flytte-til-gcp'
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Java
20+
uses: actions/setup-java@v4
21+
with:
22+
java-version: 21
23+
distribution: 'temurin'
24+
cache: 'maven'
25+
26+
- name: Run maven tests
27+
env:
28+
MAVEN_OPTS: -Xss1024M -Xmx2048M
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
run: mvn -B verify
31+
32+
build-and-push:
33+
name: Build and push
34+
runs-on: ubuntu-latest
35+
if: github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/flytte-til-gcp'
36+
outputs:
37+
image: ${{ steps.docker-build-push.outputs.image }}
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v4
41+
42+
- name: Set up Java
43+
uses: actions/setup-java@v4
44+
with:
45+
java-version: 21
46+
distribution: 'temurin'
47+
cache: 'maven'
48+
49+
- name: Build maven artifacts
50+
run: mvn -Dgithub.token=${{ secrets.GITHUB_TOKEN }} -B package -D skipTests
51+
52+
- name: Build and push Docker image
53+
uses: nais/docker-build-push@v0
54+
id: docker-build-push
55+
with:
56+
team: obo
57+
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
58+
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
59+
60+
deploy-dev:
61+
name: Deploy application to dev gcp
62+
if: github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/flytte-til-gcp'
63+
needs: build-and-push
64+
runs-on: ubuntu-latest
65+
steps:
66+
- name: Checkout
67+
uses: actions/checkout@v4
68+
69+
- name: Deploy application
70+
uses: nais/deploy/actions/deploy@v2
71+
env:
72+
CLUSTER: dev-gcp
73+
RESOURCE: .nais/application/gcp/application-config-dev.yaml
74+
VAR: image=${{ needs.build-and-push.outputs.image }}
75+
76+
deploy-prod:
77+
name: Deploy application to prod gcp
78+
if: github.ref == 'refs/heads/flytte-til-gcp'
79+
needs: build-and-push
80+
runs-on: ubuntu-latest
81+
steps:
82+
- name: Checkout
83+
uses: actions/checkout@v4
84+
85+
- name: Deploy application
86+
uses: nais/deploy/actions/deploy@v2
87+
env:
88+
CLUSTER: prod-gcp
89+
RESOURCE: .nais/application/gcp/application-config-prod.yaml
90+
VAR: image=${{ needs.build-and-push.outputs.image }}
91+
92+
release-prod:
93+
name: Create prod release
94+
needs: deploy-prod
95+
runs-on: ubuntu-latest
96+
steps:
97+
- name: Create release
98+
uses: softprops/action-gh-release@v2
99+
with:
100+
name: Release to prod
101+
target_commitish: master
102+
tag_name: release/prod@${{ env.IMAGE_TAG }}
103+
prerelease: false
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# ref https://raw.githubusercontent.com/nais/naiserator/master/examples/nais-max.yaml
2+
apiVersion: "nais.io/v1alpha1"
3+
kind: "Application"
4+
metadata:
5+
name: veilarbportefolje
6+
namespace: obo
7+
labels:
8+
team: obo
9+
spec:
10+
image: {{image}}
11+
replicas:
12+
min: 1
13+
max: 3
14+
cpuThresholdPercentage: 50
15+
port: 8080
16+
ingresses:
17+
- https://veilarbportefolje.intern.dev.nav.no
18+
webproxy: true
19+
leaderElection: true
20+
secureLogs:
21+
enabled: true
22+
kafka:
23+
pool: nav-dev
24+
envFrom:
25+
- secret: veilarbportefolje-unleash-api-token
26+
liveness:
27+
path: veilarbportefolje/internal/isAlive
28+
initialDelay: 60
29+
timeout: 10
30+
readiness:
31+
path: veilarbportefolje/internal/isReady
32+
initialDelay: 60
33+
timeout: 10
34+
prometheus:
35+
enabled: true
36+
path: veilarbportefolje/internal/prometheus
37+
openSearch:
38+
access: admin
39+
instance: veilarbportefolje
40+
gcp:
41+
sqlInstances:
42+
- type: POSTGRES_15
43+
tier: db-f1-micro
44+
databases:
45+
- name: veilarbportefolje
46+
envVarPrefix: DB
47+
azure:
48+
application:
49+
allowAllUsers: true
50+
enabled: true
51+
claims:
52+
extra:
53+
- NAVident
54+
- azp_name
55+
accessPolicy:
56+
inbound:
57+
rules:
58+
- application: veilarbportefoljeflatefs
59+
namespace: obo
60+
cluster: dev-gcp
61+
- application: veilarbpersonflate
62+
namespace: poao
63+
cluster: dev-gcp
64+
- application: pto-admin
65+
namespace: pto
66+
cluster: dev-fss
67+
- application: azure-token-generator
68+
namespace: aura
69+
cluster: dev-gcp
70+
outbound:
71+
rules:
72+
- application: kodeverk-api
73+
namespace: team-rocket
74+
- application: pdl-api
75+
namespace: pdl
76+
cluster: dev-fss
77+
- application: veilarbvedtaksstotte
78+
namespace: pto
79+
cluster: dev-fss
80+
- application: veilarbarena
81+
namespace: pto
82+
cluster: dev-fss
83+
- application: veilarbveileder
84+
namespace: pto
85+
cluster: dev-fss
86+
- application: poao-tilgang
87+
namespace: poao
88+
external:
89+
- host: team-obo-unleash-api.nav.cloud.nais.io
90+
- host: pdl-api.dev-fss-pub.nais.io
91+
- host: veilarboppfolging.dev-fss-pub.nais.io
92+
- host: veilarbvedtaksstotte.dev-fss-pub.nais.io
93+
- host: veilarbveileder.dev-fss-pub.nais.io
94+
- host: veilarbarena.dev-fss-pub.nais.io
95+
resources:
96+
limits:
97+
cpu: "4"
98+
memory: 8Gi
99+
requests:
100+
cpu: "1"
101+
memory: 4Gi
102+
env:
103+
- name: JAVA_OPTS
104+
value: "-Xms4098m -Xmx8096m --illegal-access=permit --add-opens=java.base/java.lang=ALL-UNNAMED"
105+
- name: VEILARBOPPFOLGING_URL
106+
value: "https://veilarboppfolging.dev-fss-pub.nais.io/veilarboppfolging"
107+
- name: VEILARBOPPFOLGING_TOKEN_SCOPE
108+
value: "api://dev-fss.pto.veilarboppfolging/.default"
109+
- name: VEILARBVEDTAKSSTOTTE_URL
110+
value: "https://veilarbvedtaksstotte.dev-fss-pub.nais.io/veilarbvedtaksstotte"
111+
- name: VEILARBVEDTAKSSTOTTE_TOKEN_SCOPE
112+
value: "api://dev-fss.pto.veilarbvedtaksstotte/.default"
113+
- name: VEILARBVEILEDER_URL
114+
value: "https://veilarbveileder.dev-fss-pub.nais.io/veilarbveileder"
115+
- name: VEILARBVEILEDER_TOKEN_SCOPE
116+
value: "api://dev-fss.pto.veilarbveileder/.default"
117+
- name: VEILARBARENA_URL
118+
value: "https://veilarbarena.dev-fss-pub.nais.io/veilarbarena"
119+
- name: VEILARBARENA_TOKEN_SCOPE
120+
value: "api://dev-fss.pto.veilarbarena/.default"
121+
- name: PDL_URL
122+
value: "https://pdl-api.dev-fss-pub.nais.io"
123+
- name: PDL_TOKEN_SCOPE
124+
value: "api://dev-fss.pdl.pdl-api/.default"
125+
- name: POAO_TILGANG_URL
126+
value: "http://poao-tilgang.poao"
127+
- name: POAO_TILGANG_TOKEN_SCOPE
128+
value: "api://dev-gcp.poao.poao-tilgang/.default"
129+
- name: KODEVERK_URL
130+
value: "https://kodeverk-api.intern.dev.nav.no"
131+
- name: KODEVERK_SCOPE
132+
value: "api://dev-gcp.team-rocket.kodeverk-api/.default"
133+
- name: OPPSLAG_ARBEIDSSOEKERREGISTERET_URL
134+
value: "http://paw-arbeidssoekerregisteret-api-oppslag.paw"
135+
- name: OPPSLAG_ARBEIDSSOEKERREGISTERET_SCOPE
136+
value: "api://dev-gcp.paw.paw-arbeidssoekerregisteret-api-oppslag/.default"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
# ref https://raw.githubusercontent.com/nais/naiserator/master/examples/nais-max.yaml
2+
apiVersion: "nais.io/v1alpha1"
3+
kind: "Application"
4+
metadata:
5+
name: veilarbportefolje
6+
namespace: obo
7+
labels:
8+
team: obo
9+
spec:
10+
image: {{image}}
11+
replicas:
12+
min: 3
13+
max: 3
14+
cpuThresholdPercentage: 50
15+
port: 8080
16+
ingresses:
17+
- https://veilarbportefolje.intern.nav.no
18+
webproxy: true
19+
leaderElection: true
20+
secureLogs:
21+
enabled: true
22+
kafka:
23+
pool: nav-prod
24+
envFrom:
25+
- secret: veilarbportefolje-unleash-api-token
26+
liveness:
27+
path: veilarbportefolje/internal/isAlive
28+
initialDelay: 60
29+
timeout: 10
30+
readiness:
31+
path: veilarbportefolje/internal/isReady
32+
initialDelay: 60
33+
timeout: 10
34+
prometheus:
35+
enabled: true
36+
path: veilarbportefolje/internal/prometheus
37+
openSearch:
38+
access: admin
39+
instance: veilarbportefolje
40+
gcp:
41+
sqlInstances:
42+
- type: POSTGRES_15
43+
tier: db-custom-1-4096
44+
databases:
45+
- name: veilarbportefolje
46+
envVarPrefix: DB
47+
azure:
48+
application:
49+
allowAllUsers: true
50+
enabled: true
51+
claims:
52+
extra:
53+
- NAVident
54+
- azp_name
55+
accessPolicy:
56+
inbound:
57+
rules:
58+
- application: veilarbportefoljeflatefs
59+
namespace: obo
60+
- application: veilarbpersonflate
61+
namespace: poao
62+
- application: pto-admin
63+
namespace: pto
64+
cluster: prod-fss
65+
outbound:
66+
rules:
67+
- application: kodeverk-api
68+
namespace: team-rocket
69+
- application: pdl-api
70+
namespace: pdl
71+
cluster: dev-fss
72+
- application: veilarbvedtaksstotte
73+
namespace: pto
74+
cluster: dev-fss
75+
- application: veilarbarena
76+
namespace: pto
77+
cluster: dev-fss
78+
- application: veilarbveileder
79+
namespace: pto
80+
cluster: dev-fss
81+
- application: poao-tilgang
82+
namespace: poao
83+
external:
84+
- host: team-obo-unleash-api.nav.cloud.nais.io
85+
- host: pdl-api.dev-fss-pub.nais.io
86+
- host: veilarboppfolging.dev-fss-pub.nais.io
87+
- host: veilarbvedtaksstotte.dev-fss-pub.nais.io
88+
- host: veilarbveileder.dev-fss-pub.nais.io
89+
- host: veilarbarena.dev-fss-pub.nais.io
90+
resources:
91+
limits:
92+
cpu: "4"
93+
memory: 10Gi
94+
requests:
95+
cpu: "1"
96+
memory: 4Gi
97+
env:
98+
- name: JAVA_OPTS
99+
value: "-Xms4096m -Xmx10144m --illegal-access=permit --add-opens=java.base/java.lang=ALL-UNNAMED"
100+
- name: VEILARBOPPFOLGING_URL
101+
value: "https://veilarboppfolging.prod-fss-pub.nais.io/veilarboppfolging"
102+
- name: VEILARBOPPFOLGING_TOKEN_SCOPE
103+
value: "api://prod-fss.pto.veilarboppfolging/.default"
104+
- name: VEILARBVEDTAKSSTOTTE_URL
105+
value: "https://veilarbvedtaksstotte.prod-fss-pub.nais.io/veilarbvedtaksstotte"
106+
- name: VEILARBVEDTAKSSTOTTE_TOKEN_SCOPE
107+
value: "api://prod-fss.pto.veilarbvedtaksstotte/.default"
108+
- name: VEILARBVEILEDER_URL
109+
value: "https://veilarbveileder.prod-fss-pub.nais.io/veilarbveileder"
110+
- name: VEILARBVEILEDER_TOKEN_SCOPE
111+
value: "api://prod-fss.pto.veilarbveileder/.default"
112+
- name: VEILARBARENA_URL
113+
value: "https://veilarbarena.prod-fss-pub.nais.io/veilarbarena"
114+
- name: VEILARBARENA_TOKEN_SCOPE
115+
value: "api://prod-fss.pto.veilarbarena/.default"
116+
- name: PDL_URL
117+
value: "https://pdl-api.prod-fss-pub.nais.io"
118+
- name: PDL_TOKEN_SCOPE
119+
value: "api://prod-fss.pdl.pdl-api/.default"
120+
- name: POAO_TILGANG_URL
121+
value: "http://poao-tilgang.poao"
122+
- name: POAO_TILGANG_TOKEN_SCOPE
123+
value: "api://prod-fss.poao.poao-tilgang/.default"
124+
- name: KODEVERK_URL
125+
value: "https://kodeverk-api.intern.nav.no"
126+
- name: KODEVERK_SCOPE
127+
value: "api://prod-gcp.team-rocket.kodeverk-api/.default"
128+
- name: OPPSLAG_ARBEIDSSOEKERREGISTERET_URL
129+
value: "http://paw-arbeidssoekerregisteret-api-oppslag.paw"
130+
- name: OPPSLAG_ARBEIDSSOEKERREGISTERET_SCOPE
131+
value: "api://prod-gcp.paw.paw-arbeidssoekerregisteret-api-oppslag/.default"

0 commit comments

Comments
 (0)