Skip to content

Commit 66432f2

Browse files
authored
Merge branch 'main' into dependabot/maven/main/org.apache.pdfbox-pdfbox-3.0.1
2 parents 2e33037 + f2c6e9a commit 66432f2

25 files changed

+273
-88
lines changed

Diff for: .deploy/nais/app-dev-gcp.yaml

+3-5
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ spec:
3737
- type: POSTGRES_14
3838
tier: db-custom-1-3840
3939
name: familie-tilbake
40-
autoBackupTime: "03:00"
40+
autoBackupHour: 3
4141
databases:
4242
- name: familie-tilbake
4343
envVarPrefix: DB
@@ -102,9 +102,7 @@ spec:
102102
- host: pdl-api.dev-fss-pub.nais.io
103103
- host: b27apvl220.preprod.local
104104
ports:
105-
- name: mq
106-
port: 1413
107-
protocol: TCP
105+
- port: 1413
108106
replicas:
109107
min: 2
110108
max: 4
@@ -132,4 +130,4 @@ spec:
132130
- name: OTEL_METRICS_EXEMPLAR_FILTER
133131
value: ALWAYS_ON
134132
kafka:
135-
pool: nav-dev
133+
pool: nav-dev

Diff for: .deploy/nais/app-prod-gcp.yaml

+6-5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ spec:
2424
prometheus:
2525
enabled: true
2626
path: /internal/prometheus
27+
observability:
28+
tracing:
29+
enabled: true
2730
vault:
2831
enabled: false
2932
gcp: # Database
@@ -33,7 +36,7 @@ spec:
3336
name: familie-tilbake
3437
diskAutoresize: true
3538
highAvailability: true
36-
autoBackupTime: "03:00"
39+
autoBackupHour: 3
3740
databases:
3841
- name: familie-tilbake
3942
envVarPrefix: DB
@@ -93,9 +96,7 @@ spec:
9396
- host: pdl-api.prod-fss-pub.nais.io
9497
- host: mpls02.adeo.no
9598
ports:
96-
- name: mq
97-
port: 1414
98-
protocol: TCP
99+
- port: 1414
99100
replicas:
100101
min: 2
101102
max: 4
@@ -126,4 +127,4 @@ spec:
126127
- secret: familie-tilbake
127128
- secret: familie-tilbake-unleash-api-token
128129
kafka:
129-
pool: nav-prod
130+
pool: nav-prod

Diff for: .deploy/nais/prod-alerts.yaml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
apiVersion: monitoring.coreos.com/v1
2+
kind: PrometheusRule
3+
metadata:
4+
name: familie-tilbake-alerts
5+
labels:
6+
team: teamfamilie
7+
app: familie-tilbake
8+
namespace: teamfamilie
9+
spec:
10+
receivers:
11+
slack:
12+
channel: '#team-familie-alerts'
13+
alerts:
14+
- alert: familie-tilbake - app nede
15+
expr: kube_deployment_status_replicas_unavailable{deployment="familie-tilbake",job="kubernetes-service-endpoints"} > 0
16+
for: 10m
17+
description: "familie-tilbake har utilgjengelige podder i teamfamilie"
18+
action: "kubectl describe pod -l app=familie-tilbake -n teamfamilie` for events og `kubectl get pods -l app=familie-tilbake -n teamfamilie` for å se feilende podder"
19+
sla: respond within 1h, during office hours
20+
severity: danger
21+
- alert: familie-tilbake -kontinuerlig restart
22+
expr: sum(increase(kube_pod_container_status_restarts_total{container=~"familie-tilbake"}[5m])) by (container) > 2
23+
for: 2m
24+
description: "familie-tilbake har restartet flere ganger de siste 5 minuttene!"
25+
action: "Se `kubectl describe pod familie-tilbake` for events, og `kubectl logs familie-tilbake` for logger"
26+
sla: respond within 1h, during office hours
27+
severity: danger
28+
- alert: familie-tilbake - høy feilrate i logger
29+
expr: (100 * sum by (log_app, log_namespace) (rate(logd_messages_total{log_app="familie-tilbake",log_level=~"Error"}[10m])) / sum by (log_app, log_namespace) (rate(logd_messages_total{log_app="familie-tilbake"}[10m]))) > 1
30+
for: 5m
31+
action: "<https://logs.adeo.no/goto/cd9d896bb5d08e8e7efae0289320c040|Check logs>"

Diff for: .github/kafka-manager/familie-tilbake-kafka-manager-dev.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
labels:
77
team: teamfamilie
88
spec:
9-
image: europe-north1-docker.pkg.dev/nais-management-233d/poao/kafka-manager:2023.08.02-07.02-45dfb71 # See https://github.com/navikt/kafka-manager/packages
9+
image: europe-north1-docker.pkg.dev/nais-management-233d/poao/kafka-manager:2024.02.06-12.20-dabf3e1 # See https://github.com/navikt/kafka-manager/actions
1010
port: 8080
1111
ingresses:
1212
- https://familie-tilbake-kafka-manager.intern.dev.nav.no

Diff for: .github/kafka-manager/familie-tilbake-kafka-manager-prod.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ metadata:
66
labels:
77
team: teamfamilie
88
spec:
9-
image: europe-north1-docker.pkg.dev/nais-management-233d/poao/kafka-manager:2023.08.02-07.02-45dfb71 # See https://github.com/navikt/kafka-manager/packages
9+
image: europe-north1-docker.pkg.dev/nais-management-233d/poao/kafka-manager:2024.02.06-12.20-dabf3e1 # See https://github.com/navikt/kafka-manager/actions
1010
port: 8080
1111
ingresses:
1212
- https://familie-tilbake-kafka-manager.intern.nav.no

Diff for: .github/workflows/build-and-deploy-dev.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -153,32 +153,32 @@ jobs:
153153
with:
154154
fetch-depth: 0
155155
- name: Deploy til dev-gcp
156-
uses: nais/deploy/actions/deploy@v1
156+
uses: nais/deploy/actions/deploy@v2
157157
env:
158158
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
159159
CLUSTER: dev-gcp
160160
RESOURCE: .deploy/nais/app-dev-gcp.yaml
161-
IMAGE: ${{ needs.build-jar-docker.outputs.image }}
161+
VAR: image=${{ needs.build-jar-docker.outputs.image }}
162162
- name: Deploy dvh_sak_topic
163-
uses: nais/deploy/actions/deploy@v1
163+
uses: nais/deploy/actions/deploy@v2
164164
env:
165165
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
166166
CLUSTER: dev-gcp
167167
RESOURCE: .deploy/nais/kafka/dvh_sak_topic.yaml
168168
- name: Deploy dvh_vedtak_topic
169-
uses: nais/deploy/actions/deploy@v1
169+
uses: nais/deploy/actions/deploy@v2
170170
env:
171171
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
172172
CLUSTER: dev-gcp
173173
RESOURCE: .deploy/nais/kafka/dvh_vedtak_topic.yaml
174174
- name: Deploy hentfagsystemsbehandling_request_topic
175-
uses: nais/deploy/actions/deploy@v1
175+
uses: nais/deploy/actions/deploy@v2
176176
env:
177177
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
178178
CLUSTER: dev-gcp
179179
RESOURCE: .deploy/nais/kafka/hentfagsystemsbehandling_request_topic.yaml
180180
- name: Deploy hentfagsystemsbehandling_respons_topic
181-
uses: nais/deploy/actions/deploy@v1
181+
uses: nais/deploy/actions/deploy@v2
182182
env:
183183
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
184184
CLUSTER: dev-gcp

Diff for: .github/workflows/build-and-deploy-prod.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -55,39 +55,39 @@ jobs:
5555
steps:
5656
- uses: actions/checkout@v4
5757
- name: Deploy til dev-gcp
58-
uses: nais/deploy/actions/deploy@v1
58+
uses: nais/deploy/actions/deploy@v2
5959
env:
6060
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
6161
CLUSTER: dev-gcp
6262
RESOURCE: .deploy/nais/app-dev-gcp.yaml
63-
IMAGE: ${{ needs.build.outputs.image }}
63+
VAR: image=${{ needs.build.outputs.image }}
6464
- name: Deploy til prod-gcp
65-
uses: nais/deploy/actions/deploy@v1
65+
uses: nais/deploy/actions/deploy@v2
6666
env:
6767
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
6868
CLUSTER: prod-gcp
6969
RESOURCE: .deploy/nais/app-prod-gcp.yaml
70-
IMAGE: ${{ needs.build.outputs.image }}
70+
VAR: image= ${{ needs.build.outputs.image }}
7171
- name: Deploy dvh_sak_topic
72-
uses: nais/deploy/actions/deploy@v1
72+
uses: nais/deploy/actions/deploy@v2
7373
env:
7474
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
7575
CLUSTER: prod-gcp
7676
RESOURCE: .deploy/nais/kafka/prod/dvh_sak_topic_prod.yaml
7777
- name: Deploy dvh_vedtak_topic
78-
uses: nais/deploy/actions/deploy@v1
78+
uses: nais/deploy/actions/deploy@v2
7979
env:
8080
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
8181
CLUSTER: prod-gcp
8282
RESOURCE: .deploy/nais/kafka/prod/dvh_vedtak_topic_prod.yaml
8383
- name: Deploy hentfagsystemsbehandling_request_topic
84-
uses: nais/deploy/actions/deploy@v1
84+
uses: nais/deploy/actions/deploy@v2
8585
env:
8686
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
8787
CLUSTER: prod-gcp
8888
RESOURCE: .deploy/nais/kafka/prod/hentfagsystemsbehandling_request_topic_prod.yaml
8989
- name: Deploy hentfagsystemsbehandling_respons_topic
90-
uses: nais/deploy/actions/deploy@v1
90+
uses: nais/deploy/actions/deploy@v2
9191
env:
9292
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
9393
CLUSTER: prod-gcp

Diff for: .github/workflows/build.yml

+2-12
Original file line numberDiff line numberDiff line change
@@ -58,21 +58,11 @@ jobs:
5858
with:
5959
java-version: 21
6060
distribution: 'temurin'
61-
cache: 'maven'
62-
- name: Bygg (dependabot)
63-
if: github.actor == 'dependabot[bot]'
64-
env:
65-
GITHUB_USERNAME: x-access-token
66-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67-
run: mvn verify --settings .m2/maven-settings.xml --file pom.xml
68-
- name: Bygg med maven + sonar
69-
if: github.actor != 'dependabot[bot]'
61+
- name: Bygg med maven
7062
env:
71-
SONAR_PROJECTKEY: ${{ secrets.SONAR_PROJECTKEY }}
72-
SONAR_LOGIN: ${{ secrets.SONAR_LOGIN }}
7363
GITHUB_USERNAME: x-access-token
7464
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
75-
run: mvn -B --no-transfer-progress package --settings .m2/maven-settings.xml -DtrimStackTrace=false --file pom.xml -Dchangelist= -Dsha1=-$TIMESTAMP-$(echo $GITHUB_SHA | cut -c1-7)
65+
run: mvn --version && mvn -B --no-transfer-progress verify --settings .m2/maven-settings.xml --file pom.xml
7666

7767
run-e2e:
7868
if: github.event.pull_request.draft == false && github.actor != 'dependabot[bot]'

Diff for: .github/workflows/codeql.yml

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ "main" ]
17+
18+
jobs:
19+
analyze:
20+
name: Analyze
21+
# Runner size impacts CodeQL analysis time. To learn more, please see:
22+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
23+
# - https://gh.io/supported-runners-and-hardware-resources
24+
# - https://gh.io/using-larger-runners
25+
# Consider using larger runners for possible analysis time improvements.
26+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
27+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
28+
permissions:
29+
# required for all workflows
30+
security-events: write
31+
32+
# only required for workflows in private repositories
33+
actions: read
34+
contents: read
35+
36+
strategy:
37+
fail-fast: false
38+
matrix:
39+
language: [ 'java-kotlin' ]
40+
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
41+
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
42+
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
43+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
44+
45+
steps:
46+
- name: Checkout repository
47+
uses: actions/checkout@v4
48+
49+
# Initializes the CodeQL tools for scanning.
50+
- name: Initialize CodeQL
51+
uses: github/codeql-action/init@v3
52+
with:
53+
languages: ${{ matrix.language }}
54+
# If you wish to specify custom queries, you can do so here or in a config file.
55+
# By default, queries listed here will override any specified in a config file.
56+
# Prefix the list here with "+" to use these queries and those in the config file.
57+
58+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
59+
# queries: security-extended,security-and-quality
60+
61+
62+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
63+
# If this step fails, then you should remove it and run the build manually (see below)
64+
- name: Sett opp java
65+
uses: actions/setup-java@v4
66+
with:
67+
java-version: 21
68+
distribution: 'temurin'
69+
cache: 'maven'
70+
- name: Bygg med maven
71+
env:
72+
GITHUB_USERNAME: x-access-token
73+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74+
run: mvn -B --no-transfer-progress package --settings .m2/maven-settings.xml -DtrimStackTrace=false --file pom.xml -Dchangelist= -Dsha1=-$TIMESTAMP-$(echo $GITHUB_SHA | cut -c1-7)
75+
76+
77+
# ℹ️ Command-line programs to run using the OS shell.
78+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
79+
80+
# If the Autobuild fails above, remove it and uncomment the following three lines.
81+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
82+
83+
# - run: |
84+
# echo "Run, Build Application using script"
85+
# ./location_of_script_within_repo/buildscript.sh
86+
87+
- name: Perform CodeQL Analysis
88+
uses: github/codeql-action/analyze@v3
89+
with:
90+
category: "/language:${{matrix.language}}"

Diff for: .github/workflows/deploy-kafka-manager.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ jobs:
1010
- name: Checkout code
1111
uses: actions/checkout@v4
1212
- name: Deploy familile-tilbake-kafka-manager til dev
13-
uses: nais/deploy/actions/deploy@v1
13+
uses: nais/deploy/actions/deploy@v2
1414
env:
1515
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
1616
CLUSTER: dev-gcp
1717
RESOURCE: .github/kafka-manager/familie-tilbake-kafka-manager-dev.yml
1818
- name: Deploy familile-tilbake-kafka-manager til prod
19-
uses: nais/deploy/actions/deploy@v1
19+
uses: nais/deploy/actions/deploy@v2
2020
env:
2121
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
2222
CLUSTER: prod-gcp

Diff for: .github/workflows/deploy-unleash-api-token.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- name: Checkout code
1111
uses: actions/checkout@v4
1212
- name: deploy unleash api-token to dev
13-
uses: nais/deploy/actions/deploy@v1
13+
uses: nais/deploy/actions/deploy@v2
1414
env:
1515
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
1616
CLUSTER: dev-gcp
@@ -21,7 +21,7 @@ jobs:
2121
- name: Checkout code
2222
uses: actions/checkout@v4
2323
- name: deploy unleash api-token to prod
24-
uses: nais/deploy/actions/deploy@v1
24+
uses: nais/deploy/actions/deploy@v2
2525
env:
2626
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
2727
CLUSTER: prod-gcp

Diff for: Dockerfile

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ ARG JAVA_OTEL_VERSION=v1.32.0
55
ADD https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/$JAVA_OTEL_VERSION/opentelemetry-javaagent.jar /instrumentations/java/javaagent.jar
66

77
# Final image
8-
FROM gcr.io/distroless/java21:nonroot
8+
FROM gcr.io/distroless/java21-debian12:nonroot
99
COPY --from=javaagent --chown=nonroot:nonroot /instrumentations/java/javaagent.jar /app/javaagent.jar
1010
COPY --chown=nonroot:nonroot ./target/familie-tilbake.jar /app/app.jar
1111
WORKDIR /app
1212

1313
ENV APP_NAME=familie-tilbake
14+
ENV TZ="Europe/Oslo"
1415
# TLS Config works around an issue in OpenJDK... See: https://github.com/kubernetes-client/java/issues/854
1516
ENTRYPOINT [ "java", "-javaagent:/app/javaagent.jar", "-Djdk.tls.client.protocols=TLSv1.2", "-jar", "/app/app.jar", "-XX:MinRAMPercentage=25.0 -XX:MaxRAMPercentage=75.0 -XX:+HeapDumpOnOutOfMemoryError" ]

0 commit comments

Comments
 (0)