From 87b9838790040b477855137ec590e9ed76e327e2 Mon Sep 17 00:00:00 2001 From: Amit Kumar Das Date: Thu, 19 Nov 2020 20:19:45 +0530 Subject: [PATCH] fix(recipe): include ignoreDiscovery as a valid Recipe schema (#183) This fixes the InvalidSchema issue faced while applying Recipe custom resource in a Kubernetes cluster. Signed-off-by: AmitKumarDas --- types/recipe/apply.go | 2 +- types/recipe/create.go | 2 +- types/recipe/schema.go | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/types/recipe/apply.go b/types/recipe/apply.go index 1fe308e..2ab9ce4 100644 --- a/types/recipe/apply.go +++ b/types/recipe/apply.go @@ -53,7 +53,7 @@ type Apply struct { // // NOTE: // This is only applicable for kind: CustomResourceDefinition - IgnoreDiscovery bool + IgnoreDiscovery bool `json:"ignoreDiscovery"` } // String implements the Stringer interface diff --git a/types/recipe/create.go b/types/recipe/create.go index 0fc0db0..1a724a0 100644 --- a/types/recipe/create.go +++ b/types/recipe/create.go @@ -35,7 +35,7 @@ type Create struct { // // NOTE: // This is only applicable for kind: CustomResourceDefinition - IgnoreDiscovery bool + IgnoreDiscovery bool `json:"ignoreDiscovery"` } // String implements the Stringer interface diff --git a/types/recipe/schema.go b/types/recipe/schema.go index 9163da8..2e6f8e9 100644 --- a/types/recipe/schema.go +++ b/types/recipe/schema.go @@ -50,6 +50,7 @@ var SupportedAbsolutePaths = []string{ "spec.tasks.[*].name", "spec.tasks.[*].failFast.when", "spec.tasks.[*].ignoreError", + "spec.tasks.[*].create.ignoreDiscovery", "spec.tasks.[*].create.replicas", "spec.tasks.[*].assert.stateCheck.stateCheckOperator", "spec.tasks.[*].assert.stateCheck.count", @@ -57,6 +58,8 @@ var SupportedAbsolutePaths = []string{ "spec.tasks.[*].assert.pathCheck.pathCheckOperator", "spec.tasks.[*].assert.pathCheck.value", "spec.tasks.[*].assert.pathCheck.dataType", + "spec.tasks.[*].apply.ignoreDiscovery", + "spec.tasks.[*].apply.replicas", } // UserAllowedPathPrefixes represent the nested field paths