Skip to content

Commit

Permalink
keep config/environment in one place
Browse files Browse the repository at this point in the history
Signed-off-by: anderssonw <[email protected]>
  • Loading branch information
anderssonw committed Oct 23, 2023
1 parent c5bf714 commit 5d13cf2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ async fn main() -> anyhow::Result<()> {
.with(format_layer)
.init();

let label_env = env::var("WATCH_SELECTOR").unwrap_or("nais.io/naisjob=true".to_string());

let actions = actions::generate();
let client = Client::try_default().await?;

Expand All @@ -57,7 +59,6 @@ async fn main() -> anyhow::Result<()> {
.unwrap();
});

let label_env = env::var("WATCH_SELECTOR").unwrap_or("nais.io/naisjob=true".to_string());
Controller::new(pods, watcher::Config::default().labels(&label_env))
.shutdown_on_signal()
.run(
Expand Down

0 comments on commit 5d13cf2

Please sign in to comment.