Skip to content

Commit

Permalink
Fix invalid networkPolicy schema (#2230)
Browse files Browse the repository at this point in the history
* fix: invalid schema type of networkPolicy

Signed-off-by: hlts2 <[email protected]>

* fix schema update and format

Signed-off-by: hlts2 <[email protected]>

---------

Signed-off-by: hlts2 <[email protected]>
  • Loading branch information
hlts2 authored Nov 7, 2023
1 parent 248a82a commit 2d71cce
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
12 changes: 8 additions & 4 deletions charts/vald-helm-operator/crds/valdrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2032,11 +2032,15 @@ spec:
type: object
properties:
egress:
type: object
x-kubernetes-preserve-unknown-fields: true
type: array
items:
type: object
x-kubernetes-preserve-unknown-fields: true
ingress:
type: object
x-kubernetes-preserve-unknown-fields: true
type: array
items:
type: object
x-kubernetes-preserve-unknown-fields: true
enabled:
type: boolean
observability:
Expand Down
10 changes: 6 additions & 4 deletions charts/vald/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3288,12 +3288,14 @@
"description": "custom network policies that a user can add",
"properties": {
"egress": {
"type": "object",
"description": "custom egress network policies that a user can add"
"type": "array",
"description": "custom egress network policies that a user can add",
"items": { "type": "object" }
},
"ingress": {
"type": "object",
"description": "custom ingress network policies that a user can add"
"type": "array",
"description": "custom ingress network policies that a user can add",
"items": { "type": "object" }
}
}
},
Expand Down
8 changes: 4 additions & 4 deletions charts/vald/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -838,12 +838,12 @@ defaults:
# @schema {"name": "defaults.networkPolicy.custom", "type": "object"}
# defaults.networkPolicy.custom -- custom network policies that a user can add
custom:
# @schema {"name": "defaults.networkPolicy.custom.ingress", "type": "object"}
# @schema {"name": "defaults.networkPolicy.custom.ingress", "type": "array", "items": {"type": "object"}}
# defaults.networkPolicy.custom.ingress -- custom ingress network policies that a user can add
ingress: {}
# @schema {"name": "defaults.networkPolicy.custom.egress", "type": "object"}
ingress: []
# @schema {"name": "defaults.networkPolicy.custom.egress", "type": "array", "items": {"type": "object"}}
# defaults.networkPolicy.custom.egress -- custom egress network policies that a user can add
egress: {}
egress: []
# @schema {"name": "gateway", "type": "object"}
gateway:
# @schema {"name": "gateway.lb", "type": "object"}
Expand Down

0 comments on commit 2d71cce

Please sign in to comment.