Skip to content

Commit

Permalink
forbered flytting til fager namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
kenglxn committed Nov 6, 2024
1 parent 032845f commit 5b40876
Show file tree
Hide file tree
Showing 11 changed files with 231 additions and 27 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Deploy dev

on: [workflow_dispatch]
on:
workflow_dispatch:


jobs:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/deploy-redis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@ name: Deploy Redis

on:
push:
paths: ['nais/redis-dev-gcp.yaml', 'nais/redis-prod-gcp.yaml']
paths:
- nais/redis-dev-gcp.yaml
- nais/redis-prod-gcp.yaml
workflow_dispatch:

jobs:
deploy-redis-dev-gcp:
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/revert-160-revert-157-TAG-2172_nais_aiven_redis'
if: github.ref == 'refs/heads/main' || github.ref == 'mv_arbeidsgiver_fager'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -17,7 +19,7 @@ jobs:
RESOURCE: nais/redis-dev-gcp.yaml

deploy-redis-prod-gcp:
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/TAG-2172_nais_aiven_redis'
if: github.ref == 'refs/heads/main'
needs: deploy-redis-dev-gcp
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
FROM gcr.io/distroless/java21-debian12
COPY /target/altinn-rettigheter-proxy-0.0.1-SNAPSHOT.jar app.jar

ENV JDK_JAVA_OPTIONS="-XX:MaxRAMPercentage=75"
CMD ["app.jar"]
89 changes: 89 additions & 0 deletions nais/arbeidsgiver-dev-gcp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
apiVersion: nais.io/v1alpha1
kind: Application
metadata:
name: altinn-rettigheter-proxy
namespace: arbeidsgiver
labels:
team: arbeidsgiver
spec:
image: {{image}}
port: 8080
ingresses:
- https://altinn-rettigheter-proxy.intern.dev.nav.no/altinn-rettigheter-proxy
liveness:
path: /altinn-rettigheter-proxy/internal/alive
readiness:
path: /altinn-rettigheter-proxy/internal/ready
tokenx:
enabled: true
maskinporten:
enabled: true
scopes:
consumes:
- name: "altinn:serviceowner/reportees"
redis:
- instance: altinnrettigheter
access: readwrite
env:
- name: SPRING_PROFILES_ACTIVE
value: dev
- name: CACHE_TIME_TO_LIVE_MILLIS
value: "600000"
- name: ALTINN_URL
value: "https://tt02.altinn.no"
envFrom:
- secret: altinn-rettigheter-proxy
accessPolicy:
inbound:
rules:
- application: sykefravarsstatistikk-api
namespace: arbeidsgiver
cluster: dev-fss

- application: tiltaksgjennomforing-api
namespace: arbeidsgiver
cluster: dev-fss

- application: ia-tjenester-metrikker

- application: tiltak-refusjon-api

- application: aareg-innsyn-arbeidsgiver-api
namespace: arbeidsforhold
cluster: dev-fss

- application: yrkesskade-melding-api
namespace: yrkesskade

- application: forebyggingsplan
namespace: teamia

- application: sosialhjelp-avtaler-api-dev
namespace: teamdigisos

- application: presenterte-kandidater-api
namespace: toi

- application: fia-arbeidsgiver
namespace: pia

- application: dsop-kontroll-q1
namespace: dsopkontroll
cluster: dev-fss

- application: dsop-kontroll
namespace: dsopkontroll
cluster: dev-fss

- application: fpinntektsmelding
namespace: teamforeldrepenger

- application: k9-inntektsmelding
namespace: k9saksbehandling
outbound:
external:
- host: tt02.altinn.no
prometheus:
enabled: true
path: /altinn-rettigheter-proxy/internal/actuator/prometheus

90 changes: 90 additions & 0 deletions nais/arbeidsgiver-prod-gcp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
apiVersion: nais.io/v1alpha1
kind: Application
metadata:
name: altinn-rettigheter-proxy
namespace: arbeidsgiver
labels:
team: arbeidsgiver
spec:
image: {{ image }}
port: 8080
resources:
requests:
cpu: 1000m
memory: 512Mi
limits:
cpu: 5000m # https://home.robusta.dev/blog/stop-using-cpu-limits/
memory: 1024Mi
liveness:
path: /altinn-rettigheter-proxy/internal/alive
readiness:
path: /altinn-rettigheter-proxy/internal/ready
ingresses:
- https://altinn-rettigheter-proxy.intern.nav.no/altinn-rettigheter-proxy/
tokenx:
enabled: true
maskinporten:
enabled: true
scopes:
consumes:
- name: "altinn:serviceowner/reportees"
redis:
- instance: altinnrettigheter
access: readwrite
accessPolicy:
inbound:
rules:

- application: sykefravarsstatistikk-api
namespace: arbeidsgiver
cluster: prod-fss

- application: tiltaksgjennomforing-api
namespace: arbeidsgiver
cluster: prod-fss

- application: ia-tjenester-metrikker

- application: tiltak-refusjon-api

- application: aareg-innsyn-arbeidsgiver-api
namespace: arbeidsforhold
cluster: prod-fss

- application: sosialhjelp-avtaler-api
namespace: teamdigisos

- application: forebyggingsplan
namespace: teamia

- application: presenterte-kandidater-api
namespace: toi

- application: fia-arbeidsgiver
namespace: pia

- application: dsop-kontroll
namespace: dsopkontroll
cluster: prod-fss

- application: fpinntektsmelding
namespace: teamforeldrepenger

outbound:
external:
- host: www.altinn.no

env:
- name: SPRING_PROFILES_ACTIVE
value: prod
- name: CACHE_TIME_TO_LIVE_MILLIS
value: "1800000"
- name: ALTINN_URL
value: "https://www.altinn.no/"
- name: JAVA_OPTS
value: "-XX:+UseParallelGC -XX:MaxRAMPercentage=75.0 -XX:ActiveProcessorCount=2"
envFrom:
- secret: altinn-rettigheter-proxy
prometheus:
enabled: true
path: /altinn-rettigheter-proxy/internal/actuator/prometheus
11 changes: 11 additions & 0 deletions nais/arbeidsgiver-redis-dev-gcp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: aiven.io/v1alpha1
kind: Redis
metadata:
labels:
app: altinn-rettigheter-proxy-redis
team: arbeidsgiver
name: redis-arbeidsgiver-altinnrettigheter
namespace: arbeidsgiver
spec:
plan: startup-4
project: nav-dev
11 changes: 11 additions & 0 deletions nais/arbeidsgiver-redis-prod-gcp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: aiven.io/v1alpha1
kind: Redis
metadata:
labels:
app: altinn-rettigheter-proxy-redis
team: arbeidsgiver
name: redis-arbeidsgiver-altinnrettigheter
namespace: arbeidsgiver
spec:
plan: startup-4
project: nav-prod
14 changes: 7 additions & 7 deletions nais/dev-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@ apiVersion: nais.io/v1alpha1
kind: Application
metadata:
name: altinn-rettigheter-proxy
namespace: arbeidsgiver
namespace: fager
labels:
team: arbeidsgiver
team: fager
spec:
image: {{image}}
port: 8080
ingresses:
- https://altinn-rettigheter-proxy.intern.dev.nav.no/altinn-rettigheter-proxy
liveness:
path: /altinn-rettigheter-proxy/internal/alive
readiness:
path: /altinn-rettigheter-proxy/internal/ready
prometheus:
enabled: true
path: /altinn-rettigheter-proxy/internal/actuator/prometheus
tokenx:
enabled: true
maskinporten:
Expand Down Expand Up @@ -45,8 +46,10 @@ spec:
cluster: dev-fss

- application: ia-tjenester-metrikker
namespace: arbeidsgiver

- application: tiltak-refusjon-api
namespace: arbeidsgiver

- application: aareg-innsyn-arbeidsgiver-api
namespace: arbeidsforhold
Expand Down Expand Up @@ -83,7 +86,4 @@ spec:
outbound:
external:
- host: tt02.altinn.no
prometheus:
enabled: true
path: /altinn-rettigheter-proxy/internal/actuator/prometheus

22 changes: 10 additions & 12 deletions nais/prod-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ apiVersion: nais.io/v1alpha1
kind: Application
metadata:
name: altinn-rettigheter-proxy
namespace: arbeidsgiver
namespace: fager
labels:
team: arbeidsgiver
team: fager
spec:
image: {{ image }}
image: {{image}}
port: 8080
resources:
requests:
Expand All @@ -19,8 +19,9 @@ spec:
path: /altinn-rettigheter-proxy/internal/alive
readiness:
path: /altinn-rettigheter-proxy/internal/ready
ingresses:
- https://altinn-rettigheter-proxy.intern.nav.no/altinn-rettigheter-proxy/
prometheus:
enabled: true
path: /altinn-rettigheter-proxy/internal/actuator/prometheus
tokenx:
enabled: true
maskinporten:
Expand All @@ -44,8 +45,10 @@ spec:
cluster: prod-fss

- application: ia-tjenester-metrikker
namespace: arbeidsgiver

- application: tiltak-refusjon-api
namespace: arbeidsgiver

- application: aareg-innsyn-arbeidsgiver-api
namespace: arbeidsforhold
Expand All @@ -59,9 +62,9 @@ spec:

- application: presenterte-kandidater-api
namespace: toi

- application: fia-arbeidsgiver
namespace: pia
namespace: pia

- application: dsop-kontroll
namespace: dsopkontroll
Expand All @@ -81,10 +84,5 @@ spec:
value: "1800000"
- name: ALTINN_URL
value: "https://www.altinn.no/"
- name: JAVA_OPTS
value: "-XX:+UseParallelGC -XX:MaxRAMPercentage=75.0 -XX:ActiveProcessorCount=2"
envFrom:
- secret: altinn-rettigheter-proxy
prometheus:
enabled: true
path: /altinn-rettigheter-proxy/internal/actuator/prometheus
4 changes: 2 additions & 2 deletions nais/redis-dev-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ kind: Redis
metadata:
labels:
app: altinn-rettigheter-proxy-redis
team: arbeidsgiver
team: fager
name: redis-arbeidsgiver-altinnrettigheter
namespace: arbeidsgiver
namespace: fager
spec:
plan: startup-4
project: nav-dev
4 changes: 2 additions & 2 deletions nais/redis-prod-gcp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ kind: Redis
metadata:
labels:
app: altinn-rettigheter-proxy-redis
team: arbeidsgiver
team: fager
name: redis-arbeidsgiver-altinnrettigheter
namespace: arbeidsgiver
namespace: fager
spec:
plan: startup-4
project: nav-prod

0 comments on commit 5b40876

Please sign in to comment.