Prevent creating function of executor type container via fn create command (#2486)

This commit is contained in:
Pranoy Kumar Kundu
2022-07-19 15:26:12 +05:30
committed by GitHub
parent 1abe4dadb7
commit dba9143f45
+4
View File
@@ -112,6 +112,10 @@ func (opts *CreateSubCommand) complete(input cli.Input) error {
secretNames := input.StringSlice(flagkey.FnSecret)
cfgMapNames := input.StringSlice(flagkey.FnCfgMap)
if input.String(flagkey.FnExecutorType) == string(fv1.ExecutorTypeContainer) {
return errors.Errorf("this command does not support creating function of executor type container. Check `fission function run-container --help`")
}
invokeStrategy, err := getInvokeStrategy(input, nil)
if err != nil {
return err