Panfactum / stack

The Panfactum Stack
https://panfactum.com
Other
16 stars 5 forks source link

fix(kube_labels): provide a mechanism to omit extra_tags #47

Closed mschnee closed 6 months ago

mschnee commented 6 months ago

A potential workaround for https://github.com/Panfactum/stack/issues/46

If accepted, I will also update the module documentation.

# region.yaml
extra_tags:
  corgeek.net/test: "value"
  "corgeek:foo": "FOO"
# module.yaml
extra_tags:
  corgeek.net/test: "value"
  "corgeek:foo": "__omit__"
Changes to Outputs:
  + kube_labels = {
      + "corgeek.net/test"             = "value"
      + "panfactum.com/environment"   = "development"
      + "panfactum.com/local"         = "false"
      + "panfactum.com/module"        = "kube_labels"
      + "panfactum.com/region"        = "us-west-2"
      + "panfactum.com/root-module"   = "kube_labels"
      + "panfactum.com/stack-commit"  = "6900872b7c8a73ef1d501a8399a438ac47d86020"
      + "panfactum.com/stack-version" = "edge.24-05-30"
    }
fullykubed commented 6 months ago

Good debugging!

While I agree with the root cause, I think there is a better solution.

I have been slowly replacing the matching_labels parameter in all the modules with a single randomly generated id value instead of using the entire label set. This improves performance, allows for multiple sets of the same module to be deployed in the same cluster, and avoids issues like #46.

Unfortunately, I only got about 70% of the way done with that conversion and some modules like cert-manager were not completed. I will tackle that this morning.