diff --git a/apps/kodeverk-service/config.yml b/apps/kodeverk-service/config.yml index 690c5389cc0..52c3373e3be 100644 --- a/apps/kodeverk-service/config.yml +++ b/apps/kodeverk-service/config.yml @@ -21,6 +21,8 @@ spec: - application: testnav-oversikt-frontend - application: testnav-pdl-forvalter - application: testnav-pdl-forvalter-dev + - application: testnav-levende-arbeidsforhold-ansettelse + cluster: dev-gcp outbound: external: - host: kodeverk-api.nav.no diff --git a/apps/levende-arbeidsforhold-ansettelse/src/main/java/no/nav/registre/testnorge/levendearbeidsforholdansettelse/config/ApplicationConfig.java b/apps/levende-arbeidsforhold-ansettelse/src/main/java/no/nav/registre/testnorge/levendearbeidsforholdansettelse/config/ApplicationConfig.java index 5cfe35d0d8a..70e4444e629 100644 --- a/apps/levende-arbeidsforhold-ansettelse/src/main/java/no/nav/registre/testnorge/levendearbeidsforholdansettelse/config/ApplicationConfig.java +++ b/apps/levende-arbeidsforhold-ansettelse/src/main/java/no/nav/registre/testnorge/levendearbeidsforholdansettelse/config/ApplicationConfig.java @@ -2,7 +2,6 @@ import no.nav.testnav.libs.servletcore.config.ApplicationCoreConfig; import no.nav.testnav.libs.servletsecurity.config.SecureOAuth2ServerToServerConfiguration; -import no.nav.testnav.libs.standalone.servletsecurity.config.InsecureJwtServerToServerConfiguration; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; diff --git a/apps/levende-arbeidsforhold-ansettelse/src/main/java/no/nav/registre/testnorge/levendearbeidsforholdansettelse/config/KafkaConfig.java b/apps/levende-arbeidsforhold-ansettelse/src/main/java/no/nav/registre/testnorge/levendearbeidsforholdansettelse/config/KafkaConfig.java deleted file mode 100644 index 6efde42bc6c..00000000000 --- a/apps/levende-arbeidsforhold-ansettelse/src/main/java/no/nav/registre/testnorge/levendearbeidsforholdansettelse/config/KafkaConfig.java +++ /dev/null @@ -1,76 +0,0 @@ -package no.nav.registre.testnorge.levendearbeidsforholdansettelse.config; - - -import lombok.extern.slf4j.Slf4j; -import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Profile; -import org.springframework.kafka.annotation.EnableKafka; - -@Slf4j -@EnableKafka -@Configuration -@Profile({"dev", "prod"}) -public class KafkaConfig { -/* - private final String groupId; - - public KafkaConfig(@Value("${spring.kafka.consumer.group-id}") String groupId) { - this.groupId = groupId; - } - - public ConsumerFactory consumerFactory() { - - String randomSuffixGroupID = String.valueOf((int)(Math.random() * 1000)); - - InetSocketAddress inetSocketAddress = new InetSocketAddress(0); - Map props = new HashMap<>(); - props.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, System.getenv("KAFKA_BROKERS")); - props.put(SslConfigs.SSL_KEYSTORE_LOCATION_CONFIG, System.getenv("KAFKA_KEYSTORE_PATH")); - props.put(SslConfigs.SSL_KEYSTORE_PASSWORD_CONFIG, System.getenv("KAFKA_CREDSTORE_PASSWORD")); - props.put(SslConfigs.SSL_TRUSTSTORE_LOCATION_CONFIG, System.getenv("KAFKA_TRUSTSTORE_PATH")); - props.put(SslConfigs.SSL_TRUSTSTORE_PASSWORD_CONFIG, System.getenv("KAFKA_CREDSTORE_PASSWORD")); - props.put(CommonClientConfigs.SECURITY_PROTOCOL_CONFIG, "SSL"); - props.put(KafkaAvroDeserializerConfig.SPECIFIC_AVRO_READER_CONFIG, true); - - props.put(AbstractKafkaSchemaSerDeConfig.BASIC_AUTH_CREDENTIALS_SOURCE, "USER_INFO"); - var username = System.getenv("KAFKA_SCHEMA_REGISTRY_USER"); - var password = System.getenv("KAFKA_SCHEMA_REGISTRY_PASSWORD"); - - props.put(AbstractKafkaSchemaSerDeConfig.USER_INFO_CONFIG, username + ":" + password); - props.put(AbstractKafkaSchemaSerDeConfig.SCHEMA_REGISTRY_URL_CONFIG, System.getenv("KAFKA_SCHEMA_REGISTRY")); - - props.put(ConsumerConfig.GROUP_ID_CONFIG, groupId + randomSuffixGroupID); - props.put(ConsumerConfig.CLIENT_ID_CONFIG, groupId + inetSocketAddress.getHostString()); - props.put(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, true); - props.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "latest"); - props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class); - props.put(ConsumerConfig.MAX_POLL_INTERVAL_MS_CONFIG, 1000 * 60 * 10); - props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, KafkaAvroDeserializer.class); - - return new DefaultKafkaConsumerFactory<>(props); - } - - @Bean - public ConcurrentKafkaListenerContainerFactory kafkaListenerContainerFactory() { - - ConcurrentKafkaListenerContainerFactory factory = new ConcurrentKafkaListenerContainerFactory<>(); - var consumerFactory = consumerFactory(); - consumerFactory.addListener(new ConsumerFactory.Listener<>() { - @Override - public void consumerAdded(String id, Consumer consumer) { - log.info("Legger til consumer med id: {}", id); - } - - @Override - public void consumerRemoved(String id, Consumer consumer) { - log.warn("Fjerner consumer med id: {}. Restarter app...", id); - } - }); - factory.setBatchListener(true); - factory.setConsumerFactory(consumerFactory); - factory.setCommonErrorHandler(new CommonLoggingErrorHandler()); - return factory; - } - - */ -} \ No newline at end of file diff --git a/apps/organisasjon-faste-data-service/config.yml b/apps/organisasjon-faste-data-service/config.yml index 6a9d8c71079..2355acdee86 100644 --- a/apps/organisasjon-faste-data-service/config.yml +++ b/apps/organisasjon-faste-data-service/config.yml @@ -32,6 +32,8 @@ spec: - application: testnav-synt-vedtakshistorikk-service - application: testnorge-statisk-data-forvalter cluster: dev-fss + - application: testnav-levende-arbeidsforhold-ansettelse + cluster: dev-gcp outbound: rules: - application: organisasjon-bestilling-service diff --git a/proxies/aareg-proxy/config.yml b/proxies/aareg-proxy/config.yml index f733815cdce..9265c224f6a 100644 --- a/proxies/aareg-proxy/config.yml +++ b/proxies/aareg-proxy/config.yml @@ -52,6 +52,8 @@ spec: cluster: dev-gcp - application: testnorge-statisk-data-forvalter cluster: dev-fss + - application: testnav-levende-arbeidsforhold-ansettelse + cluster: dev-gcp liveness: path: /internal/isAlive initialDelay: 4 diff --git a/proxies/ereg-proxy/config.yml b/proxies/ereg-proxy/config.yml index 64719a9a3e5..6703ff2de68 100644 --- a/proxies/ereg-proxy/config.yml +++ b/proxies/ereg-proxy/config.yml @@ -25,6 +25,8 @@ spec: cluster: dev-gcp - application: testnav-organisasjon-service cluster: dev-gcp + - application: testnav-levende-arbeidsforhold-ansettelse + cluster: dev-gcp liveness: path: /internal/isAlive initialDelay: 4 diff --git a/proxies/pdl-proxy/config.yml b/proxies/pdl-proxy/config.yml index 323e598ede3..fd0abde46da 100644 --- a/proxies/pdl-proxy/config.yml +++ b/proxies/pdl-proxy/config.yml @@ -58,6 +58,8 @@ spec: cluster: dev-gcp - application: testnav-tenor-search-service cluster: dev-gcp + - application: testnav-levende-arbeidsforhold-ansettelse + cluster: dev-gcp outbound: rules: - application: pdl-testdata