@@ -27,7 +27,7 @@ func NewHealthchecksCommand(cmdr *commands.DryccCmd) *cobra.Command {
2727 }
2828
2929 cmd .PersistentFlags ().StringVarP (& app , "app" , "a" , "" , i18n .T ("The uniquely identifiable name of the application" ))
30- cmd .PersistentFlags ().StringVarP (& healthchecksFlags .ptype , "ptype" , "p" , "web " , i18n .T ("The ptype for which the health check needs to be removed " ))
30+ cmd .PersistentFlags ().StringVarP (& healthchecksFlags .ptype , "ptype" , "p" , "" , i18n .T ("The ptype for which the health check needs to be listed " ))
3131 cmd .Flags ().IntVarP (& version , "version" , "v" , 0 , i18n .T ("The version for which the health check needs to be listed" ))
3232
3333 appCompletion := completion.AppCompletion {ArgsLen : - 1 , ConfigFile : & cmdr .ConfigFile }
@@ -78,7 +78,7 @@ func healthchecksSet(cmdr *commands.DryccCmd) *cobra.Command {
7878
7979 healthChecksCompletion := completion.HealthChecksCompletion {ConfigFile : & cmdr .ConfigFile }
8080 cmd := & cobra.Command {
81- Use : "set <health-type> <probe-type> [--] <args>..." ,
81+ Use : "set <health-type> <probe-type> [flags] [ --] <args>..." ,
8282 Args : cobra .MinimumNArgs (2 ),
8383 Example : template .CustomExample (
8484 "drycc healthchecks set readinessProbe httpGet --path=/health -- 8000" ,
@@ -177,6 +177,10 @@ port number to perform the socket connection on the Container.
177177 },
178178 }
179179
180+ cmd .Flags ().StringVarP (& healthchecksFlags .ptype , "ptype" , "p" , "" , i18n .T ("The ptype for which the health check needs to be applied" ))
181+ ptypeCompletion := completion.PtsCompletion {ArgsLen : - 1 , ConfigFile : & cmdr .ConfigFile , AppID : & app }
182+ cmd .RegisterFlagCompletionFunc ("ptype" , ptypeCompletion .CompletionFunc )
183+
180184 cmd .Flags ().StringVar (& flags .path , "path" , "/" , i18n .T ("The relative URL path for 'httpGet' probes" ))
181185 cmd .Flags ().StringVar (& flags .headers , "headers" , "" , i18n .T ("The HTTP headers to send for 'httpGet' probes, separated by commas" ))
182186 cmd .Flags ().IntVar (& flags .initialDelay , "initial-delay-timeout" , 50 , i18n .T ("The initial delay timeout for the probe" ))
@@ -218,6 +222,10 @@ func healthchecksUnset(cmdr *commands.DryccCmd) *cobra.Command {
218222 return cmdr .HealthchecksUnset (app , healthchecksFlags .ptype , flags .healths )
219223 },
220224 }
225+ cmd .Flags ().StringVarP (& healthchecksFlags .ptype , "ptype" , "p" , "" , i18n .T ("The ptype for which the health check needs to be removed" ))
226+ ptypeCompletion := completion.PtsCompletion {ArgsLen : - 1 , ConfigFile : & cmdr .ConfigFile , AppID : & app }
227+ cmd .RegisterFlagCompletionFunc ("ptype" , ptypeCompletion .CompletionFunc )
228+
221229 return cmd
222230}
223231
0 commit comments