Skip to content

Commit

Permalink
oppgraderer ktor i utgang-formidlingsgruppe, øker cpu til 100m
Browse files Browse the repository at this point in the history
  • Loading branch information
robertkittilsen committed Dec 20, 2024
1 parent fd1fb53 commit 0bd5081
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
10 changes: 5 additions & 5 deletions apps/utgang-formidlingsgruppe/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ val schema by configurations.creating {
}

dependencies {
implementation(project(":lib:kafka-key-generator-client"))
implementation(project(":lib:kafka-key-generator-client-ktor3"))
implementation(project(":domain:main-avro-schema"))
implementation(project(":domain:interne-hendelser"))
implementation(project(":domain:arbeidssoekerregisteret-kotlin"))
Expand All @@ -25,10 +25,10 @@ dependencies {
implementation(project(":lib:hoplite-config"))
implementation(project(":lib:kafka-streams"))

implementation(libs.ktor.server.netty)
implementation(libs.ktor.server.core)
implementation(libs.ktor.server.coreJvm)
implementation(libs.bundles.ktorServerWithNettyAndMicrometer)
implementation(libs.ktor3.server.netty)
implementation(libs.ktor3.server.core)
implementation(libs.ktor3.server.coreJvm)
implementation(libs.bundles.ktor3ServerWithNettyAndMicrometer)
implementation(libs.micrometer.registryPrometheus)

implementation(libs.logbackClassic)
Expand Down
2 changes: 1 addition & 1 deletion apps/utgang-formidlingsgruppe/nais/nais-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
memory: 2048Mi
requests:
memory: 512Mi
cpu: 30m
cpu: 100m
accessPolicy:
outbound:
rules:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import io.micrometer.core.instrument.binder.kafka.KafkaStreamsMetrics
import io.micrometer.prometheusmetrics.PrometheusConfig
import io.micrometer.prometheusmetrics.PrometheusMeterRegistry
import kotlinx.coroutines.runBlocking
import no.nav.paw.arbeidssoekerregisteret.app.helse.initKtor
import no.nav.paw.arbeidssokerregisteret.app.helse.Helse
import no.nav.paw.arbeidssokerregisteret.app.helse.initKtor
import no.nav.paw.config.env.ProdGcp
import no.nav.paw.config.env.RuntimeEnvironment
import no.nav.paw.config.env.currentRuntimeEnvironment
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package no.nav.paw.arbeidssokerregisteret.app.helse
package no.nav.paw.arbeidssoekerregisteret.app.helse

import io.ktor.server.application.*
import io.ktor.server.engine.*
Expand All @@ -11,12 +11,13 @@ import io.micrometer.core.instrument.binder.jvm.JvmMemoryMetrics
import io.micrometer.core.instrument.binder.kafka.KafkaStreamsMetrics
import io.micrometer.core.instrument.binder.system.ProcessorMetrics
import io.micrometer.prometheusmetrics.PrometheusMeterRegistry
import no.nav.paw.arbeidssokerregisteret.app.helse.Helse

fun initKtor(
kafkaStreamsMetrics: KafkaStreamsMetrics,
prometheusRegistry: PrometheusMeterRegistry,
helse: Helse
): ApplicationEngine {
): EmbeddedServer<NettyApplicationEngine, NettyApplicationEngine.Configuration> {
return embeddedServer(Netty, port = 8080) {
install(MicrometerMetrics) {
registry = prometheusRegistry
Expand Down

0 comments on commit 0bd5081

Please sign in to comment.