@@ -70,6 +70,7 @@ func addKubeCommands(topLevel *cobra.Command) {
70
70
no := & NameOptions {}
71
71
fo := & FilenameOptions {}
72
72
ta := & TagsOptions {}
73
+ do := & DebugOptions {}
73
74
apply := & cobra.Command {
74
75
Use : "apply -f FILENAME" ,
75
76
Short : "Apply the input files with image references resolved to built/pushed image digests." ,
@@ -144,7 +145,7 @@ func addKubeCommands(topLevel *cobra.Command) {
144
145
stdin .Write ([]byte ("---\n " ))
145
146
}
146
147
// Once primed kick things off.
147
- resolveFilesToWriter (fo , no , lo , ta , stdin )
148
+ resolveFilesToWriter (fo , no , lo , ta , do , stdin )
148
149
}()
149
150
150
151
// Run it.
@@ -157,6 +158,7 @@ func addKubeCommands(topLevel *cobra.Command) {
157
158
addNamingArgs (apply , no )
158
159
addFileArg (apply , fo )
159
160
addTagsArg (apply , ta )
161
+ addDebugArg (apply , do )
160
162
161
163
// Collect the ko-specific apply flags before registering the kubectl global
162
164
// flags so that we can ignore them when passing kubectl global flags through
@@ -197,13 +199,14 @@ func addKubeCommands(topLevel *cobra.Command) {
197
199
ko resolve --local -f config/` ,
198
200
Args : cobra .NoArgs ,
199
201
Run : func (cmd * cobra.Command , args []string ) {
200
- resolveFilesToWriter (fo , no , lo , ta , os .Stdout )
202
+ resolveFilesToWriter (fo , no , lo , ta , do , os .Stdout )
201
203
},
202
204
}
203
205
addLocalArg (resolve , lo )
204
206
addNamingArgs (resolve , no )
205
207
addFileArg (resolve , fo )
206
208
addTagsArg (resolve , ta )
209
+ addDebugArg (resolve , do )
207
210
topLevel .AddCommand (resolve )
208
211
209
212
publish := & cobra.Command {
@@ -237,12 +240,13 @@ func addKubeCommands(topLevel *cobra.Command) {
237
240
ko publish --local github.com/foo/bar/cmd/baz github.com/foo/bar/cmd/blah` ,
238
241
Args : cobra .MinimumNArgs (1 ),
239
242
Run : func (_ * cobra.Command , args []string ) {
240
- publishImages (args , no , lo , ta )
243
+ publishImages (args , no , lo , ta , do )
241
244
},
242
245
}
243
246
addLocalArg (publish , lo )
244
247
addNamingArgs (publish , no )
245
248
addTagsArg (publish , ta )
249
+ addDebugArg (publish , do )
246
250
topLevel .AddCommand (publish )
247
251
248
252
run := & cobra.Command {
@@ -259,7 +263,7 @@ func addKubeCommands(topLevel *cobra.Command) {
259
263
# This supports relative import paths as well.
260
264
ko run foo --image=./cmd/baz` ,
261
265
Run : func (cmd * cobra.Command , args []string ) {
262
- imgs := publishImages ([]string {bo .Path }, no , lo , ta )
266
+ imgs := publishImages ([]string {bo .Path }, no , lo , ta , do )
263
267
264
268
// There's only one, but this is the simple way to access the
265
269
// reference since the import path may have been qualified.
@@ -293,6 +297,7 @@ func addKubeCommands(topLevel *cobra.Command) {
293
297
addNamingArgs (run , no )
294
298
addImageArg (run , bo )
295
299
addTagsArg (run , ta )
300
+ addDebugArg (run , do )
296
301
297
302
topLevel .AddCommand (run )
298
303
}
0 commit comments