Skip to content

Commit

Permalink
feat: inject v2 configs into sidecars (#3036)
Browse files Browse the repository at this point in the history
  • Loading branch information
hspitzley-czi authored Feb 12, 2024
1 parent f72f35d commit 3883ac3
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions terraform/modules/happy-service-eks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,21 @@ resource "kubernetes_deployment_v1" "deployment" {
value = env.value
}
}

// happy configs: add env-level configs first
env_from {
secret_ref {
name = "happy-config.${var.app_name}.${var.deployment_stage}"
optional = true
}
}
// happy configs: add stack-level configs second so they override env-level configs
env_from {
secret_ref {
name = "happy-config.${var.app_name}.${var.deployment_stage}.${var.stack_name}"
optional = true
}
}
}
}

Expand Down Expand Up @@ -514,6 +529,21 @@ resource "kubernetes_deployment_v1" "deployment" {
value = env.value
}
}

// happy configs: add env-level configs first
env_from {
secret_ref {
name = "happy-config.${var.app_name}.${var.deployment_stage}"
optional = true
}
}
// happy configs: add stack-level configs second so they override env-level configs
env_from {
secret_ref {
name = "happy-config.${var.app_name}.${var.deployment_stage}.${var.stack_name}"
optional = true
}
}
}
}

Expand Down

0 comments on commit 3883ac3

Please sign in to comment.