diff --git a/api/gateway/v1alpha1/gatewayconfig_types.go b/api/gateway/v1alpha1/gatewayconfig_types.go index 6c30be84..02a46e30 100644 --- a/api/gateway/v1alpha1/gatewayconfig_types.go +++ b/api/gateway/v1alpha1/gatewayconfig_types.go @@ -21,6 +21,7 @@ import ( core "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" kmapi "kmodules.xyz/client-go/api/v1" + "kmodules.xyz/resource-metadata/apis/shared" uiapi "kmodules.xyz/resource-metadata/apis/ui/v1alpha1" dnsapi "kubeops.dev/external-dns-operator/apis/external/v1alpha1" voyagerinstaller "voyagermesh.dev/installer/apis/installer/v1alpha1" @@ -29,7 +30,8 @@ import ( // GatewayConfigSpec defines the desired state of GatewayConfig. type GatewayConfigSpec struct { GatewaySpec `json:",inline"` - Envoy EnvoySpec `json:"envoy"` + Envoy EnvoySpec `json:"envoy"` + Global GlobalValues `json:"global"` // Chart specifies the chart information that will be used by the FluxCD to install the respective feature // +optional Chart uiapi.ChartInfo `json:"chart,omitempty"` @@ -47,9 +49,14 @@ type GatewaySpec struct { type GatewayValues struct { GatewaySpec `json:",inline"` - Envoy EnvoyValues `json:"envoy"` + Envoy EnvoyValues `json:"envoy"` + Global GlobalValues `json:"global"` } +type GlobalValues struct { + // +optional + Distro shared.DistroSpec `json:"distro"` +} type GatewayParameter struct { GatewayClassName string `json:"-"` ServiceType egv1a1.ServiceType `json:"-"` diff --git a/api/gateway/v1alpha1/zz_generated.deepcopy.go b/api/gateway/v1alpha1/zz_generated.deepcopy.go index b9244a28..90a1c6cf 100644 --- a/api/gateway/v1alpha1/zz_generated.deepcopy.go +++ b/api/gateway/v1alpha1/zz_generated.deepcopy.go @@ -299,6 +299,7 @@ func (in *GatewayConfigSpec) DeepCopyInto(out *GatewayConfigSpec) { *out = *in in.GatewaySpec.DeepCopyInto(&out.GatewaySpec) in.Envoy.DeepCopyInto(&out.Envoy) + out.Global = in.Global in.Chart.DeepCopyInto(&out.Chart) } @@ -478,6 +479,7 @@ func (in *GatewayValues) DeepCopyInto(out *GatewayValues) { *out = *in in.GatewaySpec.DeepCopyInto(&out.GatewaySpec) in.Envoy.DeepCopyInto(&out.Envoy) + out.Global = in.Global } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GatewayValues. @@ -490,6 +492,22 @@ func (in *GatewayValues) DeepCopy() *GatewayValues { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalValues) DeepCopyInto(out *GlobalValues) { + *out = *in + out.Distro = in.Distro +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalValues. +func (in *GlobalValues) DeepCopy() *GlobalValues { + if in == nil { + return nil + } + out := new(GlobalValues) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *HostInfo) DeepCopyInto(out *HostInfo) { *out = *in diff --git a/crds/gateway.catalog.appscode.com_gatewayconfigs.yaml b/crds/gateway.catalog.appscode.com_gatewayconfigs.yaml index e3ce4374..dbba12b4 100644 --- a/crds/gateway.catalog.appscode.com_gatewayconfigs.yaml +++ b/crds/gateway.catalog.appscode.com_gatewayconfigs.yaml @@ -9325,6 +9325,23 @@ spec: required: - enabled type: object + global: + properties: + distro: + properties: + openshift: + type: boolean + ubi: + enum: + - all + - catalog + - operator + type: string + required: + - openshift + - ubi + type: object + type: object infra: properties: dns: @@ -9496,6 +9513,7 @@ spec: - envoy - gateway - gateway-dns + - global - infra type: object type: object