diff --git a/operator/inventory/config.go b/operator/inventory/config.go index 31a72ec16..a20800e6a 100644 --- a/operator/inventory/config.go +++ b/operator/inventory/config.go @@ -303,13 +303,7 @@ func (nd *Exclude) IsStorageNodeExcluded(name string, class string) bool { } func (cfg *Config) HasStorageClass(name string) bool { - for _, class := range cfg.ClusterStorage { - if class == name { - return true - } - } - - return false + return slices.Contains(cfg.ClusterStorage, name) } func (cfg *Config) StorageClassesForNode(name string) []string {