Skip to content

Commit

Permalink
Add topic for publishing trenger hjelp fra nav (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
AudunSorheim authored Mar 13, 2024
1 parent b2cd12c commit 0242370
Show file tree
Hide file tree
Showing 4 changed files with 68 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/deploy-lps-topic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "Deploy topic"
on:
push:
paths:
- nais/topics/**
- .github/workflows/topic.yaml
jobs:
deploy-topic-to-dev:
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/topic-')
name: Deploy topic to dev
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Deploy lps topic to dev
uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: dev-gcp
RESOURCE: nais/topics/lps-topic.yaml
VARS: nais/topics/dev.json

deploy-topic-to-prod:
if: github.ref == 'refs/heads/main'
name: Deploy topic to prod
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Deploy lps topic to prod
uses: nais/deploy/actions/deploy@v2
env:
CLUSTER: prod-gcp
RESOURCE: nais/topics/lps-topic.yaml
VARS: nais/topics/prod.json
3 changes: 3 additions & 0 deletions nais/topics/dev.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"kafkaPool": "nav-dev"
}
24 changes: 24 additions & 0 deletions nais/topics/lps-topic.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: kafka.nais.io/v1
kind: Topic
metadata:
name: aapen-syfo-oppfolgingsplan-lps-nav-v2
namespace: team-esyfo
labels:
team: team-esyfo
spec:
pool: {{kafkaPool}}
config:
cleanupPolicy: delete
minimumInSyncReplicas: 1
partitions: 1
replication: 3
retentionBytes: -1 # Messages will never be deleted because of disk space
retentionHours: -1 # Messages will never be timed out
acl:
- team: team-esyfo
application: lps-oppfolgingsplan-mottak
access: write
- team: teamsykefravr
application: ispersonoppgave
access: read

3 changes: 3 additions & 0 deletions nais/topics/prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"kafkaPool": "nav-prod"
}

0 comments on commit 0242370

Please sign in to comment.