Skip to content

Commit 87b9838

Browse files
author
Amit Kumar Das
authoredNov 19, 2020
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 <[email protected]>
1 parent a9b1631 commit 87b9838

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed
 

‎types/recipe/apply.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ type Apply struct {
5353
//
5454
// NOTE:
5555
// This is only applicable for kind: CustomResourceDefinition
56-
IgnoreDiscovery bool
56+
IgnoreDiscovery bool `json:"ignoreDiscovery"`
5757
}
5858

5959
// String implements the Stringer interface

‎types/recipe/create.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type Create struct {
3535
//
3636
// NOTE:
3737
// This is only applicable for kind: CustomResourceDefinition
38-
IgnoreDiscovery bool
38+
IgnoreDiscovery bool `json:"ignoreDiscovery"`
3939
}
4040

4141
// String implements the Stringer interface

‎types/recipe/schema.go

+3
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,16 @@ var SupportedAbsolutePaths = []string{
5050
"spec.tasks.[*].name",
5151
"spec.tasks.[*].failFast.when",
5252
"spec.tasks.[*].ignoreError",
53+
"spec.tasks.[*].create.ignoreDiscovery",
5354
"spec.tasks.[*].create.replicas",
5455
"spec.tasks.[*].assert.stateCheck.stateCheckOperator",
5556
"spec.tasks.[*].assert.stateCheck.count",
5657
"spec.tasks.[*].assert.pathCheck.path",
5758
"spec.tasks.[*].assert.pathCheck.pathCheckOperator",
5859
"spec.tasks.[*].assert.pathCheck.value",
5960
"spec.tasks.[*].assert.pathCheck.dataType",
61+
"spec.tasks.[*].apply.ignoreDiscovery",
62+
"spec.tasks.[*].apply.replicas",
6063
}
6164

6265
// UserAllowedPathPrefixes represent the nested field paths

0 commit comments

Comments
 (0)