Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: yaroslavborbat <[email protected]>
  • Loading branch information
yaroslavborbat committed Dec 13, 2024
1 parent 620cac1 commit 9b089bf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
1 change: 0 additions & 1 deletion hooks/module_config_on_startup.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 9b089bf

Please sign in to comment.