From 2d71cce5fd8e3e6237795b5a7d727d19979714a2 Mon Sep 17 00:00:00 2001 From: Hiroto Funakoshi Date: Tue, 7 Nov 2023 15:03:25 +0900 Subject: [PATCH] Fix invalid networkPolicy schema (#2230) * fix: invalid schema type of networkPolicy Signed-off-by: hlts2 * fix schema update and format Signed-off-by: hlts2 --------- Signed-off-by: hlts2 --- charts/vald-helm-operator/crds/valdrelease.yaml | 12 ++++++++---- charts/vald/values.schema.json | 10 ++++++---- charts/vald/values.yaml | 8 ++++---- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/charts/vald-helm-operator/crds/valdrelease.yaml b/charts/vald-helm-operator/crds/valdrelease.yaml index 3854881577..6a62e051bf 100644 --- a/charts/vald-helm-operator/crds/valdrelease.yaml +++ b/charts/vald-helm-operator/crds/valdrelease.yaml @@ -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: diff --git a/charts/vald/values.schema.json b/charts/vald/values.schema.json index 6634a1f68e..c6b2c9d5f0 100644 --- a/charts/vald/values.schema.json +++ b/charts/vald/values.schema.json @@ -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" } } } }, diff --git a/charts/vald/values.yaml b/charts/vald/values.yaml index 6d302054fc..f83a0a96e8 100644 --- a/charts/vald/values.yaml +++ b/charts/vald/values.yaml @@ -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"}