Replies: 1 comment
-
@janpieper Makes me think of kustomizations, it uses that kind of merging strategies. Have a look and PRs are most welcome 🙏 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
Problem
The default value for the
nginx_values
local is based on a ton of locals and variables:terraform-hcloud-kube-hetzner/locals.tf
Lines 546 to 574 in dbcf426
Same goes for haproxy_values and traefik_values, etc.
To add a custom value, I am currently forced to copy the default value to my Terraform code, which could then cause inconsistencies when I change e.g.
load_balancer_algorithm_type
but forget to also update my customnginx_values
.Example
As you can see
load_balancer_algorithm_type
is set toleast_connections
, but theload-balancer.hetzner.cloud/algorithm-type
annotation is set toround_robin
.To avoid this, one can add a local and use it for the module-variable and for the custom
nginx_value
:That works, but it's quite some work, because tons of variables are used and they also use some locals that are based on calculations:
terraform-hcloud-kube-hetzner/locals.tf
Line 230 in dbcf426
terraform-hcloud-kube-hetzner/locals.tf
Line 233 in dbcf426
Idea
It would be cool to have a way to add custom options to the default values (e.g. some kind of merging strategy?) without being forced to copy the default value.
Beta Was this translation helpful? Give feedback.
All reactions