Skip to content

Commit 4b2f5db

Browse files
committed
add dev
1 parent 44ca83f commit 4b2f5db

File tree

2 files changed

+143
-0
lines changed

2 files changed

+143
-0
lines changed
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: klass-forvaltning-dev-build-and-deploy.yml
2+
on:
3+
push:
4+
branches:
5+
- 4-of-november-1
6+
workflow_dispatch:
7+
8+
jobs:
9+
docker-build:
10+
name: Docker build
11+
permissions:
12+
contents: "read"
13+
id-token: "write"
14+
packages: "read"
15+
runs-on: ubuntu-latest
16+
outputs:
17+
image: ${{ steps.docker-build-push.outputs.image }}
18+
telemetry: ${{ steps.docker-build-push.outputs.telemetry }}
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
- uses: actions/setup-java@v4
25+
with:
26+
distribution: 'temurin'
27+
java-version: '8'
28+
cache: 'maven'
29+
- name: Build with Maven
30+
working-directory: klass-forvaltning
31+
run: mvn --batch-mode --update-snapshots install -DskipTests
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
- name: Build and push
35+
uses: nais/docker-build-push@v0
36+
id: docker-build-push
37+
with:
38+
team: dapla-metadata
39+
image_suffix: forvaltning
40+
dockerfile: klass-forvaltning/Dockerfile
41+
docker_context: klass-forvaltning
42+
43+
deploy-test:
44+
name: Deploy to test
45+
needs: docker-build
46+
permissions:
47+
contents: "read"
48+
id-token: "write"
49+
packages: "read"
50+
runs-on: ubuntu-latest
51+
steps:
52+
- name: Checkout
53+
uses: actions/checkout@v4
54+
55+
- uses: nais/deploy/actions/deploy@v2
56+
env:
57+
CLUSTER: test
58+
RESOURCE: .nais/test/klass-forvaltning-dev.yaml
59+
DEPLOY_SERVER: deploy.ssb.cloud.nais.io:443
60+
WORKLOAD_IMAGE: ${{ needs.docker-build.outputs.image }}
61+
TELEMETRY: ${{ needs.docker-build.outputs.telemetry }}
62+
63+
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
apiVersion: nais.io/v1alpha1
2+
kind: Application
3+
metadata:
4+
name: klass-forvaltning-dev
5+
namespace: dapla-metadata
6+
labels:
7+
shared-db: "true"
8+
team: dapla-metadata
9+
annotations:
10+
nginx.ingress.kubernetes.io/proxy-body-size: "8m"
11+
spec:
12+
port: 8081
13+
ingresses:
14+
- https://klass-dev.intern.test.ssb.no/klass/admin
15+
accessPolicy:
16+
outbound:
17+
external:
18+
- host: auth.test.ssb.no
19+
rules:
20+
- application: klass-solr
21+
- application: klass-mail
22+
login:
23+
provider: openid
24+
enforce:
25+
enabled: true
26+
excludePaths:
27+
- /klass/admin/schemas/version.xsd
28+
replicas:
29+
min: 1
30+
max: 1
31+
resources:
32+
requests:
33+
cpu: 400m
34+
memory: 1000Mi
35+
limits:
36+
memory: 1100Mi
37+
env:
38+
- name: SPRING_PROFILES_ACTIVE
39+
value: frontend, postgres, skip-indexing, remote-solr
40+
- name: KLASS_SECURITY_OAUTH2_LOGOUT_PATH
41+
value: /klass/admin/oauth2/logout
42+
- name: KLASS_SECURITY_OAUTH2_JWT_JWKS_URI
43+
value: https://auth.test.ssb.no/realms/ssb/protocol/openid-connect/certs
44+
- name: KLASS_SECURITY_OAUTH2_JWT_ISSUER
45+
value: https://auth.test.ssb.no/realms/ssb
46+
- name: SPRING_DATA_SOLR_HOST
47+
value: http://klass-solr/solr/
48+
- name: KLASS_ENV_SERVER
49+
value: klass.intern.test.ssb.no
50+
- name: KLASS_ENV_CLIENT_KLASS_MAIL_URL
51+
value: http://klass-mail
52+
- name: JAVA_TOOL_OPTIONS
53+
value: "-XX:InitialRAMPercentage=50.0 -XX:MaxRAMPercentage=50.0"
54+
envFrom:
55+
- secret: google-sql-klass
56+
filesFrom:
57+
- mountPath: /var/run/secrets/nais.io/sqlcertificate
58+
secret: sqeletor-klass-827ec8ec
59+
prometheus:
60+
enabled: true
61+
path: /actuator/prometheus
62+
port: "8091"
63+
liveness:
64+
path: /actuator/health
65+
initialDelay: 60
66+
port: 8091
67+
readiness:
68+
path: /actuator/health
69+
initialDelay: 60
70+
port: 8091
71+
failureThreshold: 10
72+
periodSeconds: 10
73+
startup:
74+
path: /actuator/health
75+
initialDelay: 60
76+
port: 8091
77+
failureThreshold: 10
78+
periodSeconds: 10
79+
terminationGracePeriodSeconds: 120
80+

0 commit comments

Comments
 (0)