fix: allow updating diskSelector option

Looks like `cmp.Diff` needs to have `AllowUnexported` option for
types with unexported fields if you want to avoid panic when you compare them.

Signed-off-by: Artem Chernyshev <artem.chernyshev@talos-systems.com>
This commit is contained in:
Artem Chernyshev 2021-08-27 00:48:11 +03:00
parent 761ccaf323
commit da0f6e7e1d
No known key found for this signature in database
GPG Key ID: 9B9D0328B57B443F

View File

@ -115,7 +115,7 @@ func (r *Runtime) CanApplyImmediate(b []byte) error {
}
if !reflect.DeepEqual(currentConfig, newConfig) {
diff := cmp.Diff(currentConfig, newConfig)
diff := cmp.Diff(currentConfig, newConfig, cmp.AllowUnexported(v1alpha1.InstallDiskSizeMatcher{}))
return fmt.Errorf("this config change can't be applied in immediate mode\ndiff: %s", diff)
}