Skip to content

Commit 950c722

Browse files
committed
fixed Undefined pullCasDir
Signed-off-by: Horiodino <[email protected]>
1 parent f9746b6 commit 950c722

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

catalogd/cmd/catalogd/main.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ type config struct {
8989
webhookPort int
9090
caCertDir string
9191
globalPullSecret string
92+
pullCasDir string
9293
}
9394

9495
func init() {
@@ -134,6 +135,7 @@ func newRootCmd() *cobra.Command {
134135
flags.IntVar(&cfg.webhookPort, "webhook-server-port", 9443, "Webhook server port")
135136
flags.StringVar(&cfg.caCertDir, "ca-certs-dir", "", "Directory of CA certificates")
136137
flags.StringVar(&cfg.globalPullSecret, "global-pull-secret", "", "Global pull secret (<namespace>/<name>)")
138+
flag.StringVar(&cfg.pullCasDir, "pull-cas-dir", "", "The directory of TLS certificate authoritiess to use for verifying HTTPS connections to image registries.")
137139

138140
cmd.AddCommand(newVersionCmd())
139141
klog.InitFlags(nil)
@@ -218,7 +220,7 @@ func run(ctx context.Context, cfg *config) error {
218220
return err
219221
}
220222

221-
unpacker := configureUnpacker(cfg.cacheDir, cfg.caCertDir, authFilePath)
223+
unpacker := configureUnpacker(cfg.cacheDir, authFilePath, cfg.pullCasDir)
222224

223225
localStorage, err := configureStorage(cfg)
224226
if err != nil {
@@ -342,7 +344,7 @@ func initializeCacheDirectories(cacheDir string) error {
342344
return nil
343345
}
344346

345-
func configureUnpacker(cacheDir, caCertDir, authFilePath string) *source.ContainersImageRegistry {
347+
func configureUnpacker(cacheDir, authFilePath string, pullCasDir string) *source.ContainersImageRegistry {
346348
unpackCacheBasePath := filepath.Join(cacheDir, source.UnpackCacheDir)
347349
return &source.ContainersImageRegistry{
348350
BaseCachePath: unpackCacheBasePath,

0 commit comments

Comments
 (0)