File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ func GenerateConfigFile() error {
87
87
return err
88
88
}
89
89
90
- // Create the regsync config file
90
+ // Create the first regsync config file for tracking images and tags on prime registry
91
91
if err := createRegSyncConfigFile (imageTagMap ); err != nil {
92
92
return err
93
93
}
@@ -282,16 +282,18 @@ sync:`)
282
282
fmt .Fprintln (file )
283
283
fmt .Fprintln (file , " type: repository" )
284
284
fmt .Fprintln (file , " tags:" )
285
- fmt .Fprintln (file , " deny:" )
286
- fmt .Fprintln (file , ` - "*"` )
287
- fmt .Fprintln (file , " allow:" )
288
285
289
286
// We collect all tags and then sort them so there is consistency
290
287
// in the update of the regsync file always.
291
288
tags := make ([]string , 0 )
292
289
tags = append (tags , imageTagMap [repo ]... )
290
+ if len (tags ) == 0 {
291
+ fmt .Fprintln (file , " deny:" )
292
+ fmt .Fprintln (file , ` - "*"` )
293
+ continue
294
+ }
293
295
sort .Strings (tags )
294
-
296
+ fmt . Fprintln ( file , " allow:" )
295
297
for _ , tag := range tags {
296
298
if tag == "" {
297
299
continue // skip empty tag
You can’t perform that action at this time.
0 commit comments