Skip to content

Commit

Permalink
fix(crd): temp fix 34s timeout bug for k8s 1.20+ (argoproj#6350)
Browse files Browse the repository at this point in the history
Signed-off-by: Tianchu Zhao <evantczhao@gmail.com>
Signed-off-by: uturunku1 <luces.huayhuaca@gmail.com>
  • Loading branch information
tczhao authored and uturunku1 committed Jul 22, 2021
1 parent 83786d4 commit 4027f24
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 1 deletion.
2 changes: 1 addition & 1 deletion hack/crds.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func removeCRDValidation(filename string) {
properties := version["schema"].(obj)["openAPIV3Schema"].(obj)["properties"].(obj)
for k := range properties {
if k == "spec" || k == "status" {
properties[k] = obj{"type": "object", "x-kubernetes-preserve-unknown-fields": true}
properties[k] = obj{"type": "object", "x-kubernetes-preserve-unknown-fields": true, "x-kubernetes-map-type": "atomic"}
}
}
data, err = yaml.Marshal(crd)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down
2 changes: 2 additions & 0 deletions manifests/base/crds/minimal/argoproj.io_cronworkflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,11 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down
2 changes: 2 additions & 0 deletions manifests/base/crds/minimal/argoproj.io_workflows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down
2 changes: 2 additions & 0 deletions manifests/base/crds/minimal/argoproj.io_workflowtasksets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down
7 changes: 7 additions & 0 deletions manifests/install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -63,9 +64,11 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -101,6 +104,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -146,9 +150,11 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -185,6 +191,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down
7 changes: 7 additions & 0 deletions manifests/namespace-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -63,9 +64,11 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -101,6 +104,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -146,9 +150,11 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -185,6 +191,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down
7 changes: 7 additions & 0 deletions manifests/quick-start-minimal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -63,9 +64,11 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -101,6 +104,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -146,9 +150,11 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -185,6 +191,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down
7 changes: 7 additions & 0 deletions manifests/quick-start-mysql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -63,9 +64,11 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -101,6 +104,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -146,9 +150,11 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -185,6 +191,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down
7 changes: 7 additions & 0 deletions manifests/quick-start-postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -63,9 +64,11 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -101,6 +104,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -146,9 +150,11 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
status:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down Expand Up @@ -185,6 +191,7 @@ spec:
type: object
spec:
type: object
x-kubernetes-map-type: atomic
x-kubernetes-preserve-unknown-fields: true
required:
- metadata
Expand Down

0 comments on commit 4027f24

Please sign in to comment.