Skip to content

Commit

Permalink
Scale up pods after migration (#288)
Browse files Browse the repository at this point in the history
* Scale up pods after migration

* Disable Kafka consumers

---------

Co-authored-by: Kaja Kvinge Akselsen <[email protected]>
  • Loading branch information
geir-waagboe and kaja-nav authored Jan 11, 2024
1 parent 9eb4bc1 commit fae654d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 12 deletions.
4 changes: 2 additions & 2 deletions nais/nais-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ spec:
cpu: 100m
memory: 256Mi
replicas:
min: 0
max: 0
min: 2
max: 4
cpuThresholdPercentage: 80
prometheus:
enabled: true
Expand Down
4 changes: 2 additions & 2 deletions nais/nais-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ spec:
cpu: 100m
memory: 512Mi
replicas:
min: 0
max: 0
min: 2
max: 4
cpuThresholdPercentage: 80
prometheus:
enabled: true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,15 @@ import org.slf4j.LoggerFactory
import org.springframework.context.annotation.Profile
import org.springframework.kafka.annotation.KafkaListener
import org.springframework.kafka.support.Acknowledgment
import org.springframework.stereotype.Component

@Profile("remote")
@Component
class DialogmoteStatusendringListener(
private val dialogmoteStatusService: DialogmoteStatusService
private val dialogmoteStatusService: DialogmoteStatusService,
) {
@KafkaListener(topics = [DIALOGMOTE_STATUSENDRING_TOPIC], containerFactory = "DialogmoteListenerContainerFactory")
fun dialogmoteStatusEndringListener(
consumerRecord: ConsumerRecord<String, KDialogmoteStatusEndring>,
acknowledgment: Acknowledgment
acknowledgment: Acknowledgment,
) {
LOG.info("Got record from $DIALOGMOTE_STATUSENDRING_TOPIC topic for dialogmoteUuid: ${consumerRecord.value().getDialogmoteUuid()}")
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ import org.slf4j.LoggerFactory
import org.springframework.context.annotation.Profile
import org.springframework.kafka.annotation.KafkaListener
import org.springframework.kafka.support.Acknowledgment
import org.springframework.stereotype.Component

@Profile("remote")
@Component
class DialogmotekandidatListener(
private val dialogmotekandidatService: DialogmotekandidatService
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ import org.slf4j.LoggerFactory
import org.springframework.context.annotation.Profile
import org.springframework.kafka.annotation.KafkaListener
import org.springframework.kafka.support.Acknowledgment
import org.springframework.stereotype.Component

@Profile("remote")
@Component
class IsOppfolgingstilfelleListener(
private val oppfolgingstilfelleService: OppfolgingstilfelleService
) {
Expand Down

0 comments on commit fae654d

Please sign in to comment.