Skip to content

Commit

Permalink
Fix installation of a Module generated using sha256 OCM Name Mapping (
Browse files Browse the repository at this point in the history
kyma-project#723)

* Fix invalid repo URL

* Lint fix

* lint fix
  • Loading branch information
Tomasz-Smelcerz-SAP authored Jul 18, 2023
1 parent 6398063 commit c504a5b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ const (
defaultListenerPort = 9080
defaultLogLevel = log.WarnLevel
defaultPurgeFinalizerTimeout = 5 * time.Minute
maxConcurrentKymaReconciles = 25
maxConcurrentManifestReconciles = 25
)

//nolint:funlen
Expand All @@ -40,10 +42,10 @@ func defineFlagVar() *FlagVar {
"The address the skr listener endpoint binds to.")
flag.StringVar(&flagVar.pprofAddr, "pprof-bind-address", ":8084",
"The address the pprof endpoint binds to.")
flag.IntVar(&flagVar.maxConcurrentKymaReconciles, "max-concurrent-kyma-reconciles", 25,
flag.IntVar(&flagVar.maxConcurrentKymaReconciles, "max-concurrent-kyma-reconciles", maxConcurrentKymaReconciles,
"The maximum number of concurrent Kyma Reconciles which can be run.")
flag.IntVar(&flagVar.maxConcurrentManifestReconciles, "max-concurrent-manifest-reconciles", 25,
"The maximum number of concurrent Manifest Reconciles which can be run.")
flag.IntVar(&flagVar.maxConcurrentManifestReconciles, "max-concurrent-manifest-reconciles",
maxConcurrentManifestReconciles, "The maximum number of concurrent Manifest Reconciles which can be run.")
flag.IntVar(&flagVar.maxConcurrentWatcherReconciles, "max-concurrent-watcher-reconciles", 1,
"The maximum number of concurrent Watcher Reconciles which can be run.")
flag.BoolVar(&flagVar.enableLeaderElection, "leader-elect", false,
Expand Down
2 changes: 1 addition & 1 deletion pkg/img/parse.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func getOCIRef(
layerRef.Repo = fmt.Sprintf("%s/%s", repo.Name(), repoSubpath)
layerRef.Name = descriptor.GetName()
case genericocireg.OCIRegistryDigestMapping:
layerRef.Repo = repo.UniformRepositorySpec().RepositoryRef()
layerRef.Repo = fmt.Sprintf("%s/", repo.Name())
layerRef.Name = sha256sum(descriptor.GetName())
default:
return nil, fmt.Errorf(
Expand Down

0 comments on commit c504a5b

Please sign in to comment.