Skip to content

Commit

Permalink
fix(recipe): include ignoreDiscovery as a valid Recipe schema (#183)
Browse files Browse the repository at this point in the history
This fixes the InvalidSchema issue faced while applying Recipe
custom resource in a Kubernetes cluster.

Signed-off-by: AmitKumarDas <[email protected]>
  • Loading branch information
Amit Kumar Das authored Nov 19, 2020
1 parent a9b1631 commit 87b9838
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion types/recipe/apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion types/recipe/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions types/recipe/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,16 @@ 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",
"spec.tasks.[*].assert.pathCheck.path",
"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
Expand Down

0 comments on commit 87b9838

Please sign in to comment.