Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

Use nais docker push #1

Open
wants to merge 44 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
44aab28
Added kafka-manager
bentholden Nov 16, 2022
289599e
Fixed resource path
bentholden Nov 16, 2022
2b93780
Added deploy path for kafka-manager
bentholden Nov 16, 2022
2bbe8a8
Added cluster to kafka-manager workflow
bentholden Nov 16, 2022
67c4637
Added checkout to kafka-manager deploy
bentholden Nov 16, 2022
b09dc90
Setup kafka-cli for team org
bentholden Nov 16, 2022
712e1b4
Add kafka manager to prod
RoyGrini Nov 21, 2022
82b92ca
Set correct pool
RoyGrini Nov 21, 2022
c890cc5
Deploy on prod yaml change
RoyGrini Nov 21, 2022
a9928e2
deploy org-kafka-manager to prod-gcp
RoyGrini Nov 21, 2022
6bf1440
Deploy to dev-gcp instead of dev-fss
RoyGrini Nov 21, 2022
73e845e
Added orgenhet evetsource and state to dev
RoyGrini Dec 9, 2022
a4d9213
Update Dockerfile
bentholden Dec 9, 2022
8e88f7a
Added new org.nom.* topics
RoyGrini Dec 13, 2022
382c35a
Changed indentation
RoyGrini Dec 13, 2022
be9e01e
and whitespace(?)
RoyGrini Dec 13, 2022
312048c
another whitespace(?)...
RoyGrini Dec 13, 2022
a4d443a
Fjernet gamle topics i manager app
RoyGrini Jan 4, 2023
ba7eb9d
fikset litt på eksempler og doc'ing
RoyGrini Jan 4, 2023
2526b9a
lagt til script og doc for kafka-delete-records
RoyGrini Jan 4, 2023
83f836c
Litt doc oppdatering
RoyGrini Jan 12, 2023
a7dca13
redeploy
bentholden Jan 13, 2023
991f1d1
added skjerming topics
RoyGrini Jan 20, 2023
ea4f227
added nom-ident-rnr
RoyGrini Feb 16, 2023
41f17f8
added org.nom-ressurser topic
RoyGrini Feb 24, 2023
7b29090
Added nye nom intern og ekstern topics
RoyGrini Mar 20, 2023
f27a57b
Byttet ingress fra dev.intern til intern.dev
RoyGrini Apr 13, 2023
5eec216
Added orgtilknytning evtx og intern topics
RoyGrini Apr 17, 2023
0a3fd1a
Feil navngivning på nye topics..
RoyGrini Apr 18, 2023
3a6a6ce
korrigert dev ingress
RoyGrini Apr 25, 2023
1d09b1a
Update org-kafka-manager-dev.yml
eziztm Apr 27, 2023
d8f3d00
Endrer versjon til org.nom.api-orgenhet-state til 3
eziztm Apr 27, 2023
ac84e06
Fjerne de gamle nom ressurs/orgenhet state topicene
RoyGrini May 2, 2023
c1c9235
Update deploy.yml
eziztm May 9, 2023
b7cbb6d
ny ingress i dev
erik-a-e May 25, 2023
f3d671f
Bump kafka manager version
RoyGrini Aug 16, 2023
2930262
Set workflow permission
RoyGrini Oct 24, 2023
c489103
Legg til nom.nom-mastered-ressurs topic
RoyGrini Nov 16, 2023
d7e2978
Legger til topics org.nom.organisering-eventsource og nom.intern-orga…
torgeirfr Nov 24, 2023
b81b2ce
Fikser typo i topic-navn
torgeirfr Nov 24, 2023
05473a0
Added nom.api-hendelser-v1 topic
skathayat Dec 13, 2023
f8dcbc3
Fixed typo in topic name
skathayat Dec 13, 2023
5cbe499
ORG-1769: Use nais/deploy/actions/deploy@v2
oyvinyg Jan 8, 2024
3e8355a
Use nais/docker-build-push@v0
oyvinyg Jan 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/deploy-kafka-manager.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy kafka-manager

on:
push:
branches:
- 'main'
paths:
- '.nais/org-kafka-manager-dev.yml'
- '.nais/org-kafka-manager-prod.yml'
- '.github/workflows/deploy-kafka-manager.yml'

jobs:
deploy-dev:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
name: Deploy til dev-gcp
steps:
- uses: actions/checkout@v3
- uses: nais/deploy/actions/deploy@v2
env:
RESOURCE: .nais/org-kafka-manager-dev.yml
CLUSTER: dev-gcp

deploy-prod:
permissions:
contents: read
id-token: write
runs-on: ubuntu-latest
name: Deploy til prod-gcp
steps:
- uses: actions/checkout@v3
- uses: nais/deploy/actions/deploy@v2
env:
RESOURCE: .nais/org-kafka-manager-prod.yml
CLUSTER: prod-gcp
42 changes: 25 additions & 17 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,44 @@ on:
- dev
- prod
aiven-secret:
description: Aiven secret to mount, e.g aiven-vedtak-6rxv2sxp
description: Aiven secret med korrekte rettigheter to mount, f.eks. aiven-org-kafka-manager-cg37ax1v
required: true

env:
IMAGE: ghcr.io/${{ github.repository }}:${{ github.sha }}
POOL: nav-${{ github.event.inputs.environment }}
SECRET: ${{ github.event.inputs.aiven-secret }}

jobs:
deploy:
build:
runs-on: ubuntu-latest
name: Deploy til ${{ github.event.inputs.environment }}-gcp
permissions:
contents: "read"
id-token: "write"
steps:
- uses: styfle/cancel-workflow-action@0.9.1
- uses: styfle/cancel-workflow-action@0.11.0
- uses: actions/checkout@v3
- uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- uses: docker/[email protected]
- name: Build and push Docker image
uses: nais/docker-build-push@v0
id: docker-push
with:
push: true
tags: ${{env.IMAGE}},ghcr.io/navikt/${{ github.repository }}:latest
team: org
image_suffix: kafka-cli
project_id: ${{ vars.NAIS_MANAGEMENT_PROJECT_ID }}
identity_provider: ${{ secrets.NAIS_WORKLOAD_IDENTITY_PROVIDER }}
outputs:
image: ${{ steps.docker-push.outputs.image }}

- uses: nais/deploy/actions/deploy@v1
deploy:
runs-on: ubuntu-latest
name: Deploy til ${{ github.event.inputs.environment }}-gcp
permissions:
contents: "read"
id-token: "write"
steps:
- uses: nais/deploy/actions/deploy@v2
env:
RESOURCE: nais.yml
APIKEY: ${{ secrets.NAIS_DEPLOY_APIKEY }}
RESOURCE: .nais/nais.yml
PRINT_PAYLOAD: true
CLUSTER: ${{ github.event.inputs.environment }}-gcp
VAR: pool=${{ env.POOL }},secret=${{ env.SECRET }}
VAR: image=${{needs.build.outputs.image}},pool=${{ env.POOL }},secret=${{ env.SECRET }}
4 changes: 2 additions & 2 deletions nais.yml → .nais/nais.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ apiVersion: nais.io/v1alpha1
kind: Application
metadata:
name: kafka-cli
namespace: aap
namespace: org
labels:
team: aap
team: org
annotations:
nais.io/read-only-file-system: "false"
spec:
Expand Down
152 changes: 152 additions & 0 deletions .nais/org-kafka-manager-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
kind: Application
apiVersion: nais.io/v1alpha1
metadata:
name: org-kafka-manager
namespace: org
labels:
team: org
spec:
image: ghcr.io/navikt/kafka-manager/kafka-manager:2.2023.08.01_08.06-26db51b7b8b7 # See https://github.com/navikt/kafka-manager/packages
port: 8080
webproxy: true
ingresses:
- https://org-kafka-manager.intern.dev.nav.no
prometheus:
enabled: true
path: /internal/prometheus
readiness:
path: /internal/health/readiness
initialDelay: 20
liveness:
path: /internal/health/liveness
initialDelay: 20
replicas:
min: 1
max: 1 # 1 instance is required since in-memory session management is used
cpuThresholdPercentage: 75
resources:
limits:
cpu: "1"
memory: 1024Mi
requests:
cpu: 250m
memory: 512Mi
azure: # Required
application:
enabled: true
tenant: nav.no
claims:
groups:
- id: efa3b907-b01c-4293-94a2-c0890b123783 # Required for authorization
kafka: # Optional. Required for Aiven
pool: nav-dev

env:
- name: APP_CONFIG_JSON # Required
value: >
{
"topics": [
{
"name": "org.nav-ident",
"location": "AIVEN",
"keyDeserializerType": "STRING",
"valueDeserializerType": "STRING"
},
{
"name": "org.nav-ident-rnr",
"location": "AIVEN",
"keyDeserializerType": "STRING",
"valueDeserializerType": "STRING"
},
{
"name": "org.nom.orgenhet-eventsource",
"location": "AIVEN",
"keyDeserializerType": "STRING",
"valueDeserializerType": "STRING"
},
{
"name": "org.nom.intern-orgenhet-state",
"location": "AIVEN",
"keyDeserializerType": "STRING",
"valueDeserializerType": "STRING"
},
{
"name": "org.nom.intern-ressurs-state",
"location": "AIVEN",
"keyDeserializerType": "STRING",
"valueDeserializerType": "STRING"
},
{
"name": "org.nom.api-orgenhet-state-v3",
"location": "AIVEN",
"keyDeserializerType": "STRING",
"valueDeserializerType": "STRING"
},
{
"name": "org.nom.api-ressurs-state-v2",
"location": "AIVEN",
"keyDeserializerType": "STRING",
"valueDeserializerType": "STRING"
},
{
"name": "org.nom.api-hendelser-v1",
"location": "AIVEN",
"keyDeserializerType": "STRING",
"valueDeserializerType": "STRING"
},
{
"name": "org.nom.nom-mastered-ressurs",
"location": "AIVEN",
"keyDeserializerType": "STRING",
"valueDeserializerType": "STRING"
},
{
"name": "org.nom.ressurs-eventsource",
"location": "AIVEN",
"keyDeserializerType": "STRING",
"valueDeserializerType": "STRING"
},
{
"name": "nom.skjermede-personer-status-v1",
"location": "AIVEN",
"keyDeserializerType": "STRING",
"valueDeserializerType": "STRING"
},
{
"name": "nom.skjermede-personer-v1",
"location": "AIVEN",
"keyDeserializerType": "STRING",
"valueDeserializerType": "STRING"
},
{
"name": "org.nom-ressurser",
"location": "AIVEN",
"keyDeserializerType": "STRING",
"valueDeserializerType": "STRING"
},
{
"name": "org.nom.orgtilknytning-eventsource",
"location": "AIVEN",
"keyDeserializerType": "STRING",
"valueDeserializerType": "STRING"
},
{
"name": "org.nom.intern-orgtilknytning-state",
"location": "AIVEN",
"keyDeserializerType": "STRING",
"valueDeserializerType": "STRING"
},
{
"name": "org.nom.organisering-eventsource",
"location": "AIVEN",
"keyDeserializerType": "STRING",
"valueDeserializerType": "STRING"
},
{
"name": "org.nom.intern-organisering-state",
"location": "AIVEN",
"keyDeserializerType": "STRING",
"valueDeserializerType": "STRING"
}
]
}
Loading