-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move and create defaults for configs
- Loading branch information
Showing
10 changed files
with
42 additions
and
72 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
kafka-2/main/no/nav/aap/kafka/streams/v2/config/SchemaRegistryConfig.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package no.nav.aap.kafka.streams.v2.config | ||
|
||
import java.util.* | ||
|
||
private fun getEnvVar(envar: String) = System.getenv(envar) ?: error("missing envvar $envar") | ||
|
||
data class SchemaRegistryConfig( | ||
private val url: String = getEnvVar("KAFKA_SCHEMA_REGISTRY"), | ||
private val user: String = getEnvVar("KAFKA_SCHEMA_REGISTRY_USER"), | ||
private val password: String = getEnvVar("KAFKA_SCHEMA_REGISTRY_PASSWORD"), | ||
) { | ||
fun properties() = Properties().apply { | ||
this["schema.registry.url"] = url | ||
this["basic.auth.credentials.source"] = "USER_INFO" | ||
this["basic.auth.user.info"] = "$user:$password" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 0 additions & 27 deletions
27
kafka-avroserde/main/no/nav/aap/kafka/schemaregistry/SchemaRegistryConfig.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters