Skip to content

Commit

Permalink
Merge pull request #49 from srl-labs/fix/clabverter-insecure-registries
Browse files Browse the repository at this point in the history
fix: insecureRegistry
  • Loading branch information
carlmontanari authored Oct 15, 2023
2 parents ae4ab1e + 30d4f27 commit fa62c5e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion clabverter/clabverter.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,19 @@ func MustNewClabverter(
logLevel,
)

// trim insecureRegistries and split into array if not empty
var insecureRegistriesArr []string
if len(strings.TrimSpace(insecureRegistries)) > 0 {
insecureRegistriesArr = strings.Split(insecureRegistries, ",")
}

return &Clabverter{
logger: clabverterLogger,
topologyFile: topologyFile,
outputDirectory: outputDirectory,
stdout: stdout,
destinationNamespace: destinationNamespace,
insecureRegistries: strings.Split(insecureRegistries, ","),
insecureRegistries: insecureRegistriesArr,
startupConfigConfigMaps: make(map[string]topologyConfigMapTemplateVars),
extraFilesConfigMaps: make(map[string][]topologyConfigMapTemplateVars),
renderedFiles: []renderedContent{},
Expand Down

0 comments on commit fa62c5e

Please sign in to comment.