metropolis: remove stutter in ClusterConfiguration.KubernetesConfig
We already know this is a config (it lives in ClusterConfiguration), no
need to call that a config again.
This doesn't break any compatibility yet as field names are not (yet)
under a stability guarantee.
Change-Id: Ib6492d1c8303cbd0620b979b8047ec9757e301c0
Reviewed-on: https://review.monogon.dev/c/monogon/+/3594
Reviewed-by: Lorenz Brun <lorenz@monogon.tech>
Tested-by: Jenkins CI
diff --git a/metropolis/node/kubernetes/labelmaker.go b/metropolis/node/kubernetes/labelmaker.go
index 1713223..8cd513f 100644
--- a/metropolis/node/kubernetes/labelmaker.go
+++ b/metropolis/node/kubernetes/labelmaker.go
@@ -127,8 +127,8 @@
if err != nil {
return fmt.Errorf("could not get cluster info: %w", err)
}
- if info.ClusterConfiguration != nil && info.ClusterConfiguration.KubernetesConfig != nil {
- for _, rule := range info.ClusterConfiguration.KubernetesConfig.NodeLabelsToSynchronize {
+ if info.ClusterConfiguration != nil && info.ClusterConfiguration.Kubernetes != nil {
+ for _, rule := range info.ClusterConfiguration.Kubernetes.NodeLabelsToSynchronize {
if rule.Regexp != "" {
re, err := regexp.Compile(rule.Regexp)
if err != nil {