Skip to content

Commit 3085705

Browse files
fix: make wait for jsonpath value optional (#1887) (#1888)
Signed-off-by: Charles-Edouard Brétéché <[email protected]> Co-authored-by: Charles-Edouard Brétéché <[email protected]>
1 parent b5504a5 commit 3085705

21 files changed

+160
-108
lines changed

.crds/chainsaw.kyverno.io_configurations.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,6 @@ spec:
715715
type: string
716716
required:
717717
- path
718-
- value
719718
type: object
720719
type: object
721720
format:
@@ -1668,7 +1667,6 @@ spec:
16681667
type: string
16691668
required:
16701669
- path
1671-
- value
16721670
type: object
16731671
type: object
16741672
format:

.crds/chainsaw.kyverno.io_steptemplates.yaml

-4
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,6 @@ spec:
731731
type: string
732732
required:
733733
- path
734-
- value
735734
type: object
736735
type: object
737736
format:
@@ -1442,7 +1441,6 @@ spec:
14421441
type: string
14431442
required:
14441443
- path
1445-
- value
14461444
type: object
14471445
type: object
14481446
format:
@@ -2153,7 +2151,6 @@ spec:
21532151
type: string
21542152
required:
21552153
- path
2156-
- value
21572154
type: object
21582155
type: object
21592156
format:
@@ -3555,7 +3552,6 @@ spec:
35553552
type: string
35563553
required:
35573554
- path
3558-
- value
35593555
type: object
35603556
type: object
35613557
format:

.crds/chainsaw.kyverno.io_tests.yaml

-6
Original file line numberDiff line numberDiff line change
@@ -732,7 +732,6 @@ spec:
732732
type: string
733733
required:
734734
- path
735-
- value
736735
type: object
737736
type: object
738737
format:
@@ -1587,7 +1586,6 @@ spec:
15871586
type: string
15881587
required:
15891588
- path
1590-
- value
15911589
type: object
15921590
type: object
15931591
format:
@@ -2316,7 +2314,6 @@ spec:
23162314
type: string
23172315
required:
23182316
- path
2319-
- value
23202317
type: object
23212318
type: object
23222319
format:
@@ -3080,7 +3077,6 @@ spec:
30803077
type: string
30813078
required:
30823079
- path
3083-
- value
30843080
type: object
30853081
type: object
30863082
format:
@@ -4548,7 +4544,6 @@ spec:
45484544
type: string
45494545
required:
45504546
- path
4551-
- value
45524547
type: object
45534548
type: object
45544549
format:
@@ -5408,7 +5403,6 @@ spec:
54085403
type: string
54095404
required:
54105405
- path
5411-
- value
54125406
type: object
54135407
type: object
54145408
format:

.schemas/json/configuration-chainsaw-v1alpha1.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -1458,8 +1458,7 @@
14581458
"null"
14591459
],
14601460
"required": [
1461-
"path",
1462-
"value"
1461+
"path"
14631462
],
14641463
"properties": {
14651464
"path": {
@@ -1468,7 +1467,10 @@
14681467
},
14691468
"value": {
14701469
"description": "Value defines the expected value to wait for, e.g., \"Running\".",
1471-
"type": "string"
1470+
"type": [
1471+
"string",
1472+
"null"
1473+
]
14721474
}
14731475
},
14741476
"additionalProperties": false

.schemas/json/configuration-chainsaw-v1alpha2.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -1586,8 +1586,7 @@
15861586
"null"
15871587
],
15881588
"required": [
1589-
"path",
1590-
"value"
1589+
"path"
15911590
],
15921591
"properties": {
15931592
"path": {
@@ -1596,7 +1595,10 @@
15961595
},
15971596
"value": {
15981597
"description": "Value defines the expected value to wait for, e.g., \"Running\".",
1599-
"type": "string"
1598+
"type": [
1599+
"string",
1600+
"null"
1601+
]
16001602
}
16011603
},
16021604
"additionalProperties": false

.schemas/json/steptemplate-chainsaw-v1alpha1.json

+20-12
Original file line numberDiff line numberDiff line change
@@ -1491,8 +1491,7 @@
14911491
"null"
14921492
],
14931493
"required": [
1494-
"path",
1495-
"value"
1494+
"path"
14961495
],
14971496
"properties": {
14981497
"path": {
@@ -1501,7 +1500,10 @@
15011500
},
15021501
"value": {
15031502
"description": "Value defines the expected value to wait for, e.g., \"Running\".",
1504-
"type": "string"
1503+
"type": [
1504+
"string",
1505+
"null"
1506+
]
15051507
}
15061508
},
15071509
"additionalProperties": false
@@ -2693,8 +2695,7 @@
26932695
"null"
26942696
],
26952697
"required": [
2696-
"path",
2697-
"value"
2698+
"path"
26982699
],
26992700
"properties": {
27002701
"path": {
@@ -2703,7 +2704,10 @@
27032704
},
27042705
"value": {
27052706
"description": "Value defines the expected value to wait for, e.g., \"Running\".",
2706-
"type": "string"
2707+
"type": [
2708+
"string",
2709+
"null"
2710+
]
27072711
}
27082712
},
27092713
"additionalProperties": false
@@ -3895,8 +3899,7 @@
38953899
"null"
38963900
],
38973901
"required": [
3898-
"path",
3899-
"value"
3902+
"path"
39003903
],
39013904
"properties": {
39023905
"path": {
@@ -3905,7 +3908,10 @@
39053908
},
39063909
"value": {
39073910
"description": "Value defines the expected value to wait for, e.g., \"Running\".",
3908-
"type": "string"
3911+
"type": [
3912+
"string",
3913+
"null"
3914+
]
39093915
}
39103916
},
39113917
"additionalProperties": false
@@ -7471,8 +7477,7 @@
74717477
"null"
74727478
],
74737479
"required": [
7474-
"path",
7475-
"value"
7480+
"path"
74767481
],
74777482
"properties": {
74787483
"path": {
@@ -7481,7 +7486,10 @@
74817486
},
74827487
"value": {
74837488
"description": "Value defines the expected value to wait for, e.g., \"Running\".",
7484-
"type": "string"
7489+
"type": [
7490+
"string",
7491+
"null"
7492+
]
74857493
}
74867494
},
74877495
"additionalProperties": false

.schemas/json/test-chainsaw-v1alpha1.json

+25-15
Original file line numberDiff line numberDiff line change
@@ -1491,8 +1491,7 @@
14911491
"null"
14921492
],
14931493
"required": [
1494-
"path",
1495-
"value"
1494+
"path"
14961495
],
14971496
"properties": {
14981497
"path": {
@@ -1501,7 +1500,10 @@
15011500
},
15021501
"value": {
15031502
"description": "Value defines the expected value to wait for, e.g., \"Running\".",
1504-
"type": "string"
1503+
"type": [
1504+
"string",
1505+
"null"
1506+
]
15051507
}
15061508
},
15071509
"additionalProperties": false
@@ -2921,8 +2923,7 @@
29212923
"null"
29222924
],
29232925
"required": [
2924-
"path",
2925-
"value"
2926+
"path"
29262927
],
29272928
"properties": {
29282929
"path": {
@@ -2931,7 +2932,10 @@
29312932
},
29322933
"value": {
29332934
"description": "Value defines the expected value to wait for, e.g., \"Running\".",
2934-
"type": "string"
2935+
"type": [
2936+
"string",
2937+
"null"
2938+
]
29352939
}
29362940
},
29372941
"additionalProperties": false
@@ -4123,8 +4127,7 @@
41234127
"null"
41244128
],
41254129
"required": [
4126-
"path",
4127-
"value"
4130+
"path"
41284131
],
41294132
"properties": {
41304133
"path": {
@@ -4133,7 +4136,10 @@
41334136
},
41344137
"value": {
41354138
"description": "Value defines the expected value to wait for, e.g., \"Running\".",
4136-
"type": "string"
4139+
"type": [
4140+
"string",
4141+
"null"
4142+
]
41374143
}
41384144
},
41394145
"additionalProperties": false
@@ -5382,8 +5388,7 @@
53825388
"null"
53835389
],
53845390
"required": [
5385-
"path",
5386-
"value"
5391+
"path"
53875392
],
53885393
"properties": {
53895394
"path": {
@@ -5392,7 +5397,10 @@
53925397
},
53935398
"value": {
53945399
"description": "Value defines the expected value to wait for, e.g., \"Running\".",
5395-
"type": "string"
5400+
"type": [
5401+
"string",
5402+
"null"
5403+
]
53965404
}
53975405
},
53985406
"additionalProperties": false
@@ -9034,8 +9042,7 @@
90349042
"null"
90359043
],
90369044
"required": [
9037-
"path",
9038-
"value"
9045+
"path"
90399046
],
90409047
"properties": {
90419048
"path": {
@@ -9044,7 +9051,10 @@
90449051
},
90459052
"value": {
90469053
"description": "Value defines the expected value to wait for, e.g., \"Running\".",
9047-
"type": "string"
9054+
"type": [
9055+
"string",
9056+
"null"
9057+
]
90489058
}
90499059
},
90509060
"additionalProperties": false

.schemas/json/test-chainsaw-v1alpha2.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -1593,8 +1593,7 @@
15931593
"null"
15941594
],
15951595
"required": [
1596-
"path",
1597-
"value"
1596+
"path"
15981597
],
15991598
"properties": {
16001599
"path": {
@@ -1603,7 +1602,10 @@
16031602
},
16041603
"value": {
16051604
"description": "Value defines the expected value to wait for, e.g., \"Running\".",
1606-
"type": "string"
1605+
"type": [
1606+
"string",
1607+
"null"
1608+
]
16071609
}
16081610
},
16091611
"additionalProperties": false

pkg/apis/v1alpha1/action.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -377,5 +377,6 @@ type WaitForJsonPath struct {
377377
Path Expression `json:"path"`
378378

379379
// Value defines the expected value to wait for, e.g., "Running".
380-
Value Expression `json:"value"`
380+
// +optional
381+
Value *Expression `json:"value,omitempty"`
381382
}

pkg/apis/v1alpha1/zz_generated.deepcopy.go

+6-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)