diff --git a/charts/vald-helm-operator/crds/valdrelease.yaml b/charts/vald-helm-operator/crds/valdrelease.yaml index 370c0faa55..dc8c68c6f2 100644 --- a/charts/vald-helm-operator/crds/valdrelease.yaml +++ b/charts/vald-helm-operator/crds/valdrelease.yaml @@ -2022,6 +2022,11 @@ spec: enum: - glg - zap + networkPolicy: + type: object + properties: + enabled: + type: boolean observability: type: object properties: @@ -4133,6 +4138,11 @@ spec: annotations: type: object x-kubernetes-preserve-unknown-fields: true + defaultBackend: + type: object + properties: + enabled: + type: boolean enabled: type: boolean host: @@ -5287,6 +5297,11 @@ spec: annotations: type: object x-kubernetes-preserve-unknown-fields: true + defaultBackend: + type: object + properties: + enabled: + type: boolean enabled: type: boolean host: diff --git a/charts/vald/templates/gateway/filter/ing.yaml b/charts/vald/templates/gateway/filter/ing.yaml index aac828d69b..b00cded218 100644 --- a/charts/vald/templates/gateway/filter/ing.yaml +++ b/charts/vald/templates/gateway/filter/ing.yaml @@ -31,10 +31,12 @@ metadata: app.kubernetes.io/component: gateway-filter name: {{ $gateway.name }}-ingress spec: + {{- if $gateway.ingress.defaultBackend.enabled }} defaultBackend: service: name: {{ $gateway.name }} {{- include "vald.ingressPort" (dict "Values" $gateway.ingress) | nindent 6 }} + {{- end }} rules: - host: {{ $gateway.ingress.host }} http: diff --git a/charts/vald/templates/gateway/lb/ing.yaml b/charts/vald/templates/gateway/lb/ing.yaml index 82dc991ea4..052d430d05 100644 --- a/charts/vald/templates/gateway/lb/ing.yaml +++ b/charts/vald/templates/gateway/lb/ing.yaml @@ -31,10 +31,12 @@ metadata: app.kubernetes.io/component: gateway-lb name: {{ $gateway.name }}-ingress spec: + {{- if $gateway.ingress.defaultBackend.enabled }} defaultBackend: service: name: {{ $gateway.name }} {{- include "vald.ingressPort" (dict "Values" $gateway.ingress) | nindent 6 }} + {{- end }} rules: - host: {{ $gateway.ingress.host }} http: diff --git a/charts/vald/values.schema.json b/charts/vald/values.schema.json index 7629ca858b..98e17dccff 100644 --- a/charts/vald/values.schema.json +++ b/charts/vald/values.schema.json @@ -3275,6 +3275,15 @@ } } }, + "networkPolicy": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "if network policy enabled TODO: Change this to true after implementing user custom network policy parser" + } + } + }, "observability": { "type": "object", "properties": { @@ -6829,6 +6838,16 @@ "type": "object", "description": "annotations for ingress" }, + "defaultBackend": { + "type": "object", + "description": "defaultBackend config", + "properties": { + "enabled": { + "type": "boolean", + "description": "gateway ingress defaultBackend enabled" + } + } + }, "enabled": { "type": "boolean", "description": "gateway ingress enabled" @@ -8767,6 +8786,16 @@ "type": "object", "description": "annotations for ingress" }, + "defaultBackend": { + "type": "object", + "description": "defaultBackend config", + "properties": { + "enabled": { + "type": "boolean", + "description": "gateway ingress defaultBackend enabled" + } + } + }, "enabled": { "type": "boolean", "description": "gateway ingress enabled" diff --git a/charts/vald/values.yaml b/charts/vald/values.yaml index fcdd68b327..4fd6742e1e 100644 --- a/charts/vald/values.yaml +++ b/charts/vald/values.yaml @@ -1076,6 +1076,12 @@ gateway: # @schema {"name": "gateway.lb.ingress.servicePort", "type": "string"} # gateway.lb.ingress.servicePort -- service port to be exposed by ingress servicePort: grpc + # @schema {"name": "gateway.lb.ingress.defaultBackend", "type": "object"} + # gateway.lb.ingress.defaultBackend -- defaultBackend config + defaultBackend: + # @schema {"name": "gateway.lb.ingress.defaultBackend.enabled", "type": "boolean"} + # gateway.lb.ingress.defaultBackend.enabled -- gateway ingress defaultBackend enabled + enabled: true # @schema {"name": "gateway.lb.resources", "type": "object", "anchor": "resources"} # gateway.lb.resources -- compute resources resources: @@ -1344,6 +1350,12 @@ gateway: # @schema {"name": "gateway.filter.ingress.servicePort", "type": "string"} # gateway.filter.ingress.servicePort -- service port to be exposed by ingress servicePort: grpc + # @schema {"name": "gateway.filter.ingress.defaultBackend", "type": "object"} + # gateway.filter.ingress.defaultBackend -- defaultBackend config + defaultBackend: + # @schema {"name": "gateway.filter.ingress.defaultBackend.enabled", "type": "boolean"} + # gateway.filter.ingress.defaultBackend.enabled -- gateway ingress defaultBackend enabled + enabled: true # @schema {"name": "gateway.filter.resources", "type": "object", "anchor": "resources"} # gateway.filter.resources -- compute resources resources: