Skip to content
This repository has been archived by the owner on Mar 15, 2021. It is now read-only.

Update configuration to load from yaml or env vars. #147

Merged
merged 1 commit into from
Jul 9, 2019
Merged

Conversation

hexedpackets
Copy link
Contributor

@hexedpackets hexedpackets commented Jul 9, 2019

Env vars are the preferred way to configure ffwd when its running in kubernetes, and will be needed for #132

This also fixes #120 since the Konf library ignores unknowns by default.

@hexedpackets hexedpackets requested a review from a team July 9, 2019 17:08
@hexedpackets
Copy link
Contributor Author

We don't currently have docs for the configuration. I made a new issue to address that: #148

val automaticHostTag = config[AgentConfig.automaticHostTag]
val input: InputManagerModule = config[AgentConfig.input]
val output: OutputManagerModule = config[AgentConfig.output]
val searchDomain = config[AgentConfig.searchDomain]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be SearchDomainDiscovery?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The type is SearchDomainDiscovery but I kept the original variable name of searchDomain.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the object type still is - down below the config will return val searchDomain by lazy { SearchDomainDiscovery.supplyDefault() }

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@dmichel1 dmichel1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 general comment about the shading - lgtm

@@ -119,6 +124,18 @@
<goals>
<goal>shade</goal>
</goals>
<configuration>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are apparently signed jar dependencies that cause the shading to fail with a security error. The filter removes the signed artifacts from the jars its bundling so that the JVM will actually run it.

val automaticHostTag = config[AgentConfig.automaticHostTag]
val input: InputManagerModule = config[AgentConfig.input]
val output: OutputManagerModule = config[AgentConfig.output]
val searchDomain = config[AgentConfig.searchDomain]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the object type still is - down below the config will return val searchDomain by lazy { SearchDomainDiscovery.supplyDefault() }

@hexedpackets hexedpackets merged commit 8aa94a7 into master Jul 9, 2019
@delete-merged-branch delete-merged-branch bot deleted the envvar branch July 9, 2019 19:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ignore unknown config fields
3 participants