Add method and subpath flags to timetrigger object for triggering a function (#3017)
* Update timetrigger crd and add method and subpath fields in spec. Update fission-cli to accept user input for method and subpath fields. Update publisher package to utilize these fields for triggering a function. Update timer controller to use method and subpath fields for publishing a request. Add a new test TestPublisherSubpath in pulisher package. Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io> * Use kubebuilder default annotation. Update test for fission-cli timetrigger create, update command to support method and subpath flags. Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io> --------- Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
This commit is contained in:
@@ -54,10 +54,10 @@ func (opts *ListSubCommand) do(input cli.Input) (err error) {
|
||||
|
||||
w := tabwriter.NewWriter(os.Stdout, 0, 0, 1, ' ', 0)
|
||||
|
||||
fmt.Fprintf(w, "%v\t%v\t%v\n", "NAME", "CRON", "FUNCTION_NAME")
|
||||
fmt.Fprintf(w, "%v\t%v\t%v\t%v\t%v\n", "NAME", "CRON", "FUNCTION_NAME", "METHOD", "SUBPATH")
|
||||
for _, tt := range tts.Items {
|
||||
fmt.Fprintf(w, "%v\t%v\t%v\n",
|
||||
tt.ObjectMeta.Name, tt.Spec.Cron, tt.Spec.FunctionReference.Name)
|
||||
fmt.Fprintf(w, "%v\t%v\t%v\t%v\t%v\n",
|
||||
tt.ObjectMeta.Name, tt.Spec.Cron, tt.Spec.FunctionReference.Name, tt.Spec.Method, tt.Spec.Subpath)
|
||||
}
|
||||
w.Flush()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user