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
cmd.Flags().StringVar(&opts.From, "from", "", "A Docker image repository to import images from")
59
-
cmd.Flags().BoolVar(&opts.Confirm, "confirm", false, "If true, allow the image stream import location to be set or changed")
60
-
cmd.Flags().BoolVar(&opts.All, "all", false, "If true, import all tags from the provided source on creation or if --from is specified")
61
-
cmd.Flags().StringVar(&opts.ReferencePolicy, "reference-policy", sourceReferencePolicy, "Allow to request pullthrough for external image when set to 'local'. Defaults to 'source'.")
62
-
cmd.Flags().BoolVar(&opts.DryRun, "dry-run", false, "Fetch information about images without creating or updating an image stream.")
63
-
cmd.Flags().BoolVar(&opts.Scheduled, "scheduled", false, "Set each imported Docker image to be periodically imported from a remote repository. Defaults to false.")
64
-
opts.Insecure=cmd.Flags().Bool("insecure", false, "If true, allow importing from registries that have invalid HTTPS certificates or are hosted via HTTP. This flag will take precedence over the insecure annotation.")
65
-
66
-
returncmd
67
-
}
68
-
69
43
// ImageImportOptions contains all the necessary information to perform an import.
70
44
typeImportImageOptionsstruct {
71
45
// user set values
72
-
Fromstring
73
-
Confirmbool
74
-
Allbool
75
-
Scheduledbool
76
-
Insecure*bool
46
+
Fromstring
47
+
Confirmbool
48
+
Allbool
49
+
Scheduledbool
50
+
Insecurebool
51
+
InsecureFlagProvidedbool
77
52
78
53
DryRunbool
79
54
@@ -84,27 +59,54 @@ type ImportImageOptions struct {
cmd.Flags().StringVar(&o.From, "from", o.From, "A Docker image repository to import images from")
92
+
cmd.Flags().BoolVar(&o.Confirm, "confirm", o.Confirm, "If true, allow the image stream import location to be set or changed")
93
+
cmd.Flags().BoolVar(&o.All, "all", o.All, "If true, import all tags from the provided source on creation or if --from is specified")
94
+
cmd.Flags().StringVar(&o.ReferencePolicy, "reference-policy", o.ReferencePolicy, "Allow to request pullthrough for external image when set to 'local'. Defaults to 'source'.")
95
+
cmd.Flags().BoolVar(&o.DryRun, "dry-run", o.DryRun, "Fetch information about images without creating or updating an image stream.")
96
+
cmd.Flags().BoolVar(&o.Scheduled, "scheduled", o.Scheduled, "Set each imported Docker image to be periodically imported from a remote repository. Defaults to false.")
97
+
cmd.Flags().BoolVar(&o.Insecure, "insecure", o.Insecure, "If true, allow importing from registries that have invalid HTTPS certificates or are hosted via HTTP. This flag will take precedence over the insecure annotation.")
98
+
99
+
returncmd
94
100
}
95
101
96
102
// Complete turns a partially defined ImportImageOptions into a solvent structure
fmt.Fprintf(o.out, "\ninfo: The remote repository contained %d additional tags which were not imported: %s\n", len(r.AdditionalTags), strings.Join(r.AdditionalTags, ", "))
225
+
fmt.Fprintf(o.Out, "\ninfo: The remote repository contained %d additional tags which were not imported: %s\n", len(r.AdditionalTags), strings.Join(r.AdditionalTags, ", "))
227
226
}
228
227
returnnil
229
228
}
@@ -457,8 +456,8 @@ func (o *ImportImageOptions) newImageStreamImport(stream *imageapi.ImageStream)
0 commit comments