You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upon starting a image cache server, attempt to generate patch for Talos.
Signed-off-by: Mateusz Urbanek <mateusz.urbanek@siderolabs.com>
(cherry picked from commit f1c04e4)
log.Printf("writing config patch to %s", patchFile)
552
+
553
+
returnos.WriteFile(patchFile, patchBytes, 0o644)
554
+
}
555
+
465
556
varimageCacheServeCmdFlagsstruct {
466
557
imageCachePathstring
467
558
addressstring
559
+
mirrors []string
468
560
tlsCertFilestring
469
561
tlsKeyFilestring
470
562
}
@@ -485,7 +577,7 @@ var imageCacheCertGenCmd = &cobra.Command{
485
577
returnnil
486
578
}
487
579
488
-
iferr=generateConfigPatch(caPEM); err!=nil {
580
+
iferr=generateCAConfigPatch(caPEM); err!=nil {
489
581
returnerr
490
582
}
491
583
@@ -505,7 +597,7 @@ var imageCacheCertGenCmd = &cobra.Command{
505
597
},
506
598
}
507
599
508
-
funcgenerateConfigPatch(caPEM []byte) error {
600
+
funcgenerateCAConfigPatch(caPEM []byte) error {
509
601
patch:=security.NewTrustedRootsConfigV1Alpha1()
510
602
patch.MetaName="image-cache-ca"
511
603
patch.Certificates=string(caPEM)
@@ -562,6 +654,8 @@ func init() {
562
654
imageCacheServeCmd.PersistentFlags().StringVar(&imageCacheServeCmdFlags.imageCachePath, "image-cache-path", "", "directory to save the image cache in flat format")
imageCacheServeCmd.PersistentFlags().StringVar(&imageCacheServeCmdFlags.address, "address", constants.RegistrydListenAddress, "address to serve the registry on")
0 commit comments