From defdae49af57efff66b160a431b9d822084a8601 Mon Sep 17 00:00:00 2001 From: Tamal Saha Date: Thu, 26 Oct 2023 16:31:06 -0700 Subject: [PATCH] Update nginx ingress schema Signed-off-by: Tamal Saha --- .../installer/v1alpha1/ace_options_helpers.go | 4 --- .../installer/v1alpha1/ingress_nginx_types.go | 12 +++++++ .../v1alpha1/zz_generated.deepcopy.go | 32 +++++++++++++++++++ charts/ace/values.openapiv3_schema.yaml | 18 +++++++++++ .../values.openapiv3_schema.yaml | 18 +++++++++++ 5 files changed, 80 insertions(+), 4 deletions(-) diff --git a/apis/installer/v1alpha1/ace_options_helpers.go b/apis/installer/v1alpha1/ace_options_helpers.go index 5fef110aa..5f0cdd861 100644 --- a/apis/installer/v1alpha1/ace_options_helpers.go +++ b/apis/installer/v1alpha1/ace_options_helpers.go @@ -18,10 +18,6 @@ package v1alpha1 import "strings" -func (r RegistrySpec) Configured() bool { - return r.RegistryFQDN != "" -} - func (r RegistrySpec) DockerHubProxy() string { addr := r.Proxies.DockerHub if addr == "" { diff --git a/apis/installer/v1alpha1/ingress_nginx_types.go b/apis/installer/v1alpha1/ingress_nginx_types.go index 753619651..d2f25be6e 100644 --- a/apis/installer/v1alpha1/ingress_nginx_types.go +++ b/apis/installer/v1alpha1/ingress_nginx_types.go @@ -47,6 +47,18 @@ type IngressNginxSpec struct { Controller IngressNginxController `json:"controller"` // +optional TCP map[string]string `json:"tcp,omitempty"` + // +optional + DefaultBackend IngressNginxDefaultBackend `json:"defaultBackend"` +} + +type IngressNginxDefaultBackend struct { + Enabled bool `json:"enabled"` + Name string `json:"name"` + Image IngressNginxDefaultBackendImage `json:"image"` +} + +type IngressNginxDefaultBackendImage struct { + Registry string `json:"registry"` } type IngressNginxController struct { diff --git a/apis/installer/v1alpha1/zz_generated.deepcopy.go b/apis/installer/v1alpha1/zz_generated.deepcopy.go index f7d59d10a..2232de782 100644 --- a/apis/installer/v1alpha1/zz_generated.deepcopy.go +++ b/apis/installer/v1alpha1/zz_generated.deepcopy.go @@ -3372,6 +3372,37 @@ func (in *IngressNginxControllerServiceExternal) DeepCopy() *IngressNginxControl return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressNginxDefaultBackend) DeepCopyInto(out *IngressNginxDefaultBackend) { + *out = *in + out.Image = in.Image +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressNginxDefaultBackend. +func (in *IngressNginxDefaultBackend) DeepCopy() *IngressNginxDefaultBackend { + if in == nil { + return nil + } + out := new(IngressNginxDefaultBackend) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *IngressNginxDefaultBackendImage) DeepCopyInto(out *IngressNginxDefaultBackendImage) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressNginxDefaultBackendImage. +func (in *IngressNginxDefaultBackendImage) DeepCopy() *IngressNginxDefaultBackendImage { + if in == nil { + return nil + } + out := new(IngressNginxDefaultBackendImage) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *IngressNginxList) DeepCopyInto(out *IngressNginxList) { *out = *in @@ -3415,6 +3446,7 @@ func (in *IngressNginxSpec) DeepCopyInto(out *IngressNginxSpec) { (*out)[key] = val } } + out.DefaultBackend = in.DefaultBackend } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressNginxSpec. diff --git a/charts/ace/values.openapiv3_schema.yaml b/charts/ace/values.openapiv3_schema.yaml index 2a54a9468..118f2862a 100644 --- a/charts/ace/values.openapiv3_schema.yaml +++ b/charts/ace/values.openapiv3_schema.yaml @@ -5219,6 +5219,24 @@ properties: - ingressClassResource - networkPolicy type: object + defaultBackend: + properties: + enabled: + type: boolean + image: + properties: + registry: + type: string + required: + - registry + type: object + name: + type: string + required: + - enabled + - image + - name + type: object enabled: type: boolean tcp: diff --git a/schema/ingress-nginx/values.openapiv3_schema.yaml b/schema/ingress-nginx/values.openapiv3_schema.yaml index 6691dbbab..7e103031a 100644 --- a/schema/ingress-nginx/values.openapiv3_schema.yaml +++ b/schema/ingress-nginx/values.openapiv3_schema.yaml @@ -146,6 +146,24 @@ properties: - ingressClassResource - networkPolicy type: object + defaultBackend: + properties: + enabled: + type: boolean + image: + properties: + registry: + type: string + required: + - registry + type: object + name: + type: string + required: + - enabled + - image + - name + type: object tcp: additionalProperties: type: string