diff --git a/hooks/module_config_on_startup.py b/hooks/module_config_on_startup.py old mode 100644 new mode 100755 index 80c6918bb..307a67d3a --- a/hooks/module_config_on_startup.py +++ b/hooks/module_config_on_startup.py @@ -25,7 +25,6 @@ class ModuleConfigValidateHook(Hook): KIND="ModuleConfig" API_VERSION="deckhouse.io/v1alpha1" SNAPSHOT_NAME = "module-config-validate" - LABEL = "moduleconfig.deckhouse.io/name" def __init__(self, module_name: str): self.module_name = module_name diff --git a/images/virtualization-artifact/pkg/controller/moduleconfig/moduleconfig_webhook.go b/images/virtualization-artifact/pkg/controller/moduleconfig/moduleconfig_webhook.go index a449bc833..50e914480 100644 --- a/images/virtualization-artifact/pkg/controller/moduleconfig/moduleconfig_webhook.go +++ b/images/virtualization-artifact/pkg/controller/moduleconfig/moduleconfig_webhook.go @@ -24,7 +24,6 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" "github.com/deckhouse/deckhouse/pkg/log" - mcapi "github.com/deckhouse/virtualization-controller/pkg/controller/moduleconfig/api" "github.com/deckhouse/virtualization-controller/pkg/controller/validator" ) diff --git a/images/virtualization-artifact/pkg/controller/moduleconfig/util.go b/images/virtualization-artifact/pkg/controller/moduleconfig/util.go index 3cefedf6f..4ad395409 100644 --- a/images/virtualization-artifact/pkg/controller/moduleconfig/util.go +++ b/images/virtualization-artifact/pkg/controller/moduleconfig/util.go @@ -66,15 +66,15 @@ func parseCIDRs(settings mcapi.SettingsValues) ([]netip.Prefix, error) { if err != nil { return nil, err } - parseCIDRs := make([]netip.Prefix, len(CIDRs)) - for i, validateCIDR := range CIDRs { - parsedCIDR, err := netip.ParsePrefix(validateCIDR) + parsedCIDRs := make([]netip.Prefix, len(CIDRs)) + for i, CIDR := range CIDRs { + parsedCIDR, err := netip.ParsePrefix(CIDR) if err != nil { - return nil, fmt.Errorf("failed to parse CIDR %s: %w", validateCIDR, err) + return nil, fmt.Errorf("failed to parse CIDR %s: %w", CIDR, err) } - parseCIDRs[i] = parsedCIDR + parsedCIDRs[i] = parsedCIDR } - return parseCIDRs, nil + return parsedCIDRs, nil } func convertToStringSlice(input []interface{}) ([]string, error) {