in controllers/etcd_plane.go [164:179]
func MatchesEtcdadmConfig(machineConfigs map[string]*etcdbootstrapv1.EtcdadmConfig, ec *etcdv1.EtcdadmCluster) collections.Func {
return func(machine *clusterv1.Machine) bool {
if machine == nil {
return false
}
etcdadmConfig, found := machineConfigs[machine.Name]
if !found {
// Return true here because failing to get EtcdadmConfig should not be considered as unmatching.
// This is a safety precaution to avoid rolling out machines if the client or the api-server is misbehaving.
return true
}
ecConfig := ec.Spec.EtcdadmConfigSpec.DeepCopy()
return reflect.DeepEqual(&etcdadmConfig.Spec, ecConfig)
}
}