I am working on migrating from puppet7 to puppet8 and I'm being blocked by this simple class which is used to inject enc node parameters into puppetdb, which is then used for prometheus service discovery, relabeling, etc.
https://github.com/lsst-it/lsst-control/blob/production/site/profile/manifests/core/node_info.pp#L14-L19
The issue is that in the current setup, not all of these node parameters are being set. E.g. $::cluster isn't defined for all hosts. puppet8 is unhappy about undefined variables. I tried replacing the $::cluster with a lookup() but that also fails
default expression for $cluster tries to illegally access not yet evaluated $cluster
. Any suggestion on the best way to resolve this? E.g. doing the lookup in hiera instead of as class param defaults.