From df38e820d3856ee53cab92cc7e4f12a73694aec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Ma=C5=82ek?= Date: Fri, 24 Apr 2026 17:12:57 +0200 Subject: [PATCH] feat(crd-from-oas): rename KonnectEventControlPlane to KonnectEventGateway --- .mise.toml | 3 +- api/konnect/v1alpha1/konnect_conditions.go | 4 +- api/konnect/v1alpha1/zz_generated.deepcopy.go | 148 ++++++------ ...z_generated_konnect_eventgateway_funcs.go} | 28 +-- ..._generated_konnect_eventgateway_sdkops.go} | 12 +- ...rated_konnect_eventgateway_sdkops_test.go} | 8 +- ...z_generated_konnect_eventgateway_types.go} | 30 +-- .../charts/ko-crds/templates/ko-crds.yaml | 217 +++++++++++++++++ .../ci/__snapshots__/affinity-values.snap | 223 +++++++++++++++++- .../cert-manager-enabled-everywhere.snap | 223 +++++++++++++++++- .../controlplane-config-dump.snap | 223 +++++++++++++++++- .../disable-gateway-controller-values.snap | 223 +++++++++++++++++- .../ci/__snapshots__/env-and-args-values.snap | 223 +++++++++++++++++- .../env-and-customenv-values.snap | 223 +++++++++++++++++- .../ci/__snapshots__/extra-labels-values.snap | 223 +++++++++++++++++- ...-pull-secrets-and-image-digest-values.snap | 223 +++++++++++++++++- .../nightly-can-be-used-values.snap | 223 +++++++++++++++++- .../__snapshots__/pod-annotations-values.snap | 223 +++++++++++++++++- .../__snapshots__/probes-and-args-values.snap | 223 +++++++++++++++++- .../ci/__snapshots__/tolerations-values.snap | 223 +++++++++++++++++- ...ing-policies-dataplane-ports-disabled.snap | 223 +++++++++++++++++- .../webhook-conversion-disabled-values.snap | 223 +++++++++++++++++- ...bhook-conversion-enabled-cert-manager.snap | 223 +++++++++++++++++- ...dating-and-conversion-disabled-values.snap | 223 +++++++++++++++++- .../kong-operator/templates/cluster-role.yaml | 14 +- ...nnect.konghq.com_konnecteventgateways.yaml | 214 +++++++++++++++++ config/crd/kong-operator/kustomization.yaml | 1 + config/rbac/role/role.yaml | 14 +- ...olplane.yaml => konnect_eventgateway.yaml} | 2 +- .../eventgateway/dataplane/controller.go | 4 +- .../eventgateway/dataplane/controller_test.go | 16 +- .../dataplane/owned_deployment.go | 10 +- .../dataplane/owned_deployment_test.go | 16 +- .../dataplane/owned_konnect_cert.go | 4 +- .../dataplane/owned_konnect_cert_test.go | 6 +- .../eventgateway/dataplane/resolve_konnect.go | 6 +- .../dataplane/resolve_konnect_test.go | 8 +- controller/eventgateway/dataplane/watch.go | 2 +- .../eventgateway/dataplane/watch_test.go | 2 +- controller/konnect/constraints/constraints.go | 2 +- controller/konnect/ops/ops.go | 16 +- .../ops/ops_konnecteventcontrolplane_test.go | 34 +-- .../ops/sdk/zz_generated_sdkfactory.go | 12 +- .../konnect/ops/zz_generated_ops_create.go | 4 +- .../konnect/ops/zz_generated_ops_delete.go | 4 +- .../konnect/ops/zz_generated_ops_getforuid.go | 4 +- ...d_ops_konnect_eventdataplanecertificate.go | 6 +- ... zz_generated_ops_konnect_eventgateway.go} | 18 +- .../konnect/ops/zz_generated_ops_update.go | 4 +- .../konnect/reconciler_eventgatewayref.go | 26 +- .../konnect/reconciler_konnectapiauth_test.go | 14 +- .../reconciler_konnectapiauth_watch.go | 4 +- .../reconciler_konnectapiauth_watch_test.go | 4 +- controller/konnect/watch_test.go | 2 +- ...reconciler_generic_rbac_konnectv1alpha1.go | 6 +- controller/konnect/zz_generated_watch.go | 4 +- ...watch_konnect_eventdataplanecertificate.go | 10 +- ...z_generated_watch_konnect_eventgateway.go} | 16 +- crd-from-oas/README.md | 2 +- crd-from-oas/config.yaml | 4 +- crd-from-oas/pkg/config/config_test.go | 8 +- crd-from-oas/pkg/generator/generator.go | 2 +- crd-from-oas/pkg/generator/generator_test.go | 52 ++-- crd-from-oas/pkg/generator/reconciler.go | 32 ++- crd-from-oas/pkg/generator/sdkfactory.go | 2 +- crd-from-oas/pkg/run/run_test.go | 8 +- docs/all-api-reference.md | 108 ++++----- docs/konnect-api-reference.md | 108 ++++----- .../zz_generated_konnect_eventcontrolplane.go | 37 --- ...enerated_konnect_eventcontrolplane_test.go | 92 -------- ...rated_konnect_eventdataplanecertificate.go | 10 +- ..._konnect_eventdataplanecertificate_test.go | 86 ------- .../zz_generated_konnect_eventgateway.go | 37 +++ .../zz_generated_konnect_controller_setup.go | 2 +- .../zz_generated_konnect_index_options.go | 2 +- .../konnecteventcontrolplane_test.go | 12 +- test/envtest/keg_dataplane_controller_test.go | 28 +-- test/envtest/update_status.go | 4 +- .../sdkmocks/zz_generated_sdkfactory_mock.go | 14 +- 79 files changed, 4469 insertions(+), 708 deletions(-) rename api/konnect/v1alpha1/{zz_generated_konnect_eventcontrolplane_funcs.go => zz_generated_konnect_eventgateway_funcs.go} (56%) rename api/konnect/v1alpha1/{zz_generated_konnect_eventcontrolplane_sdkops.go => zz_generated_konnect_eventgateway_sdkops.go} (69%) rename api/konnect/v1alpha1/{zz_generated_konnect_eventcontrolplane_sdkops_test.go => zz_generated_konnect_eventgateway_sdkops_test.go} (86%) rename api/konnect/v1alpha1/{zz_generated_konnect_eventcontrolplane_types.go => zz_generated_konnect_eventgateway_types.go} (76%) create mode 100644 config/crd/kong-operator/konnect.konghq.com_konnecteventgateways.yaml rename config/samples/{konnect_eventcontrolplane.yaml => konnect_eventgateway.yaml} (95%) rename controller/konnect/ops/{zz_generated_ops_konnect_eventcontrolplane.go => zz_generated_ops_konnect_eventgateway.go} (87%) rename controller/konnect/{zz_generated_watch_konnect_eventcontrolplane.go => zz_generated_watch_konnect_eventgateway.go} (70%) delete mode 100644 internal/utils/index/zz_generated_konnect_eventcontrolplane.go delete mode 100644 internal/utils/index/zz_generated_konnect_eventcontrolplane_test.go delete mode 100644 internal/utils/index/zz_generated_konnect_eventdataplanecertificate_test.go create mode 100644 internal/utils/index/zz_generated_konnect_eventgateway.go diff --git a/.mise.toml b/.mise.toml index f5862dcce9..85c77b71f8 100644 --- a/.mise.toml +++ b/.mise.toml @@ -93,7 +93,8 @@ rm -rf \ ./api/konnect/zz_generated_* \ ./config/crd/kong-operator/x-konnect.konghq.com_* \ ./controller/konnect/zz_generated_reconciler_generic_rbac_* \ - ./modules/manager/zz_generated_* + ./modules/manager/zz_generated_* \ + ./internal/utils/index/zz_generated_konnect_* ''' [tasks.generate-api] diff --git a/api/konnect/v1alpha1/konnect_conditions.go b/api/konnect/v1alpha1/konnect_conditions.go index 862e2eebfb..039f0b17da 100644 --- a/api/konnect/v1alpha1/konnect_conditions.go +++ b/api/konnect/v1alpha1/konnect_conditions.go @@ -97,7 +97,7 @@ const ( const ( // EventGatewayRefValidConditionType is the type of the condition that indicates // whether the Event Gateway reference is valid and points to an existing - // KonnectEventControlPlane. + // KonnectEventGateway. EventGatewayRefValidConditionType = "EventGatewayRefValid" // EventGatewayRefReasonValid is the reason used with the EventGatewayRefValid @@ -119,7 +119,7 @@ const ( const ( // PortalRefValidConditionType is the type of the condition that indicates // whether the Event Gateway reference is valid and points to an existing - // KonnectEventControlPlane. + // KonnectEventGateway. PortalRefValidConditionType = "PortalRefValid" // PortalRefReasonValid is the reason used with the PortalRefValid diff --git a/api/konnect/v1alpha1/zz_generated.deepcopy.go b/api/konnect/v1alpha1/zz_generated.deepcopy.go index e78cb7cf33..614c199890 100644 --- a/api/konnect/v1alpha1/zz_generated.deepcopy.go +++ b/api/konnect/v1alpha1/zz_generated.deepcopy.go @@ -984,7 +984,7 @@ func (in *KonnectEntityRef) DeepCopy() *KonnectEntityRef { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KonnectEventControlPlane) DeepCopyInto(out *KonnectEventControlPlane) { +func (in *KonnectEventDataPlaneCertificate) DeepCopyInto(out *KonnectEventDataPlaneCertificate) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) @@ -992,18 +992,18 @@ func (in *KonnectEventControlPlane) DeepCopyInto(out *KonnectEventControlPlane) in.Status.DeepCopyInto(&out.Status) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KonnectEventControlPlane. -func (in *KonnectEventControlPlane) DeepCopy() *KonnectEventControlPlane { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KonnectEventDataPlaneCertificate. +func (in *KonnectEventDataPlaneCertificate) DeepCopy() *KonnectEventDataPlaneCertificate { if in == nil { return nil } - out := new(KonnectEventControlPlane) + out := new(KonnectEventDataPlaneCertificate) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KonnectEventControlPlane) DeepCopyObject() runtime.Object { +func (in *KonnectEventDataPlaneCertificate) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -1011,53 +1011,46 @@ func (in *KonnectEventControlPlane) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KonnectEventControlPlaneAPISpec) DeepCopyInto(out *KonnectEventControlPlaneAPISpec) { +func (in *KonnectEventDataPlaneCertificateAPISpec) DeepCopyInto(out *KonnectEventDataPlaneCertificateAPISpec) { *out = *in - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(Labels, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KonnectEventControlPlaneAPISpec. -func (in *KonnectEventControlPlaneAPISpec) DeepCopy() *KonnectEventControlPlaneAPISpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KonnectEventDataPlaneCertificateAPISpec. +func (in *KonnectEventDataPlaneCertificateAPISpec) DeepCopy() *KonnectEventDataPlaneCertificateAPISpec { if in == nil { return nil } - out := new(KonnectEventControlPlaneAPISpec) + out := new(KonnectEventDataPlaneCertificateAPISpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KonnectEventControlPlaneList) DeepCopyInto(out *KonnectEventControlPlaneList) { +func (in *KonnectEventDataPlaneCertificateList) DeepCopyInto(out *KonnectEventDataPlaneCertificateList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]KonnectEventControlPlane, len(*in)) + *out = make([]KonnectEventDataPlaneCertificate, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KonnectEventControlPlaneList. -func (in *KonnectEventControlPlaneList) DeepCopy() *KonnectEventControlPlaneList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KonnectEventDataPlaneCertificateList. +func (in *KonnectEventDataPlaneCertificateList) DeepCopy() *KonnectEventDataPlaneCertificateList { if in == nil { return nil } - out := new(KonnectEventControlPlaneList) + out := new(KonnectEventDataPlaneCertificateList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KonnectEventControlPlaneList) DeepCopyObject() runtime.Object { +func (in *KonnectEventDataPlaneCertificateList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -1065,24 +1058,34 @@ func (in *KonnectEventControlPlaneList) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KonnectEventControlPlaneSpec) DeepCopyInto(out *KonnectEventControlPlaneSpec) { +func (in *KonnectEventDataPlaneCertificateSpec) DeepCopyInto(out *KonnectEventDataPlaneCertificateSpec) { *out = *in - out.KonnectConfiguration = in.KonnectConfiguration - in.APISpec.DeepCopyInto(&out.APISpec) + in.GatewayRef.DeepCopyInto(&out.GatewayRef) + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(SensitiveDataSourceType) + **out = **in + } + out.APISpec = in.APISpec + if in.SecretRef != nil { + in, out := &in.SecretRef, &out.SecretRef + *out = new(commonv1alpha1.NamespacedRef) + (*in).DeepCopyInto(*out) + } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KonnectEventControlPlaneSpec. -func (in *KonnectEventControlPlaneSpec) DeepCopy() *KonnectEventControlPlaneSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KonnectEventDataPlaneCertificateSpec. +func (in *KonnectEventDataPlaneCertificateSpec) DeepCopy() *KonnectEventDataPlaneCertificateSpec { if in == nil { return nil } - out := new(KonnectEventControlPlaneSpec) + out := new(KonnectEventDataPlaneCertificateSpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KonnectEventControlPlaneStatus) DeepCopyInto(out *KonnectEventControlPlaneStatus) { +func (in *KonnectEventDataPlaneCertificateStatus) DeepCopyInto(out *KonnectEventDataPlaneCertificateStatus) { *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions @@ -1091,21 +1094,26 @@ func (in *KonnectEventControlPlaneStatus) DeepCopyInto(out *KonnectEventControlP (*in)[i].DeepCopyInto(&(*out)[i]) } } - out.KonnectEntityStatus = in.KonnectEntityStatus + in.KonnectEntityStatus.DeepCopyInto(&out.KonnectEntityStatus) + if in.GatewayID != nil { + in, out := &in.GatewayID, &out.GatewayID + *out = new(KonnectEntityRef) + **out = **in + } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KonnectEventControlPlaneStatus. -func (in *KonnectEventControlPlaneStatus) DeepCopy() *KonnectEventControlPlaneStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KonnectEventDataPlaneCertificateStatus. +func (in *KonnectEventDataPlaneCertificateStatus) DeepCopy() *KonnectEventDataPlaneCertificateStatus { if in == nil { return nil } - out := new(KonnectEventControlPlaneStatus) + out := new(KonnectEventDataPlaneCertificateStatus) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KonnectEventDataPlaneCertificate) DeepCopyInto(out *KonnectEventDataPlaneCertificate) { +func (in *KonnectEventGateway) DeepCopyInto(out *KonnectEventGateway) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) @@ -1113,18 +1121,18 @@ func (in *KonnectEventDataPlaneCertificate) DeepCopyInto(out *KonnectEventDataPl in.Status.DeepCopyInto(&out.Status) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KonnectEventDataPlaneCertificate. -func (in *KonnectEventDataPlaneCertificate) DeepCopy() *KonnectEventDataPlaneCertificate { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KonnectEventGateway. +func (in *KonnectEventGateway) DeepCopy() *KonnectEventGateway { if in == nil { return nil } - out := new(KonnectEventDataPlaneCertificate) + out := new(KonnectEventGateway) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KonnectEventDataPlaneCertificate) DeepCopyObject() runtime.Object { +func (in *KonnectEventGateway) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -1132,46 +1140,53 @@ func (in *KonnectEventDataPlaneCertificate) DeepCopyObject() runtime.Object { } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KonnectEventDataPlaneCertificateAPISpec) DeepCopyInto(out *KonnectEventDataPlaneCertificateAPISpec) { +func (in *KonnectEventGatewayAPISpec) DeepCopyInto(out *KonnectEventGatewayAPISpec) { *out = *in + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(Labels, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KonnectEventDataPlaneCertificateAPISpec. -func (in *KonnectEventDataPlaneCertificateAPISpec) DeepCopy() *KonnectEventDataPlaneCertificateAPISpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KonnectEventGatewayAPISpec. +func (in *KonnectEventGatewayAPISpec) DeepCopy() *KonnectEventGatewayAPISpec { if in == nil { return nil } - out := new(KonnectEventDataPlaneCertificateAPISpec) + out := new(KonnectEventGatewayAPISpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KonnectEventDataPlaneCertificateList) DeepCopyInto(out *KonnectEventDataPlaneCertificateList) { +func (in *KonnectEventGatewayList) DeepCopyInto(out *KonnectEventGatewayList) { *out = *in out.TypeMeta = in.TypeMeta in.ListMeta.DeepCopyInto(&out.ListMeta) if in.Items != nil { in, out := &in.Items, &out.Items - *out = make([]KonnectEventDataPlaneCertificate, len(*in)) + *out = make([]KonnectEventGateway, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KonnectEventDataPlaneCertificateList. -func (in *KonnectEventDataPlaneCertificateList) DeepCopy() *KonnectEventDataPlaneCertificateList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KonnectEventGatewayList. +func (in *KonnectEventGatewayList) DeepCopy() *KonnectEventGatewayList { if in == nil { return nil } - out := new(KonnectEventDataPlaneCertificateList) + out := new(KonnectEventGatewayList) in.DeepCopyInto(out) return out } // DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *KonnectEventDataPlaneCertificateList) DeepCopyObject() runtime.Object { +func (in *KonnectEventGatewayList) DeepCopyObject() runtime.Object { if c := in.DeepCopy(); c != nil { return c } @@ -1179,34 +1194,24 @@ func (in *KonnectEventDataPlaneCertificateList) DeepCopyObject() runtime.Object } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KonnectEventDataPlaneCertificateSpec) DeepCopyInto(out *KonnectEventDataPlaneCertificateSpec) { +func (in *KonnectEventGatewaySpec) DeepCopyInto(out *KonnectEventGatewaySpec) { *out = *in - in.GatewayRef.DeepCopyInto(&out.GatewayRef) - if in.Type != nil { - in, out := &in.Type, &out.Type - *out = new(SensitiveDataSourceType) - **out = **in - } - out.APISpec = in.APISpec - if in.SecretRef != nil { - in, out := &in.SecretRef, &out.SecretRef - *out = new(commonv1alpha1.NamespacedRef) - (*in).DeepCopyInto(*out) - } + out.KonnectConfiguration = in.KonnectConfiguration + in.APISpec.DeepCopyInto(&out.APISpec) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KonnectEventDataPlaneCertificateSpec. -func (in *KonnectEventDataPlaneCertificateSpec) DeepCopy() *KonnectEventDataPlaneCertificateSpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KonnectEventGatewaySpec. +func (in *KonnectEventGatewaySpec) DeepCopy() *KonnectEventGatewaySpec { if in == nil { return nil } - out := new(KonnectEventDataPlaneCertificateSpec) + out := new(KonnectEventGatewaySpec) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KonnectEventDataPlaneCertificateStatus) DeepCopyInto(out *KonnectEventDataPlaneCertificateStatus) { +func (in *KonnectEventGatewayStatus) DeepCopyInto(out *KonnectEventGatewayStatus) { *out = *in if in.Conditions != nil { in, out := &in.Conditions, &out.Conditions @@ -1215,20 +1220,15 @@ func (in *KonnectEventDataPlaneCertificateStatus) DeepCopyInto(out *KonnectEvent (*in)[i].DeepCopyInto(&(*out)[i]) } } - in.KonnectEntityStatus.DeepCopyInto(&out.KonnectEntityStatus) - if in.GatewayID != nil { - in, out := &in.GatewayID, &out.GatewayID - *out = new(KonnectEntityRef) - **out = **in - } + out.KonnectEntityStatus = in.KonnectEntityStatus } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KonnectEventDataPlaneCertificateStatus. -func (in *KonnectEventDataPlaneCertificateStatus) DeepCopy() *KonnectEventDataPlaneCertificateStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KonnectEventGatewayStatus. +func (in *KonnectEventGatewayStatus) DeepCopy() *KonnectEventGatewayStatus { if in == nil { return nil } - out := new(KonnectEventDataPlaneCertificateStatus) + out := new(KonnectEventGatewayStatus) in.DeepCopyInto(out) return out } diff --git a/api/konnect/v1alpha1/zz_generated_konnect_eventcontrolplane_funcs.go b/api/konnect/v1alpha1/zz_generated_konnect_eventgateway_funcs.go similarity index 56% rename from api/konnect/v1alpha1/zz_generated_konnect_eventcontrolplane_funcs.go rename to api/konnect/v1alpha1/zz_generated_konnect_eventgateway_funcs.go index 24a7cc0247..9f6df546f0 100644 --- a/api/konnect/v1alpha1/zz_generated_konnect_eventcontrolplane_funcs.go +++ b/api/konnect/v1alpha1/zz_generated_konnect_eventgateway_funcs.go @@ -7,7 +7,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) // GetKonnectLabels gets the Konnect labels from the object's API spec. -func (obj *KonnectEventControlPlane) GetKonnectLabels() map[string]string { +func (obj *KonnectEventGateway) GetKonnectLabels() map[string]string { if obj.Spec.APISpec.Labels == nil { return nil } @@ -21,7 +21,7 @@ func (obj *KonnectEventControlPlane) GetKonnectLabels() map[string]string { } // SetKonnectLabels sets the Konnect labels in the object's API spec. -func (obj *KonnectEventControlPlane) SetKonnectLabels(labels map[string]string) { +func (obj *KonnectEventGateway) SetKonnectLabels(labels map[string]string) { if labels == nil { obj.Spec.APISpec.Labels = nil return @@ -35,38 +35,38 @@ func (obj *KonnectEventControlPlane) SetKonnectLabels(labels map[string]string) obj.Spec.APISpec.Labels = converted } -// GetKonnectStatus returns the Konnect status contained in the KonnectEventControlPlane status. -func (obj *KonnectEventControlPlane) GetKonnectStatus() *konnectv1alpha2.KonnectEntityStatus { +// GetKonnectStatus returns the Konnect status contained in the KonnectEventGateway status. +func (obj *KonnectEventGateway) GetKonnectStatus() *konnectv1alpha2.KonnectEntityStatus { return &obj.Status.KonnectEntityStatus } -// SetKonnectID sets the Konnect ID in the KonnectEventControlPlane status. -func (obj *KonnectEventControlPlane) SetKonnectID(id string) { +// SetKonnectID sets the Konnect ID in the KonnectEventGateway status. +func (obj *KonnectEventGateway) SetKonnectID(id string) { obj.Status.ID = id } -// GetKonnectID returns the Konnect ID in the KonnectEventControlPlane status. -func (obj *KonnectEventControlPlane) GetKonnectID() string { +// GetKonnectID returns the Konnect ID in the KonnectEventGateway status. +func (obj *KonnectEventGateway) GetKonnectID() string { return obj.Status.ID } -// GetTypeName returns the KonnectEventControlPlane Kind name. -func (obj KonnectEventControlPlane) GetTypeName() string { - return "KonnectEventControlPlane" +// GetTypeName returns the KonnectEventGateway Kind name. +func (obj KonnectEventGateway) GetTypeName() string { + return "KonnectEventGateway" } // GetConditions returns the Status Conditions. -func (obj *KonnectEventControlPlane) GetConditions() []metav1.Condition { +func (obj *KonnectEventGateway) GetConditions() []metav1.Condition { return obj.Status.Conditions } // SetConditions sets the Status Conditions. -func (obj *KonnectEventControlPlane) SetConditions(conditions []metav1.Condition) { +func (obj *KonnectEventGateway) SetConditions(conditions []metav1.Condition) { obj.Status.Conditions = conditions } // GetKonnectAPIAuthConfigurationRef returns the Konnect API Auth Configuration Ref. -func (obj *KonnectEventControlPlane) GetKonnectAPIAuthConfigurationRef() konnectv1alpha2.ControlPlaneKonnectAPIAuthConfigurationRef { +func (obj *KonnectEventGateway) GetKonnectAPIAuthConfigurationRef() konnectv1alpha2.ControlPlaneKonnectAPIAuthConfigurationRef { return konnectv1alpha2.ControlPlaneKonnectAPIAuthConfigurationRef{ Name: obj.Spec.KonnectConfiguration.APIAuthConfigurationRef.Name, } diff --git a/api/konnect/v1alpha1/zz_generated_konnect_eventcontrolplane_sdkops.go b/api/konnect/v1alpha1/zz_generated_konnect_eventgateway_sdkops.go similarity index 69% rename from api/konnect/v1alpha1/zz_generated_konnect_eventcontrolplane_sdkops.go rename to api/konnect/v1alpha1/zz_generated_konnect_eventgateway_sdkops.go index 0203b7303c..3aa58f19a9 100644 --- a/api/konnect/v1alpha1/zz_generated_konnect_eventcontrolplane_sdkops.go +++ b/api/konnect/v1alpha1/zz_generated_konnect_eventgateway_sdkops.go @@ -9,19 +9,19 @@ import ( sdkkonnectcomp "github.com/Kong/sdk-konnect-go/models/components" ) -func (s *KonnectEventControlPlaneAPISpec) marshalSDKOpsPayload() ([]byte, error) { +func (s *KonnectEventGatewayAPISpec) marshalSDKOpsPayload() ([]byte, error) { data, err := json.Marshal(s) if err != nil { - return nil, fmt.Errorf("failed to marshal KonnectEventControlPlaneAPISpec: %w", err) + return nil, fmt.Errorf("failed to marshal KonnectEventGatewayAPISpec: %w", err) } return data, nil } -// ToCreateGatewayRequest converts the KonnectEventControlPlaneAPISpec to the SDK type +// ToCreateGatewayRequest converts the KonnectEventGatewayAPISpec to the SDK type // sdkkonnectcomp.CreateGatewayRequest using JSON marshal/unmarshal. // Fields that exist in the CRD spec but not in the SDK type (e.g., Kubernetes // object references) are naturally excluded because they have different JSON names. -func (s *KonnectEventControlPlaneAPISpec) ToCreateGatewayRequest() (*sdkkonnectcomp.CreateGatewayRequest, error) { +func (s *KonnectEventGatewayAPISpec) ToCreateGatewayRequest() (*sdkkonnectcomp.CreateGatewayRequest, error) { data, err := s.marshalSDKOpsPayload() if err != nil { return nil, err @@ -33,11 +33,11 @@ func (s *KonnectEventControlPlaneAPISpec) ToCreateGatewayRequest() (*sdkkonnectc return &target, nil } -// ToUpdateGatewayRequest converts the KonnectEventControlPlaneAPISpec to the SDK type +// ToUpdateGatewayRequest converts the KonnectEventGatewayAPISpec to the SDK type // sdkkonnectcomp.UpdateGatewayRequest using JSON marshal/unmarshal. // Fields that exist in the CRD spec but not in the SDK type (e.g., Kubernetes // object references) are naturally excluded because they have different JSON names. -func (s *KonnectEventControlPlaneAPISpec) ToUpdateGatewayRequest() (*sdkkonnectcomp.UpdateGatewayRequest, error) { +func (s *KonnectEventGatewayAPISpec) ToUpdateGatewayRequest() (*sdkkonnectcomp.UpdateGatewayRequest, error) { data, err := s.marshalSDKOpsPayload() if err != nil { return nil, err diff --git a/api/konnect/v1alpha1/zz_generated_konnect_eventcontrolplane_sdkops_test.go b/api/konnect/v1alpha1/zz_generated_konnect_eventgateway_sdkops_test.go similarity index 86% rename from api/konnect/v1alpha1/zz_generated_konnect_eventcontrolplane_sdkops_test.go rename to api/konnect/v1alpha1/zz_generated_konnect_eventgateway_sdkops_test.go index 167455c7f5..72873fd0c8 100644 --- a/api/konnect/v1alpha1/zz_generated_konnect_eventcontrolplane_sdkops_test.go +++ b/api/konnect/v1alpha1/zz_generated_konnect_eventgateway_sdkops_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/require" ) -func TestKonnectEventControlPlaneAPISpec_ToCreateGatewayRequest(t *testing.T) { - spec := &KonnectEventControlPlaneAPISpec{ +func TestKonnectEventGatewayAPISpec_ToCreateGatewayRequest(t *testing.T) { + spec := &KonnectEventGatewayAPISpec{ Description: GatewayDescription("test-value"), Labels: Labels{"test-key": "test-value"}, MinRuntimeVersion: MinRuntimeVersion("test-value"), @@ -32,8 +32,8 @@ func TestKonnectEventControlPlaneAPISpec_ToCreateGatewayRequest(t *testing.T) { require.Equal(t, "test-value", payload["name"]) } -func TestKonnectEventControlPlaneAPISpec_ToUpdateGatewayRequest(t *testing.T) { - spec := &KonnectEventControlPlaneAPISpec{ +func TestKonnectEventGatewayAPISpec_ToUpdateGatewayRequest(t *testing.T) { + spec := &KonnectEventGatewayAPISpec{ Description: GatewayDescription("test-value"), Labels: Labels{"test-key": "test-value"}, MinRuntimeVersion: MinRuntimeVersion("test-value"), diff --git a/api/konnect/v1alpha1/zz_generated_konnect_eventcontrolplane_types.go b/api/konnect/v1alpha1/zz_generated_konnect_eventgateway_types.go similarity index 76% rename from api/konnect/v1alpha1/zz_generated_konnect_eventcontrolplane_types.go rename to api/konnect/v1alpha1/zz_generated_konnect_eventgateway_types.go index d146ca5047..f08dd0b512 100644 --- a/api/konnect/v1alpha1/zz_generated_konnect_eventcontrolplane_types.go +++ b/api/konnect/v1alpha1/zz_generated_konnect_eventgateway_types.go @@ -7,7 +7,7 @@ import ( konnectv1alpha2 "github.com/kong/kong-operator/v2/api/konnect/v1alpha2" ) -// KonnectEventControlPlane is the Schema for the konnecteventcontrolplanes API. +// KonnectEventGateway is the Schema for the konnecteventgateways API. // // +kubebuilder:object:root=true // +kubebuilder:subresource:status @@ -19,28 +19,28 @@ import ( // +kubebuilder:storageversion // +apireference:kgo:include // +kong:channels=kong-operator -type KonnectEventControlPlane struct { +type KonnectEventGateway struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitzero"` // +optional - Spec KonnectEventControlPlaneSpec `json:"spec,omitzero"` + Spec KonnectEventGatewaySpec `json:"spec,omitzero"` // +optional - Status KonnectEventControlPlaneStatus `json:"status,omitzero"` + Status KonnectEventGatewayStatus `json:"status,omitzero"` } -// KonnectEventControlPlaneList contains a list of KonnectEventControlPlane. +// KonnectEventGatewayList contains a list of KonnectEventGateway. // // +kubebuilder:object:root=true -type KonnectEventControlPlaneList struct { +type KonnectEventGatewayList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitzero"` - Items []KonnectEventControlPlane `json:"items"` + Items []KonnectEventGateway `json:"items"` } -// KonnectEventControlPlaneSpec defines the desired state of KonnectEventControlPlane. -type KonnectEventControlPlaneSpec struct { +// KonnectEventGatewaySpec defines the desired state of KonnectEventGateway. +type KonnectEventGatewaySpec struct { // KonnectConfiguration is the Konnect configuration for this entity. // // +required @@ -49,11 +49,11 @@ type KonnectEventControlPlaneSpec struct { // APISpec defines the desired state of the resource's API spec fields. // // +optional - APISpec KonnectEventControlPlaneAPISpec `json:"apiSpec,omitzero"` + APISpec KonnectEventGatewayAPISpec `json:"apiSpec,omitzero"` } -// KonnectEventControlPlaneAPISpec defines the API spec fields for KonnectEventControlPlane. -type KonnectEventControlPlaneAPISpec struct { +// KonnectEventGatewayAPISpec defines the API spec fields for KonnectEventGateway. +type KonnectEventGatewayAPISpec struct { // A human-readable description of the Gateway. // // +optional @@ -91,8 +91,8 @@ type KonnectEventControlPlaneAPISpec struct { Name GatewayName `json:"name,omitempty"` } -// KonnectEventControlPlaneStatus defines the observed state of KonnectEventControlPlane. -type KonnectEventControlPlaneStatus struct { +// KonnectEventGatewayStatus defines the observed state of KonnectEventGateway. +type KonnectEventGatewayStatus struct { // Conditions represent the current state of the resource. // // +optional @@ -115,5 +115,5 @@ type KonnectEventControlPlaneStatus struct { } func init() { - SchemeBuilder.Register(&KonnectEventControlPlane{}, &KonnectEventControlPlaneList{}) + SchemeBuilder.Register(&KonnectEventGateway{}, &KonnectEventGatewayList{}) } diff --git a/charts/kong-operator/charts/ko-crds/templates/ko-crds.yaml b/charts/kong-operator/charts/ko-crds/templates/ko-crds.yaml index 0c18c9bc3f..dd76678060 100644 --- a/charts/kong-operator/charts/ko-crds/templates/ko-crds.yaml +++ b/charts/kong-operator/charts/ko-crds/templates/ko-crds.yaml @@ -69852,6 +69852,223 @@ spec: --- apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition +metadata: + annotations: +{{ if .Values.keep }} + helm.sh/resource-policy: keep +{{ end }} + kubernetes-configuration.konghq.com/channels: kong-operator + kubernetes-configuration.konghq.com/version: v2.1.0 + name: konnecteventgateways.konnect.konghq.com +spec: + group: konnect.konghq.com + names: + kind: KonnectEventGateway + listKind: KonnectEventGatewayList + plural: konnecteventgateways + singular: konnecteventgateway + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Konnect ID + jsonPath: .status.id + name: ID + type: string + - description: The Resource is Programmed on Konnect + jsonPath: .status.conditions[?(@.type=='Programmed')].status + name: Programmed + type: string + - description: Konnect Organization ID this resource belongs to. + jsonPath: .status.organizationID + name: OrgID + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: KonnectEventGateway is the Schema for the konnecteventgateways + API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: KonnectEventGatewaySpec defines the desired state of KonnectEventGateway. + properties: + apiSpec: + description: APISpec defines the desired state of the resource's API + spec fields. + properties: + description: + description: A human-readable description of the Gateway. + maxLength: 512 + type: string + labels: + additionalProperties: + description: LabelsValue is the value type for Labels. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$ + type: string + description: |- + Labels store metadata of an entity that can be used for filtering an entity + list or for searching across entity types. + + Keys must be of length 1-63 characters, and cannot start with "kong", + "konnect", "mesh", "kic", or "_". + type: object + min_runtime_version: + description: |- + The minimum runtime version supported by the API. + This is the lowest version of the data plane + release that can be used with the entity model. + When not specified, the minimum runtime version will be pinned to the latest + available release. + maxLength: 253 + pattern: ^\d+\.\d+$ + type: string + name: + description: The name of the Gateway. + maxLength: 255 + minLength: 1 + type: string + required: + - name + type: object + konnect: + description: KonnectConfiguration is the Konnect configuration for + this entity. + properties: + authRef: + description: |- + APIAuthConfigurationRef is the reference to the API Auth Configuration + that should be used for this Konnect Configuration. + properties: + name: + description: Name is the name of the KonnectAPIAuthConfiguration + resource. + minLength: 1 + type: string + required: + - name + type: object + required: + - authRef + type: object + required: + - konnect + type: object + status: + description: KonnectEventGatewayStatus defines the observed state of KonnectEventGateway. + properties: + conditions: + description: Conditions represent the current state of the resource. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 8 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: |- + ID is the unique identifier of the Konnect entity as assigned by Konnect API. + If it's unset (empty string), it means the Konnect entity hasn't been created yet. + maxLength: 256 + type: string + observedGeneration: + description: ObservedGeneration is the most recent generation observed + format: int64 + type: integer + organizationID: + description: OrgID is ID of Konnect Org that this entity has been + created in. + maxLength: 256 + type: string + serverURL: + description: ServerURL is the URL of the Konnect server in which the + entity exists. + maxLength: 512 + type: string + type: object + required: + - metadata + type: object + served: true + storage: true + subresources: + status: {} +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition metadata: annotations: {{ if .Values.keep }} diff --git a/charts/kong-operator/ci/__snapshots__/affinity-values.snap b/charts/kong-operator/ci/__snapshots__/affinity-values.snap index fa9c353538..9bb126093b 100644 --- a/charts/kong-operator/ci/__snapshots__/affinity-values.snap +++ b/charts/kong-operator/ci/__snapshots__/affinity-values.snap @@ -65756,6 +65756,215 @@ spec: # Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + kubernetes-configuration.konghq.com/channels: kong-operator + kubernetes-configuration.konghq.com/version: v2.1.0 + name: konnecteventgateways.konnect.konghq.com +spec: + group: konnect.konghq.com + names: + kind: KonnectEventGateway + listKind: KonnectEventGatewayList + plural: konnecteventgateways + singular: konnecteventgateway + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Konnect ID + jsonPath: .status.id + name: ID + type: string + - description: The Resource is Programmed on Konnect + jsonPath: .status.conditions[?(@.type=='Programmed')].status + name: Programmed + type: string + - description: Konnect Organization ID this resource belongs to. + jsonPath: .status.organizationID + name: OrgID + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: KonnectEventGateway is the Schema for the konnecteventgateways API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: KonnectEventGatewaySpec defines the desired state of KonnectEventGateway. + properties: + apiSpec: + description: APISpec defines the desired state of the resource's API spec fields. + properties: + description: + description: A human-readable description of the Gateway. + maxLength: 512 + type: string + labels: + additionalProperties: + description: LabelsValue is the value type for Labels. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$ + type: string + description: |- + Labels store metadata of an entity that can be used for filtering an entity + list or for searching across entity types. + + Keys must be of length 1-63 characters, and cannot start with "kong", + "konnect", "mesh", "kic", or "_". + type: object + min_runtime_version: + description: |- + The minimum runtime version supported by the API. + This is the lowest version of the data plane + release that can be used with the entity model. + When not specified, the minimum runtime version will be pinned to the latest + available release. + maxLength: 253 + pattern: ^\d+\.\d+$ + type: string + name: + description: The name of the Gateway. + maxLength: 255 + minLength: 1 + type: string + required: + - name + type: object + konnect: + description: KonnectConfiguration is the Konnect configuration for this entity. + properties: + authRef: + description: |- + APIAuthConfigurationRef is the reference to the API Auth Configuration + that should be used for this Konnect Configuration. + properties: + name: + description: Name is the name of the KonnectAPIAuthConfiguration resource. + minLength: 1 + type: string + required: + - name + type: object + required: + - authRef + type: object + required: + - konnect + type: object + status: + description: KonnectEventGatewayStatus defines the observed state of KonnectEventGateway. + properties: + conditions: + description: Conditions represent the current state of the resource. + items: + description: Condition contains details for one aspect of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 8 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: |- + ID is the unique identifier of the Konnect entity as assigned by Konnect API. + If it's unset (empty string), it means the Konnect entity hasn't been created yet. + maxLength: 256 + type: string + observedGeneration: + description: ObservedGeneration is the most recent generation observed + format: int64 + type: integer + organizationID: + description: OrgID is ID of Konnect Org that this entity has been created in. + maxLength: 256 + type: string + serverURL: + description: ServerURL is the URL of the Konnect server in which the entity exists. + maxLength: 512 + type: string + type: object + required: + - metadata + type: object + served: true + storage: true + subresources: + status: {} +--- +# Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition metadata: annotations: helm.sh/resource-policy: keep @@ -68837,8 +69046,8 @@ rules: - konnectcloudgatewaydataplanegroupconfigurations - konnectcloudgatewaynetworks - konnectcloudgatewaytransitgateways - - konnecteventcontrolplanes - konnecteventdataplanecertificates + - konnecteventgateways - portalpages - portals - portalteams @@ -68861,10 +69070,10 @@ rules: - konnectcloudgatewaynetworks/status - konnectcloudgatewaytransitgateways/finalizers - konnectcloudgatewaytransitgateways/status - - konnecteventcontrolplanes/finalizers - - konnecteventcontrolplanes/status - konnecteventdataplanecertificates/finalizers - konnecteventdataplanecertificates/status + - konnecteventgateways/finalizers + - konnecteventgateways/status - konnectextensions/finalizers - konnectextensions/status - konnectgatewaycontrolplanes/finalizers @@ -68879,6 +69088,14 @@ rules: verbs: - patch - update +- apiGroups: + - konnect.konghq.com + resources: + - konnecteventcontrolplanes + verbs: + - get + - list + - watch - apiGroups: - konnect.konghq.com resources: diff --git a/charts/kong-operator/ci/__snapshots__/cert-manager-enabled-everywhere.snap b/charts/kong-operator/ci/__snapshots__/cert-manager-enabled-everywhere.snap index 62a99ca257..b5e87037f4 100644 --- a/charts/kong-operator/ci/__snapshots__/cert-manager-enabled-everywhere.snap +++ b/charts/kong-operator/ci/__snapshots__/cert-manager-enabled-everywhere.snap @@ -65691,6 +65691,215 @@ spec: # Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + kubernetes-configuration.konghq.com/channels: kong-operator + kubernetes-configuration.konghq.com/version: v2.1.0 + name: konnecteventgateways.konnect.konghq.com +spec: + group: konnect.konghq.com + names: + kind: KonnectEventGateway + listKind: KonnectEventGatewayList + plural: konnecteventgateways + singular: konnecteventgateway + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Konnect ID + jsonPath: .status.id + name: ID + type: string + - description: The Resource is Programmed on Konnect + jsonPath: .status.conditions[?(@.type=='Programmed')].status + name: Programmed + type: string + - description: Konnect Organization ID this resource belongs to. + jsonPath: .status.organizationID + name: OrgID + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: KonnectEventGateway is the Schema for the konnecteventgateways API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: KonnectEventGatewaySpec defines the desired state of KonnectEventGateway. + properties: + apiSpec: + description: APISpec defines the desired state of the resource's API spec fields. + properties: + description: + description: A human-readable description of the Gateway. + maxLength: 512 + type: string + labels: + additionalProperties: + description: LabelsValue is the value type for Labels. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$ + type: string + description: |- + Labels store metadata of an entity that can be used for filtering an entity + list or for searching across entity types. + + Keys must be of length 1-63 characters, and cannot start with "kong", + "konnect", "mesh", "kic", or "_". + type: object + min_runtime_version: + description: |- + The minimum runtime version supported by the API. + This is the lowest version of the data plane + release that can be used with the entity model. + When not specified, the minimum runtime version will be pinned to the latest + available release. + maxLength: 253 + pattern: ^\d+\.\d+$ + type: string + name: + description: The name of the Gateway. + maxLength: 255 + minLength: 1 + type: string + required: + - name + type: object + konnect: + description: KonnectConfiguration is the Konnect configuration for this entity. + properties: + authRef: + description: |- + APIAuthConfigurationRef is the reference to the API Auth Configuration + that should be used for this Konnect Configuration. + properties: + name: + description: Name is the name of the KonnectAPIAuthConfiguration resource. + minLength: 1 + type: string + required: + - name + type: object + required: + - authRef + type: object + required: + - konnect + type: object + status: + description: KonnectEventGatewayStatus defines the observed state of KonnectEventGateway. + properties: + conditions: + description: Conditions represent the current state of the resource. + items: + description: Condition contains details for one aspect of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 8 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: |- + ID is the unique identifier of the Konnect entity as assigned by Konnect API. + If it's unset (empty string), it means the Konnect entity hasn't been created yet. + maxLength: 256 + type: string + observedGeneration: + description: ObservedGeneration is the most recent generation observed + format: int64 + type: integer + organizationID: + description: OrgID is ID of Konnect Org that this entity has been created in. + maxLength: 256 + type: string + serverURL: + description: ServerURL is the URL of the Konnect server in which the entity exists. + maxLength: 512 + type: string + type: object + required: + - metadata + type: object + served: true + storage: true + subresources: + status: {} +--- +# Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition metadata: annotations: helm.sh/resource-policy: keep @@ -68772,8 +68981,8 @@ rules: - konnectcloudgatewaydataplanegroupconfigurations - konnectcloudgatewaynetworks - konnectcloudgatewaytransitgateways - - konnecteventcontrolplanes - konnecteventdataplanecertificates + - konnecteventgateways - portalpages - portals - portalteams @@ -68796,10 +69005,10 @@ rules: - konnectcloudgatewaynetworks/status - konnectcloudgatewaytransitgateways/finalizers - konnectcloudgatewaytransitgateways/status - - konnecteventcontrolplanes/finalizers - - konnecteventcontrolplanes/status - konnecteventdataplanecertificates/finalizers - konnecteventdataplanecertificates/status + - konnecteventgateways/finalizers + - konnecteventgateways/status - konnectextensions/finalizers - konnectextensions/status - konnectgatewaycontrolplanes/finalizers @@ -68814,6 +69023,14 @@ rules: verbs: - patch - update +- apiGroups: + - konnect.konghq.com + resources: + - konnecteventcontrolplanes + verbs: + - get + - list + - watch - apiGroups: - konnect.konghq.com resources: diff --git a/charts/kong-operator/ci/__snapshots__/controlplane-config-dump.snap b/charts/kong-operator/ci/__snapshots__/controlplane-config-dump.snap index fa65d31023..cee3c700d1 100644 --- a/charts/kong-operator/ci/__snapshots__/controlplane-config-dump.snap +++ b/charts/kong-operator/ci/__snapshots__/controlplane-config-dump.snap @@ -65756,6 +65756,215 @@ spec: # Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + kubernetes-configuration.konghq.com/channels: kong-operator + kubernetes-configuration.konghq.com/version: v2.1.0 + name: konnecteventgateways.konnect.konghq.com +spec: + group: konnect.konghq.com + names: + kind: KonnectEventGateway + listKind: KonnectEventGatewayList + plural: konnecteventgateways + singular: konnecteventgateway + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Konnect ID + jsonPath: .status.id + name: ID + type: string + - description: The Resource is Programmed on Konnect + jsonPath: .status.conditions[?(@.type=='Programmed')].status + name: Programmed + type: string + - description: Konnect Organization ID this resource belongs to. + jsonPath: .status.organizationID + name: OrgID + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: KonnectEventGateway is the Schema for the konnecteventgateways API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: KonnectEventGatewaySpec defines the desired state of KonnectEventGateway. + properties: + apiSpec: + description: APISpec defines the desired state of the resource's API spec fields. + properties: + description: + description: A human-readable description of the Gateway. + maxLength: 512 + type: string + labels: + additionalProperties: + description: LabelsValue is the value type for Labels. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$ + type: string + description: |- + Labels store metadata of an entity that can be used for filtering an entity + list or for searching across entity types. + + Keys must be of length 1-63 characters, and cannot start with "kong", + "konnect", "mesh", "kic", or "_". + type: object + min_runtime_version: + description: |- + The minimum runtime version supported by the API. + This is the lowest version of the data plane + release that can be used with the entity model. + When not specified, the minimum runtime version will be pinned to the latest + available release. + maxLength: 253 + pattern: ^\d+\.\d+$ + type: string + name: + description: The name of the Gateway. + maxLength: 255 + minLength: 1 + type: string + required: + - name + type: object + konnect: + description: KonnectConfiguration is the Konnect configuration for this entity. + properties: + authRef: + description: |- + APIAuthConfigurationRef is the reference to the API Auth Configuration + that should be used for this Konnect Configuration. + properties: + name: + description: Name is the name of the KonnectAPIAuthConfiguration resource. + minLength: 1 + type: string + required: + - name + type: object + required: + - authRef + type: object + required: + - konnect + type: object + status: + description: KonnectEventGatewayStatus defines the observed state of KonnectEventGateway. + properties: + conditions: + description: Conditions represent the current state of the resource. + items: + description: Condition contains details for one aspect of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 8 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: |- + ID is the unique identifier of the Konnect entity as assigned by Konnect API. + If it's unset (empty string), it means the Konnect entity hasn't been created yet. + maxLength: 256 + type: string + observedGeneration: + description: ObservedGeneration is the most recent generation observed + format: int64 + type: integer + organizationID: + description: OrgID is ID of Konnect Org that this entity has been created in. + maxLength: 256 + type: string + serverURL: + description: ServerURL is the URL of the Konnect server in which the entity exists. + maxLength: 512 + type: string + type: object + required: + - metadata + type: object + served: true + storage: true + subresources: + status: {} +--- +# Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition metadata: annotations: helm.sh/resource-policy: keep @@ -68837,8 +69046,8 @@ rules: - konnectcloudgatewaydataplanegroupconfigurations - konnectcloudgatewaynetworks - konnectcloudgatewaytransitgateways - - konnecteventcontrolplanes - konnecteventdataplanecertificates + - konnecteventgateways - portalpages - portals - portalteams @@ -68861,10 +69070,10 @@ rules: - konnectcloudgatewaynetworks/status - konnectcloudgatewaytransitgateways/finalizers - konnectcloudgatewaytransitgateways/status - - konnecteventcontrolplanes/finalizers - - konnecteventcontrolplanes/status - konnecteventdataplanecertificates/finalizers - konnecteventdataplanecertificates/status + - konnecteventgateways/finalizers + - konnecteventgateways/status - konnectextensions/finalizers - konnectextensions/status - konnectgatewaycontrolplanes/finalizers @@ -68879,6 +69088,14 @@ rules: verbs: - patch - update +- apiGroups: + - konnect.konghq.com + resources: + - konnecteventcontrolplanes + verbs: + - get + - list + - watch - apiGroups: - konnect.konghq.com resources: diff --git a/charts/kong-operator/ci/__snapshots__/disable-gateway-controller-values.snap b/charts/kong-operator/ci/__snapshots__/disable-gateway-controller-values.snap index 8d1cf5bfef..f44b8577c4 100644 --- a/charts/kong-operator/ci/__snapshots__/disable-gateway-controller-values.snap +++ b/charts/kong-operator/ci/__snapshots__/disable-gateway-controller-values.snap @@ -65756,6 +65756,215 @@ spec: # Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + kubernetes-configuration.konghq.com/channels: kong-operator + kubernetes-configuration.konghq.com/version: v2.1.0 + name: konnecteventgateways.konnect.konghq.com +spec: + group: konnect.konghq.com + names: + kind: KonnectEventGateway + listKind: KonnectEventGatewayList + plural: konnecteventgateways + singular: konnecteventgateway + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Konnect ID + jsonPath: .status.id + name: ID + type: string + - description: The Resource is Programmed on Konnect + jsonPath: .status.conditions[?(@.type=='Programmed')].status + name: Programmed + type: string + - description: Konnect Organization ID this resource belongs to. + jsonPath: .status.organizationID + name: OrgID + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: KonnectEventGateway is the Schema for the konnecteventgateways API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: KonnectEventGatewaySpec defines the desired state of KonnectEventGateway. + properties: + apiSpec: + description: APISpec defines the desired state of the resource's API spec fields. + properties: + description: + description: A human-readable description of the Gateway. + maxLength: 512 + type: string + labels: + additionalProperties: + description: LabelsValue is the value type for Labels. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$ + type: string + description: |- + Labels store metadata of an entity that can be used for filtering an entity + list or for searching across entity types. + + Keys must be of length 1-63 characters, and cannot start with "kong", + "konnect", "mesh", "kic", or "_". + type: object + min_runtime_version: + description: |- + The minimum runtime version supported by the API. + This is the lowest version of the data plane + release that can be used with the entity model. + When not specified, the minimum runtime version will be pinned to the latest + available release. + maxLength: 253 + pattern: ^\d+\.\d+$ + type: string + name: + description: The name of the Gateway. + maxLength: 255 + minLength: 1 + type: string + required: + - name + type: object + konnect: + description: KonnectConfiguration is the Konnect configuration for this entity. + properties: + authRef: + description: |- + APIAuthConfigurationRef is the reference to the API Auth Configuration + that should be used for this Konnect Configuration. + properties: + name: + description: Name is the name of the KonnectAPIAuthConfiguration resource. + minLength: 1 + type: string + required: + - name + type: object + required: + - authRef + type: object + required: + - konnect + type: object + status: + description: KonnectEventGatewayStatus defines the observed state of KonnectEventGateway. + properties: + conditions: + description: Conditions represent the current state of the resource. + items: + description: Condition contains details for one aspect of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 8 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: |- + ID is the unique identifier of the Konnect entity as assigned by Konnect API. + If it's unset (empty string), it means the Konnect entity hasn't been created yet. + maxLength: 256 + type: string + observedGeneration: + description: ObservedGeneration is the most recent generation observed + format: int64 + type: integer + organizationID: + description: OrgID is ID of Konnect Org that this entity has been created in. + maxLength: 256 + type: string + serverURL: + description: ServerURL is the URL of the Konnect server in which the entity exists. + maxLength: 512 + type: string + type: object + required: + - metadata + type: object + served: true + storage: true + subresources: + status: {} +--- +# Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition metadata: annotations: helm.sh/resource-policy: keep @@ -68837,8 +69046,8 @@ rules: - konnectcloudgatewaydataplanegroupconfigurations - konnectcloudgatewaynetworks - konnectcloudgatewaytransitgateways - - konnecteventcontrolplanes - konnecteventdataplanecertificates + - konnecteventgateways - portalpages - portals - portalteams @@ -68861,10 +69070,10 @@ rules: - konnectcloudgatewaynetworks/status - konnectcloudgatewaytransitgateways/finalizers - konnectcloudgatewaytransitgateways/status - - konnecteventcontrolplanes/finalizers - - konnecteventcontrolplanes/status - konnecteventdataplanecertificates/finalizers - konnecteventdataplanecertificates/status + - konnecteventgateways/finalizers + - konnecteventgateways/status - konnectextensions/finalizers - konnectextensions/status - konnectgatewaycontrolplanes/finalizers @@ -68879,6 +69088,14 @@ rules: verbs: - patch - update +- apiGroups: + - konnect.konghq.com + resources: + - konnecteventcontrolplanes + verbs: + - get + - list + - watch - apiGroups: - konnect.konghq.com resources: diff --git a/charts/kong-operator/ci/__snapshots__/env-and-args-values.snap b/charts/kong-operator/ci/__snapshots__/env-and-args-values.snap index a884b9d235..f4629bbc50 100644 --- a/charts/kong-operator/ci/__snapshots__/env-and-args-values.snap +++ b/charts/kong-operator/ci/__snapshots__/env-and-args-values.snap @@ -65756,6 +65756,215 @@ spec: # Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + kubernetes-configuration.konghq.com/channels: kong-operator + kubernetes-configuration.konghq.com/version: v2.1.0 + name: konnecteventgateways.konnect.konghq.com +spec: + group: konnect.konghq.com + names: + kind: KonnectEventGateway + listKind: KonnectEventGatewayList + plural: konnecteventgateways + singular: konnecteventgateway + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Konnect ID + jsonPath: .status.id + name: ID + type: string + - description: The Resource is Programmed on Konnect + jsonPath: .status.conditions[?(@.type=='Programmed')].status + name: Programmed + type: string + - description: Konnect Organization ID this resource belongs to. + jsonPath: .status.organizationID + name: OrgID + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: KonnectEventGateway is the Schema for the konnecteventgateways API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: KonnectEventGatewaySpec defines the desired state of KonnectEventGateway. + properties: + apiSpec: + description: APISpec defines the desired state of the resource's API spec fields. + properties: + description: + description: A human-readable description of the Gateway. + maxLength: 512 + type: string + labels: + additionalProperties: + description: LabelsValue is the value type for Labels. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$ + type: string + description: |- + Labels store metadata of an entity that can be used for filtering an entity + list or for searching across entity types. + + Keys must be of length 1-63 characters, and cannot start with "kong", + "konnect", "mesh", "kic", or "_". + type: object + min_runtime_version: + description: |- + The minimum runtime version supported by the API. + This is the lowest version of the data plane + release that can be used with the entity model. + When not specified, the minimum runtime version will be pinned to the latest + available release. + maxLength: 253 + pattern: ^\d+\.\d+$ + type: string + name: + description: The name of the Gateway. + maxLength: 255 + minLength: 1 + type: string + required: + - name + type: object + konnect: + description: KonnectConfiguration is the Konnect configuration for this entity. + properties: + authRef: + description: |- + APIAuthConfigurationRef is the reference to the API Auth Configuration + that should be used for this Konnect Configuration. + properties: + name: + description: Name is the name of the KonnectAPIAuthConfiguration resource. + minLength: 1 + type: string + required: + - name + type: object + required: + - authRef + type: object + required: + - konnect + type: object + status: + description: KonnectEventGatewayStatus defines the observed state of KonnectEventGateway. + properties: + conditions: + description: Conditions represent the current state of the resource. + items: + description: Condition contains details for one aspect of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 8 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: |- + ID is the unique identifier of the Konnect entity as assigned by Konnect API. + If it's unset (empty string), it means the Konnect entity hasn't been created yet. + maxLength: 256 + type: string + observedGeneration: + description: ObservedGeneration is the most recent generation observed + format: int64 + type: integer + organizationID: + description: OrgID is ID of Konnect Org that this entity has been created in. + maxLength: 256 + type: string + serverURL: + description: ServerURL is the URL of the Konnect server in which the entity exists. + maxLength: 512 + type: string + type: object + required: + - metadata + type: object + served: true + storage: true + subresources: + status: {} +--- +# Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition metadata: annotations: helm.sh/resource-policy: keep @@ -68837,8 +69046,8 @@ rules: - konnectcloudgatewaydataplanegroupconfigurations - konnectcloudgatewaynetworks - konnectcloudgatewaytransitgateways - - konnecteventcontrolplanes - konnecteventdataplanecertificates + - konnecteventgateways - portalpages - portals - portalteams @@ -68861,10 +69070,10 @@ rules: - konnectcloudgatewaynetworks/status - konnectcloudgatewaytransitgateways/finalizers - konnectcloudgatewaytransitgateways/status - - konnecteventcontrolplanes/finalizers - - konnecteventcontrolplanes/status - konnecteventdataplanecertificates/finalizers - konnecteventdataplanecertificates/status + - konnecteventgateways/finalizers + - konnecteventgateways/status - konnectextensions/finalizers - konnectextensions/status - konnectgatewaycontrolplanes/finalizers @@ -68879,6 +69088,14 @@ rules: verbs: - patch - update +- apiGroups: + - konnect.konghq.com + resources: + - konnecteventcontrolplanes + verbs: + - get + - list + - watch - apiGroups: - konnect.konghq.com resources: diff --git a/charts/kong-operator/ci/__snapshots__/env-and-customenv-values.snap b/charts/kong-operator/ci/__snapshots__/env-and-customenv-values.snap index 5524883cca..d327c1d2b5 100644 --- a/charts/kong-operator/ci/__snapshots__/env-and-customenv-values.snap +++ b/charts/kong-operator/ci/__snapshots__/env-and-customenv-values.snap @@ -65756,6 +65756,215 @@ spec: # Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + kubernetes-configuration.konghq.com/channels: kong-operator + kubernetes-configuration.konghq.com/version: v2.1.0 + name: konnecteventgateways.konnect.konghq.com +spec: + group: konnect.konghq.com + names: + kind: KonnectEventGateway + listKind: KonnectEventGatewayList + plural: konnecteventgateways + singular: konnecteventgateway + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Konnect ID + jsonPath: .status.id + name: ID + type: string + - description: The Resource is Programmed on Konnect + jsonPath: .status.conditions[?(@.type=='Programmed')].status + name: Programmed + type: string + - description: Konnect Organization ID this resource belongs to. + jsonPath: .status.organizationID + name: OrgID + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: KonnectEventGateway is the Schema for the konnecteventgateways API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: KonnectEventGatewaySpec defines the desired state of KonnectEventGateway. + properties: + apiSpec: + description: APISpec defines the desired state of the resource's API spec fields. + properties: + description: + description: A human-readable description of the Gateway. + maxLength: 512 + type: string + labels: + additionalProperties: + description: LabelsValue is the value type for Labels. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$ + type: string + description: |- + Labels store metadata of an entity that can be used for filtering an entity + list or for searching across entity types. + + Keys must be of length 1-63 characters, and cannot start with "kong", + "konnect", "mesh", "kic", or "_". + type: object + min_runtime_version: + description: |- + The minimum runtime version supported by the API. + This is the lowest version of the data plane + release that can be used with the entity model. + When not specified, the minimum runtime version will be pinned to the latest + available release. + maxLength: 253 + pattern: ^\d+\.\d+$ + type: string + name: + description: The name of the Gateway. + maxLength: 255 + minLength: 1 + type: string + required: + - name + type: object + konnect: + description: KonnectConfiguration is the Konnect configuration for this entity. + properties: + authRef: + description: |- + APIAuthConfigurationRef is the reference to the API Auth Configuration + that should be used for this Konnect Configuration. + properties: + name: + description: Name is the name of the KonnectAPIAuthConfiguration resource. + minLength: 1 + type: string + required: + - name + type: object + required: + - authRef + type: object + required: + - konnect + type: object + status: + description: KonnectEventGatewayStatus defines the observed state of KonnectEventGateway. + properties: + conditions: + description: Conditions represent the current state of the resource. + items: + description: Condition contains details for one aspect of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 8 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: |- + ID is the unique identifier of the Konnect entity as assigned by Konnect API. + If it's unset (empty string), it means the Konnect entity hasn't been created yet. + maxLength: 256 + type: string + observedGeneration: + description: ObservedGeneration is the most recent generation observed + format: int64 + type: integer + organizationID: + description: OrgID is ID of Konnect Org that this entity has been created in. + maxLength: 256 + type: string + serverURL: + description: ServerURL is the URL of the Konnect server in which the entity exists. + maxLength: 512 + type: string + type: object + required: + - metadata + type: object + served: true + storage: true + subresources: + status: {} +--- +# Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition metadata: annotations: helm.sh/resource-policy: keep @@ -68837,8 +69046,8 @@ rules: - konnectcloudgatewaydataplanegroupconfigurations - konnectcloudgatewaynetworks - konnectcloudgatewaytransitgateways - - konnecteventcontrolplanes - konnecteventdataplanecertificates + - konnecteventgateways - portalpages - portals - portalteams @@ -68861,10 +69070,10 @@ rules: - konnectcloudgatewaynetworks/status - konnectcloudgatewaytransitgateways/finalizers - konnectcloudgatewaytransitgateways/status - - konnecteventcontrolplanes/finalizers - - konnecteventcontrolplanes/status - konnecteventdataplanecertificates/finalizers - konnecteventdataplanecertificates/status + - konnecteventgateways/finalizers + - konnecteventgateways/status - konnectextensions/finalizers - konnectextensions/status - konnectgatewaycontrolplanes/finalizers @@ -68879,6 +69088,14 @@ rules: verbs: - patch - update +- apiGroups: + - konnect.konghq.com + resources: + - konnecteventcontrolplanes + verbs: + - get + - list + - watch - apiGroups: - konnect.konghq.com resources: diff --git a/charts/kong-operator/ci/__snapshots__/extra-labels-values.snap b/charts/kong-operator/ci/__snapshots__/extra-labels-values.snap index b1ec1dc21b..33293cf4d9 100644 --- a/charts/kong-operator/ci/__snapshots__/extra-labels-values.snap +++ b/charts/kong-operator/ci/__snapshots__/extra-labels-values.snap @@ -65757,6 +65757,215 @@ spec: # Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + kubernetes-configuration.konghq.com/channels: kong-operator + kubernetes-configuration.konghq.com/version: v2.1.0 + name: konnecteventgateways.konnect.konghq.com +spec: + group: konnect.konghq.com + names: + kind: KonnectEventGateway + listKind: KonnectEventGatewayList + plural: konnecteventgateways + singular: konnecteventgateway + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Konnect ID + jsonPath: .status.id + name: ID + type: string + - description: The Resource is Programmed on Konnect + jsonPath: .status.conditions[?(@.type=='Programmed')].status + name: Programmed + type: string + - description: Konnect Organization ID this resource belongs to. + jsonPath: .status.organizationID + name: OrgID + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: KonnectEventGateway is the Schema for the konnecteventgateways API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: KonnectEventGatewaySpec defines the desired state of KonnectEventGateway. + properties: + apiSpec: + description: APISpec defines the desired state of the resource's API spec fields. + properties: + description: + description: A human-readable description of the Gateway. + maxLength: 512 + type: string + labels: + additionalProperties: + description: LabelsValue is the value type for Labels. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$ + type: string + description: |- + Labels store metadata of an entity that can be used for filtering an entity + list or for searching across entity types. + + Keys must be of length 1-63 characters, and cannot start with "kong", + "konnect", "mesh", "kic", or "_". + type: object + min_runtime_version: + description: |- + The minimum runtime version supported by the API. + This is the lowest version of the data plane + release that can be used with the entity model. + When not specified, the minimum runtime version will be pinned to the latest + available release. + maxLength: 253 + pattern: ^\d+\.\d+$ + type: string + name: + description: The name of the Gateway. + maxLength: 255 + minLength: 1 + type: string + required: + - name + type: object + konnect: + description: KonnectConfiguration is the Konnect configuration for this entity. + properties: + authRef: + description: |- + APIAuthConfigurationRef is the reference to the API Auth Configuration + that should be used for this Konnect Configuration. + properties: + name: + description: Name is the name of the KonnectAPIAuthConfiguration resource. + minLength: 1 + type: string + required: + - name + type: object + required: + - authRef + type: object + required: + - konnect + type: object + status: + description: KonnectEventGatewayStatus defines the observed state of KonnectEventGateway. + properties: + conditions: + description: Conditions represent the current state of the resource. + items: + description: Condition contains details for one aspect of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 8 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: |- + ID is the unique identifier of the Konnect entity as assigned by Konnect API. + If it's unset (empty string), it means the Konnect entity hasn't been created yet. + maxLength: 256 + type: string + observedGeneration: + description: ObservedGeneration is the most recent generation observed + format: int64 + type: integer + organizationID: + description: OrgID is ID of Konnect Org that this entity has been created in. + maxLength: 256 + type: string + serverURL: + description: ServerURL is the URL of the Konnect server in which the entity exists. + maxLength: 512 + type: string + type: object + required: + - metadata + type: object + served: true + storage: true + subresources: + status: {} +--- +# Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition metadata: annotations: helm.sh/resource-policy: keep @@ -68838,8 +69047,8 @@ rules: - konnectcloudgatewaydataplanegroupconfigurations - konnectcloudgatewaynetworks - konnectcloudgatewaytransitgateways - - konnecteventcontrolplanes - konnecteventdataplanecertificates + - konnecteventgateways - portalpages - portals - portalteams @@ -68862,10 +69071,10 @@ rules: - konnectcloudgatewaynetworks/status - konnectcloudgatewaytransitgateways/finalizers - konnectcloudgatewaytransitgateways/status - - konnecteventcontrolplanes/finalizers - - konnecteventcontrolplanes/status - konnecteventdataplanecertificates/finalizers - konnecteventdataplanecertificates/status + - konnecteventgateways/finalizers + - konnecteventgateways/status - konnectextensions/finalizers - konnectextensions/status - konnectgatewaycontrolplanes/finalizers @@ -68880,6 +69089,14 @@ rules: verbs: - patch - update +- apiGroups: + - konnect.konghq.com + resources: + - konnecteventcontrolplanes + verbs: + - get + - list + - watch - apiGroups: - konnect.konghq.com resources: diff --git a/charts/kong-operator/ci/__snapshots__/image-pull-secrets-and-image-digest-values.snap b/charts/kong-operator/ci/__snapshots__/image-pull-secrets-and-image-digest-values.snap index 7f78dffc00..c130fa0118 100644 --- a/charts/kong-operator/ci/__snapshots__/image-pull-secrets-and-image-digest-values.snap +++ b/charts/kong-operator/ci/__snapshots__/image-pull-secrets-and-image-digest-values.snap @@ -65756,6 +65756,215 @@ spec: # Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + kubernetes-configuration.konghq.com/channels: kong-operator + kubernetes-configuration.konghq.com/version: v2.1.0 + name: konnecteventgateways.konnect.konghq.com +spec: + group: konnect.konghq.com + names: + kind: KonnectEventGateway + listKind: KonnectEventGatewayList + plural: konnecteventgateways + singular: konnecteventgateway + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Konnect ID + jsonPath: .status.id + name: ID + type: string + - description: The Resource is Programmed on Konnect + jsonPath: .status.conditions[?(@.type=='Programmed')].status + name: Programmed + type: string + - description: Konnect Organization ID this resource belongs to. + jsonPath: .status.organizationID + name: OrgID + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: KonnectEventGateway is the Schema for the konnecteventgateways API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: KonnectEventGatewaySpec defines the desired state of KonnectEventGateway. + properties: + apiSpec: + description: APISpec defines the desired state of the resource's API spec fields. + properties: + description: + description: A human-readable description of the Gateway. + maxLength: 512 + type: string + labels: + additionalProperties: + description: LabelsValue is the value type for Labels. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$ + type: string + description: |- + Labels store metadata of an entity that can be used for filtering an entity + list or for searching across entity types. + + Keys must be of length 1-63 characters, and cannot start with "kong", + "konnect", "mesh", "kic", or "_". + type: object + min_runtime_version: + description: |- + The minimum runtime version supported by the API. + This is the lowest version of the data plane + release that can be used with the entity model. + When not specified, the minimum runtime version will be pinned to the latest + available release. + maxLength: 253 + pattern: ^\d+\.\d+$ + type: string + name: + description: The name of the Gateway. + maxLength: 255 + minLength: 1 + type: string + required: + - name + type: object + konnect: + description: KonnectConfiguration is the Konnect configuration for this entity. + properties: + authRef: + description: |- + APIAuthConfigurationRef is the reference to the API Auth Configuration + that should be used for this Konnect Configuration. + properties: + name: + description: Name is the name of the KonnectAPIAuthConfiguration resource. + minLength: 1 + type: string + required: + - name + type: object + required: + - authRef + type: object + required: + - konnect + type: object + status: + description: KonnectEventGatewayStatus defines the observed state of KonnectEventGateway. + properties: + conditions: + description: Conditions represent the current state of the resource. + items: + description: Condition contains details for one aspect of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 8 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: |- + ID is the unique identifier of the Konnect entity as assigned by Konnect API. + If it's unset (empty string), it means the Konnect entity hasn't been created yet. + maxLength: 256 + type: string + observedGeneration: + description: ObservedGeneration is the most recent generation observed + format: int64 + type: integer + organizationID: + description: OrgID is ID of Konnect Org that this entity has been created in. + maxLength: 256 + type: string + serverURL: + description: ServerURL is the URL of the Konnect server in which the entity exists. + maxLength: 512 + type: string + type: object + required: + - metadata + type: object + served: true + storage: true + subresources: + status: {} +--- +# Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition metadata: annotations: helm.sh/resource-policy: keep @@ -68837,8 +69046,8 @@ rules: - konnectcloudgatewaydataplanegroupconfigurations - konnectcloudgatewaynetworks - konnectcloudgatewaytransitgateways - - konnecteventcontrolplanes - konnecteventdataplanecertificates + - konnecteventgateways - portalpages - portals - portalteams @@ -68861,10 +69070,10 @@ rules: - konnectcloudgatewaynetworks/status - konnectcloudgatewaytransitgateways/finalizers - konnectcloudgatewaytransitgateways/status - - konnecteventcontrolplanes/finalizers - - konnecteventcontrolplanes/status - konnecteventdataplanecertificates/finalizers - konnecteventdataplanecertificates/status + - konnecteventgateways/finalizers + - konnecteventgateways/status - konnectextensions/finalizers - konnectextensions/status - konnectgatewaycontrolplanes/finalizers @@ -68879,6 +69088,14 @@ rules: verbs: - patch - update +- apiGroups: + - konnect.konghq.com + resources: + - konnecteventcontrolplanes + verbs: + - get + - list + - watch - apiGroups: - konnect.konghq.com resources: diff --git a/charts/kong-operator/ci/__snapshots__/nightly-can-be-used-values.snap b/charts/kong-operator/ci/__snapshots__/nightly-can-be-used-values.snap index 7d79ccda97..ea571135fa 100644 --- a/charts/kong-operator/ci/__snapshots__/nightly-can-be-used-values.snap +++ b/charts/kong-operator/ci/__snapshots__/nightly-can-be-used-values.snap @@ -65756,6 +65756,215 @@ spec: # Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + kubernetes-configuration.konghq.com/channels: kong-operator + kubernetes-configuration.konghq.com/version: v2.1.0 + name: konnecteventgateways.konnect.konghq.com +spec: + group: konnect.konghq.com + names: + kind: KonnectEventGateway + listKind: KonnectEventGatewayList + plural: konnecteventgateways + singular: konnecteventgateway + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Konnect ID + jsonPath: .status.id + name: ID + type: string + - description: The Resource is Programmed on Konnect + jsonPath: .status.conditions[?(@.type=='Programmed')].status + name: Programmed + type: string + - description: Konnect Organization ID this resource belongs to. + jsonPath: .status.organizationID + name: OrgID + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: KonnectEventGateway is the Schema for the konnecteventgateways API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: KonnectEventGatewaySpec defines the desired state of KonnectEventGateway. + properties: + apiSpec: + description: APISpec defines the desired state of the resource's API spec fields. + properties: + description: + description: A human-readable description of the Gateway. + maxLength: 512 + type: string + labels: + additionalProperties: + description: LabelsValue is the value type for Labels. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$ + type: string + description: |- + Labels store metadata of an entity that can be used for filtering an entity + list or for searching across entity types. + + Keys must be of length 1-63 characters, and cannot start with "kong", + "konnect", "mesh", "kic", or "_". + type: object + min_runtime_version: + description: |- + The minimum runtime version supported by the API. + This is the lowest version of the data plane + release that can be used with the entity model. + When not specified, the minimum runtime version will be pinned to the latest + available release. + maxLength: 253 + pattern: ^\d+\.\d+$ + type: string + name: + description: The name of the Gateway. + maxLength: 255 + minLength: 1 + type: string + required: + - name + type: object + konnect: + description: KonnectConfiguration is the Konnect configuration for this entity. + properties: + authRef: + description: |- + APIAuthConfigurationRef is the reference to the API Auth Configuration + that should be used for this Konnect Configuration. + properties: + name: + description: Name is the name of the KonnectAPIAuthConfiguration resource. + minLength: 1 + type: string + required: + - name + type: object + required: + - authRef + type: object + required: + - konnect + type: object + status: + description: KonnectEventGatewayStatus defines the observed state of KonnectEventGateway. + properties: + conditions: + description: Conditions represent the current state of the resource. + items: + description: Condition contains details for one aspect of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 8 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: |- + ID is the unique identifier of the Konnect entity as assigned by Konnect API. + If it's unset (empty string), it means the Konnect entity hasn't been created yet. + maxLength: 256 + type: string + observedGeneration: + description: ObservedGeneration is the most recent generation observed + format: int64 + type: integer + organizationID: + description: OrgID is ID of Konnect Org that this entity has been created in. + maxLength: 256 + type: string + serverURL: + description: ServerURL is the URL of the Konnect server in which the entity exists. + maxLength: 512 + type: string + type: object + required: + - metadata + type: object + served: true + storage: true + subresources: + status: {} +--- +# Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition metadata: annotations: helm.sh/resource-policy: keep @@ -68837,8 +69046,8 @@ rules: - konnectcloudgatewaydataplanegroupconfigurations - konnectcloudgatewaynetworks - konnectcloudgatewaytransitgateways - - konnecteventcontrolplanes - konnecteventdataplanecertificates + - konnecteventgateways - portalpages - portals - portalteams @@ -68861,10 +69070,10 @@ rules: - konnectcloudgatewaynetworks/status - konnectcloudgatewaytransitgateways/finalizers - konnectcloudgatewaytransitgateways/status - - konnecteventcontrolplanes/finalizers - - konnecteventcontrolplanes/status - konnecteventdataplanecertificates/finalizers - konnecteventdataplanecertificates/status + - konnecteventgateways/finalizers + - konnecteventgateways/status - konnectextensions/finalizers - konnectextensions/status - konnectgatewaycontrolplanes/finalizers @@ -68879,6 +69088,14 @@ rules: verbs: - patch - update +- apiGroups: + - konnect.konghq.com + resources: + - konnecteventcontrolplanes + verbs: + - get + - list + - watch - apiGroups: - konnect.konghq.com resources: diff --git a/charts/kong-operator/ci/__snapshots__/pod-annotations-values.snap b/charts/kong-operator/ci/__snapshots__/pod-annotations-values.snap index ac089a63fe..1ea52b5390 100644 --- a/charts/kong-operator/ci/__snapshots__/pod-annotations-values.snap +++ b/charts/kong-operator/ci/__snapshots__/pod-annotations-values.snap @@ -65756,6 +65756,215 @@ spec: # Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + kubernetes-configuration.konghq.com/channels: kong-operator + kubernetes-configuration.konghq.com/version: v2.1.0 + name: konnecteventgateways.konnect.konghq.com +spec: + group: konnect.konghq.com + names: + kind: KonnectEventGateway + listKind: KonnectEventGatewayList + plural: konnecteventgateways + singular: konnecteventgateway + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Konnect ID + jsonPath: .status.id + name: ID + type: string + - description: The Resource is Programmed on Konnect + jsonPath: .status.conditions[?(@.type=='Programmed')].status + name: Programmed + type: string + - description: Konnect Organization ID this resource belongs to. + jsonPath: .status.organizationID + name: OrgID + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: KonnectEventGateway is the Schema for the konnecteventgateways API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: KonnectEventGatewaySpec defines the desired state of KonnectEventGateway. + properties: + apiSpec: + description: APISpec defines the desired state of the resource's API spec fields. + properties: + description: + description: A human-readable description of the Gateway. + maxLength: 512 + type: string + labels: + additionalProperties: + description: LabelsValue is the value type for Labels. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$ + type: string + description: |- + Labels store metadata of an entity that can be used for filtering an entity + list or for searching across entity types. + + Keys must be of length 1-63 characters, and cannot start with "kong", + "konnect", "mesh", "kic", or "_". + type: object + min_runtime_version: + description: |- + The minimum runtime version supported by the API. + This is the lowest version of the data plane + release that can be used with the entity model. + When not specified, the minimum runtime version will be pinned to the latest + available release. + maxLength: 253 + pattern: ^\d+\.\d+$ + type: string + name: + description: The name of the Gateway. + maxLength: 255 + minLength: 1 + type: string + required: + - name + type: object + konnect: + description: KonnectConfiguration is the Konnect configuration for this entity. + properties: + authRef: + description: |- + APIAuthConfigurationRef is the reference to the API Auth Configuration + that should be used for this Konnect Configuration. + properties: + name: + description: Name is the name of the KonnectAPIAuthConfiguration resource. + minLength: 1 + type: string + required: + - name + type: object + required: + - authRef + type: object + required: + - konnect + type: object + status: + description: KonnectEventGatewayStatus defines the observed state of KonnectEventGateway. + properties: + conditions: + description: Conditions represent the current state of the resource. + items: + description: Condition contains details for one aspect of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 8 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: |- + ID is the unique identifier of the Konnect entity as assigned by Konnect API. + If it's unset (empty string), it means the Konnect entity hasn't been created yet. + maxLength: 256 + type: string + observedGeneration: + description: ObservedGeneration is the most recent generation observed + format: int64 + type: integer + organizationID: + description: OrgID is ID of Konnect Org that this entity has been created in. + maxLength: 256 + type: string + serverURL: + description: ServerURL is the URL of the Konnect server in which the entity exists. + maxLength: 512 + type: string + type: object + required: + - metadata + type: object + served: true + storage: true + subresources: + status: {} +--- +# Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition metadata: annotations: helm.sh/resource-policy: keep @@ -68837,8 +69046,8 @@ rules: - konnectcloudgatewaydataplanegroupconfigurations - konnectcloudgatewaynetworks - konnectcloudgatewaytransitgateways - - konnecteventcontrolplanes - konnecteventdataplanecertificates + - konnecteventgateways - portalpages - portals - portalteams @@ -68861,10 +69070,10 @@ rules: - konnectcloudgatewaynetworks/status - konnectcloudgatewaytransitgateways/finalizers - konnectcloudgatewaytransitgateways/status - - konnecteventcontrolplanes/finalizers - - konnecteventcontrolplanes/status - konnecteventdataplanecertificates/finalizers - konnecteventdataplanecertificates/status + - konnecteventgateways/finalizers + - konnecteventgateways/status - konnectextensions/finalizers - konnectextensions/status - konnectgatewaycontrolplanes/finalizers @@ -68879,6 +69088,14 @@ rules: verbs: - patch - update +- apiGroups: + - konnect.konghq.com + resources: + - konnecteventcontrolplanes + verbs: + - get + - list + - watch - apiGroups: - konnect.konghq.com resources: diff --git a/charts/kong-operator/ci/__snapshots__/probes-and-args-values.snap b/charts/kong-operator/ci/__snapshots__/probes-and-args-values.snap index 2bbb3133af..507a14fed7 100644 --- a/charts/kong-operator/ci/__snapshots__/probes-and-args-values.snap +++ b/charts/kong-operator/ci/__snapshots__/probes-and-args-values.snap @@ -65756,6 +65756,215 @@ spec: # Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + kubernetes-configuration.konghq.com/channels: kong-operator + kubernetes-configuration.konghq.com/version: v2.1.0 + name: konnecteventgateways.konnect.konghq.com +spec: + group: konnect.konghq.com + names: + kind: KonnectEventGateway + listKind: KonnectEventGatewayList + plural: konnecteventgateways + singular: konnecteventgateway + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Konnect ID + jsonPath: .status.id + name: ID + type: string + - description: The Resource is Programmed on Konnect + jsonPath: .status.conditions[?(@.type=='Programmed')].status + name: Programmed + type: string + - description: Konnect Organization ID this resource belongs to. + jsonPath: .status.organizationID + name: OrgID + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: KonnectEventGateway is the Schema for the konnecteventgateways API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: KonnectEventGatewaySpec defines the desired state of KonnectEventGateway. + properties: + apiSpec: + description: APISpec defines the desired state of the resource's API spec fields. + properties: + description: + description: A human-readable description of the Gateway. + maxLength: 512 + type: string + labels: + additionalProperties: + description: LabelsValue is the value type for Labels. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$ + type: string + description: |- + Labels store metadata of an entity that can be used for filtering an entity + list or for searching across entity types. + + Keys must be of length 1-63 characters, and cannot start with "kong", + "konnect", "mesh", "kic", or "_". + type: object + min_runtime_version: + description: |- + The minimum runtime version supported by the API. + This is the lowest version of the data plane + release that can be used with the entity model. + When not specified, the minimum runtime version will be pinned to the latest + available release. + maxLength: 253 + pattern: ^\d+\.\d+$ + type: string + name: + description: The name of the Gateway. + maxLength: 255 + minLength: 1 + type: string + required: + - name + type: object + konnect: + description: KonnectConfiguration is the Konnect configuration for this entity. + properties: + authRef: + description: |- + APIAuthConfigurationRef is the reference to the API Auth Configuration + that should be used for this Konnect Configuration. + properties: + name: + description: Name is the name of the KonnectAPIAuthConfiguration resource. + minLength: 1 + type: string + required: + - name + type: object + required: + - authRef + type: object + required: + - konnect + type: object + status: + description: KonnectEventGatewayStatus defines the observed state of KonnectEventGateway. + properties: + conditions: + description: Conditions represent the current state of the resource. + items: + description: Condition contains details for one aspect of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 8 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: |- + ID is the unique identifier of the Konnect entity as assigned by Konnect API. + If it's unset (empty string), it means the Konnect entity hasn't been created yet. + maxLength: 256 + type: string + observedGeneration: + description: ObservedGeneration is the most recent generation observed + format: int64 + type: integer + organizationID: + description: OrgID is ID of Konnect Org that this entity has been created in. + maxLength: 256 + type: string + serverURL: + description: ServerURL is the URL of the Konnect server in which the entity exists. + maxLength: 512 + type: string + type: object + required: + - metadata + type: object + served: true + storage: true + subresources: + status: {} +--- +# Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition metadata: annotations: helm.sh/resource-policy: keep @@ -68837,8 +69046,8 @@ rules: - konnectcloudgatewaydataplanegroupconfigurations - konnectcloudgatewaynetworks - konnectcloudgatewaytransitgateways - - konnecteventcontrolplanes - konnecteventdataplanecertificates + - konnecteventgateways - portalpages - portals - portalteams @@ -68861,10 +69070,10 @@ rules: - konnectcloudgatewaynetworks/status - konnectcloudgatewaytransitgateways/finalizers - konnectcloudgatewaytransitgateways/status - - konnecteventcontrolplanes/finalizers - - konnecteventcontrolplanes/status - konnecteventdataplanecertificates/finalizers - konnecteventdataplanecertificates/status + - konnecteventgateways/finalizers + - konnecteventgateways/status - konnectextensions/finalizers - konnectextensions/status - konnectgatewaycontrolplanes/finalizers @@ -68879,6 +69088,14 @@ rules: verbs: - patch - update +- apiGroups: + - konnect.konghq.com + resources: + - konnecteventcontrolplanes + verbs: + - get + - list + - watch - apiGroups: - konnect.konghq.com resources: diff --git a/charts/kong-operator/ci/__snapshots__/tolerations-values.snap b/charts/kong-operator/ci/__snapshots__/tolerations-values.snap index 2775d867f6..5878d20f75 100644 --- a/charts/kong-operator/ci/__snapshots__/tolerations-values.snap +++ b/charts/kong-operator/ci/__snapshots__/tolerations-values.snap @@ -65756,6 +65756,215 @@ spec: # Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + kubernetes-configuration.konghq.com/channels: kong-operator + kubernetes-configuration.konghq.com/version: v2.1.0 + name: konnecteventgateways.konnect.konghq.com +spec: + group: konnect.konghq.com + names: + kind: KonnectEventGateway + listKind: KonnectEventGatewayList + plural: konnecteventgateways + singular: konnecteventgateway + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Konnect ID + jsonPath: .status.id + name: ID + type: string + - description: The Resource is Programmed on Konnect + jsonPath: .status.conditions[?(@.type=='Programmed')].status + name: Programmed + type: string + - description: Konnect Organization ID this resource belongs to. + jsonPath: .status.organizationID + name: OrgID + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: KonnectEventGateway is the Schema for the konnecteventgateways API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: KonnectEventGatewaySpec defines the desired state of KonnectEventGateway. + properties: + apiSpec: + description: APISpec defines the desired state of the resource's API spec fields. + properties: + description: + description: A human-readable description of the Gateway. + maxLength: 512 + type: string + labels: + additionalProperties: + description: LabelsValue is the value type for Labels. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$ + type: string + description: |- + Labels store metadata of an entity that can be used for filtering an entity + list or for searching across entity types. + + Keys must be of length 1-63 characters, and cannot start with "kong", + "konnect", "mesh", "kic", or "_". + type: object + min_runtime_version: + description: |- + The minimum runtime version supported by the API. + This is the lowest version of the data plane + release that can be used with the entity model. + When not specified, the minimum runtime version will be pinned to the latest + available release. + maxLength: 253 + pattern: ^\d+\.\d+$ + type: string + name: + description: The name of the Gateway. + maxLength: 255 + minLength: 1 + type: string + required: + - name + type: object + konnect: + description: KonnectConfiguration is the Konnect configuration for this entity. + properties: + authRef: + description: |- + APIAuthConfigurationRef is the reference to the API Auth Configuration + that should be used for this Konnect Configuration. + properties: + name: + description: Name is the name of the KonnectAPIAuthConfiguration resource. + minLength: 1 + type: string + required: + - name + type: object + required: + - authRef + type: object + required: + - konnect + type: object + status: + description: KonnectEventGatewayStatus defines the observed state of KonnectEventGateway. + properties: + conditions: + description: Conditions represent the current state of the resource. + items: + description: Condition contains details for one aspect of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 8 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: |- + ID is the unique identifier of the Konnect entity as assigned by Konnect API. + If it's unset (empty string), it means the Konnect entity hasn't been created yet. + maxLength: 256 + type: string + observedGeneration: + description: ObservedGeneration is the most recent generation observed + format: int64 + type: integer + organizationID: + description: OrgID is ID of Konnect Org that this entity has been created in. + maxLength: 256 + type: string + serverURL: + description: ServerURL is the URL of the Konnect server in which the entity exists. + maxLength: 512 + type: string + type: object + required: + - metadata + type: object + served: true + storage: true + subresources: + status: {} +--- +# Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition metadata: annotations: helm.sh/resource-policy: keep @@ -68837,8 +69046,8 @@ rules: - konnectcloudgatewaydataplanegroupconfigurations - konnectcloudgatewaynetworks - konnectcloudgatewaytransitgateways - - konnecteventcontrolplanes - konnecteventdataplanecertificates + - konnecteventgateways - portalpages - portals - portalteams @@ -68861,10 +69070,10 @@ rules: - konnectcloudgatewaynetworks/status - konnectcloudgatewaytransitgateways/finalizers - konnectcloudgatewaytransitgateways/status - - konnecteventcontrolplanes/finalizers - - konnecteventcontrolplanes/status - konnecteventdataplanecertificates/finalizers - konnecteventdataplanecertificates/status + - konnecteventgateways/finalizers + - konnecteventgateways/status - konnectextensions/finalizers - konnectextensions/status - konnectgatewaycontrolplanes/finalizers @@ -68879,6 +69088,14 @@ rules: verbs: - patch - update +- apiGroups: + - konnect.konghq.com + resources: + - konnecteventcontrolplanes + verbs: + - get + - list + - watch - apiGroups: - konnect.konghq.com resources: diff --git a/charts/kong-operator/ci/__snapshots__/validating-policies-dataplane-ports-disabled.snap b/charts/kong-operator/ci/__snapshots__/validating-policies-dataplane-ports-disabled.snap index 5668880657..4913a519f8 100644 --- a/charts/kong-operator/ci/__snapshots__/validating-policies-dataplane-ports-disabled.snap +++ b/charts/kong-operator/ci/__snapshots__/validating-policies-dataplane-ports-disabled.snap @@ -65756,6 +65756,215 @@ spec: # Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + kubernetes-configuration.konghq.com/channels: kong-operator + kubernetes-configuration.konghq.com/version: v2.1.0 + name: konnecteventgateways.konnect.konghq.com +spec: + group: konnect.konghq.com + names: + kind: KonnectEventGateway + listKind: KonnectEventGatewayList + plural: konnecteventgateways + singular: konnecteventgateway + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Konnect ID + jsonPath: .status.id + name: ID + type: string + - description: The Resource is Programmed on Konnect + jsonPath: .status.conditions[?(@.type=='Programmed')].status + name: Programmed + type: string + - description: Konnect Organization ID this resource belongs to. + jsonPath: .status.organizationID + name: OrgID + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: KonnectEventGateway is the Schema for the konnecteventgateways API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: KonnectEventGatewaySpec defines the desired state of KonnectEventGateway. + properties: + apiSpec: + description: APISpec defines the desired state of the resource's API spec fields. + properties: + description: + description: A human-readable description of the Gateway. + maxLength: 512 + type: string + labels: + additionalProperties: + description: LabelsValue is the value type for Labels. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$ + type: string + description: |- + Labels store metadata of an entity that can be used for filtering an entity + list or for searching across entity types. + + Keys must be of length 1-63 characters, and cannot start with "kong", + "konnect", "mesh", "kic", or "_". + type: object + min_runtime_version: + description: |- + The minimum runtime version supported by the API. + This is the lowest version of the data plane + release that can be used with the entity model. + When not specified, the minimum runtime version will be pinned to the latest + available release. + maxLength: 253 + pattern: ^\d+\.\d+$ + type: string + name: + description: The name of the Gateway. + maxLength: 255 + minLength: 1 + type: string + required: + - name + type: object + konnect: + description: KonnectConfiguration is the Konnect configuration for this entity. + properties: + authRef: + description: |- + APIAuthConfigurationRef is the reference to the API Auth Configuration + that should be used for this Konnect Configuration. + properties: + name: + description: Name is the name of the KonnectAPIAuthConfiguration resource. + minLength: 1 + type: string + required: + - name + type: object + required: + - authRef + type: object + required: + - konnect + type: object + status: + description: KonnectEventGatewayStatus defines the observed state of KonnectEventGateway. + properties: + conditions: + description: Conditions represent the current state of the resource. + items: + description: Condition contains details for one aspect of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 8 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: |- + ID is the unique identifier of the Konnect entity as assigned by Konnect API. + If it's unset (empty string), it means the Konnect entity hasn't been created yet. + maxLength: 256 + type: string + observedGeneration: + description: ObservedGeneration is the most recent generation observed + format: int64 + type: integer + organizationID: + description: OrgID is ID of Konnect Org that this entity has been created in. + maxLength: 256 + type: string + serverURL: + description: ServerURL is the URL of the Konnect server in which the entity exists. + maxLength: 512 + type: string + type: object + required: + - metadata + type: object + served: true + storage: true + subresources: + status: {} +--- +# Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition metadata: annotations: helm.sh/resource-policy: keep @@ -68837,8 +69046,8 @@ rules: - konnectcloudgatewaydataplanegroupconfigurations - konnectcloudgatewaynetworks - konnectcloudgatewaytransitgateways - - konnecteventcontrolplanes - konnecteventdataplanecertificates + - konnecteventgateways - portalpages - portals - portalteams @@ -68861,10 +69070,10 @@ rules: - konnectcloudgatewaynetworks/status - konnectcloudgatewaytransitgateways/finalizers - konnectcloudgatewaytransitgateways/status - - konnecteventcontrolplanes/finalizers - - konnecteventcontrolplanes/status - konnecteventdataplanecertificates/finalizers - konnecteventdataplanecertificates/status + - konnecteventgateways/finalizers + - konnecteventgateways/status - konnectextensions/finalizers - konnectextensions/status - konnectgatewaycontrolplanes/finalizers @@ -68879,6 +69088,14 @@ rules: verbs: - patch - update +- apiGroups: + - konnect.konghq.com + resources: + - konnecteventcontrolplanes + verbs: + - get + - list + - watch - apiGroups: - konnect.konghq.com resources: diff --git a/charts/kong-operator/ci/__snapshots__/webhook-conversion-disabled-values.snap b/charts/kong-operator/ci/__snapshots__/webhook-conversion-disabled-values.snap index ba9a2ae01c..ecdfcbcad8 100644 --- a/charts/kong-operator/ci/__snapshots__/webhook-conversion-disabled-values.snap +++ b/charts/kong-operator/ci/__snapshots__/webhook-conversion-disabled-values.snap @@ -39908,6 +39908,215 @@ spec: # Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + kubernetes-configuration.konghq.com/channels: kong-operator + kubernetes-configuration.konghq.com/version: v2.1.0 + name: konnecteventgateways.konnect.konghq.com +spec: + group: konnect.konghq.com + names: + kind: KonnectEventGateway + listKind: KonnectEventGatewayList + plural: konnecteventgateways + singular: konnecteventgateway + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Konnect ID + jsonPath: .status.id + name: ID + type: string + - description: The Resource is Programmed on Konnect + jsonPath: .status.conditions[?(@.type=='Programmed')].status + name: Programmed + type: string + - description: Konnect Organization ID this resource belongs to. + jsonPath: .status.organizationID + name: OrgID + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: KonnectEventGateway is the Schema for the konnecteventgateways API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: KonnectEventGatewaySpec defines the desired state of KonnectEventGateway. + properties: + apiSpec: + description: APISpec defines the desired state of the resource's API spec fields. + properties: + description: + description: A human-readable description of the Gateway. + maxLength: 512 + type: string + labels: + additionalProperties: + description: LabelsValue is the value type for Labels. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$ + type: string + description: |- + Labels store metadata of an entity that can be used for filtering an entity + list or for searching across entity types. + + Keys must be of length 1-63 characters, and cannot start with "kong", + "konnect", "mesh", "kic", or "_". + type: object + min_runtime_version: + description: |- + The minimum runtime version supported by the API. + This is the lowest version of the data plane + release that can be used with the entity model. + When not specified, the minimum runtime version will be pinned to the latest + available release. + maxLength: 253 + pattern: ^\d+\.\d+$ + type: string + name: + description: The name of the Gateway. + maxLength: 255 + minLength: 1 + type: string + required: + - name + type: object + konnect: + description: KonnectConfiguration is the Konnect configuration for this entity. + properties: + authRef: + description: |- + APIAuthConfigurationRef is the reference to the API Auth Configuration + that should be used for this Konnect Configuration. + properties: + name: + description: Name is the name of the KonnectAPIAuthConfiguration resource. + minLength: 1 + type: string + required: + - name + type: object + required: + - authRef + type: object + required: + - konnect + type: object + status: + description: KonnectEventGatewayStatus defines the observed state of KonnectEventGateway. + properties: + conditions: + description: Conditions represent the current state of the resource. + items: + description: Condition contains details for one aspect of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 8 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: |- + ID is the unique identifier of the Konnect entity as assigned by Konnect API. + If it's unset (empty string), it means the Konnect entity hasn't been created yet. + maxLength: 256 + type: string + observedGeneration: + description: ObservedGeneration is the most recent generation observed + format: int64 + type: integer + organizationID: + description: OrgID is ID of Konnect Org that this entity has been created in. + maxLength: 256 + type: string + serverURL: + description: ServerURL is the URL of the Konnect server in which the entity exists. + maxLength: 512 + type: string + type: object + required: + - metadata + type: object + served: true + storage: true + subresources: + status: {} +--- +# Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition metadata: annotations: helm.sh/resource-policy: keep @@ -42313,8 +42522,8 @@ rules: - konnectcloudgatewaydataplanegroupconfigurations - konnectcloudgatewaynetworks - konnectcloudgatewaytransitgateways - - konnecteventcontrolplanes - konnecteventdataplanecertificates + - konnecteventgateways - portalpages - portals - portalteams @@ -42337,10 +42546,10 @@ rules: - konnectcloudgatewaynetworks/status - konnectcloudgatewaytransitgateways/finalizers - konnectcloudgatewaytransitgateways/status - - konnecteventcontrolplanes/finalizers - - konnecteventcontrolplanes/status - konnecteventdataplanecertificates/finalizers - konnecteventdataplanecertificates/status + - konnecteventgateways/finalizers + - konnecteventgateways/status - konnectextensions/finalizers - konnectextensions/status - konnectgatewaycontrolplanes/finalizers @@ -42355,6 +42564,14 @@ rules: verbs: - patch - update +- apiGroups: + - konnect.konghq.com + resources: + - konnecteventcontrolplanes + verbs: + - get + - list + - watch - apiGroups: - konnect.konghq.com resources: diff --git a/charts/kong-operator/ci/__snapshots__/webhook-conversion-enabled-cert-manager.snap b/charts/kong-operator/ci/__snapshots__/webhook-conversion-enabled-cert-manager.snap index 0ebb1ddb0d..a437eb09a8 100644 --- a/charts/kong-operator/ci/__snapshots__/webhook-conversion-enabled-cert-manager.snap +++ b/charts/kong-operator/ci/__snapshots__/webhook-conversion-enabled-cert-manager.snap @@ -65706,6 +65706,215 @@ spec: # Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + kubernetes-configuration.konghq.com/channels: kong-operator + kubernetes-configuration.konghq.com/version: v2.1.0 + name: konnecteventgateways.konnect.konghq.com +spec: + group: konnect.konghq.com + names: + kind: KonnectEventGateway + listKind: KonnectEventGatewayList + plural: konnecteventgateways + singular: konnecteventgateway + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Konnect ID + jsonPath: .status.id + name: ID + type: string + - description: The Resource is Programmed on Konnect + jsonPath: .status.conditions[?(@.type=='Programmed')].status + name: Programmed + type: string + - description: Konnect Organization ID this resource belongs to. + jsonPath: .status.organizationID + name: OrgID + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: KonnectEventGateway is the Schema for the konnecteventgateways API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: KonnectEventGatewaySpec defines the desired state of KonnectEventGateway. + properties: + apiSpec: + description: APISpec defines the desired state of the resource's API spec fields. + properties: + description: + description: A human-readable description of the Gateway. + maxLength: 512 + type: string + labels: + additionalProperties: + description: LabelsValue is the value type for Labels. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$ + type: string + description: |- + Labels store metadata of an entity that can be used for filtering an entity + list or for searching across entity types. + + Keys must be of length 1-63 characters, and cannot start with "kong", + "konnect", "mesh", "kic", or "_". + type: object + min_runtime_version: + description: |- + The minimum runtime version supported by the API. + This is the lowest version of the data plane + release that can be used with the entity model. + When not specified, the minimum runtime version will be pinned to the latest + available release. + maxLength: 253 + pattern: ^\d+\.\d+$ + type: string + name: + description: The name of the Gateway. + maxLength: 255 + minLength: 1 + type: string + required: + - name + type: object + konnect: + description: KonnectConfiguration is the Konnect configuration for this entity. + properties: + authRef: + description: |- + APIAuthConfigurationRef is the reference to the API Auth Configuration + that should be used for this Konnect Configuration. + properties: + name: + description: Name is the name of the KonnectAPIAuthConfiguration resource. + minLength: 1 + type: string + required: + - name + type: object + required: + - authRef + type: object + required: + - konnect + type: object + status: + description: KonnectEventGatewayStatus defines the observed state of KonnectEventGateway. + properties: + conditions: + description: Conditions represent the current state of the resource. + items: + description: Condition contains details for one aspect of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 8 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: |- + ID is the unique identifier of the Konnect entity as assigned by Konnect API. + If it's unset (empty string), it means the Konnect entity hasn't been created yet. + maxLength: 256 + type: string + observedGeneration: + description: ObservedGeneration is the most recent generation observed + format: int64 + type: integer + organizationID: + description: OrgID is ID of Konnect Org that this entity has been created in. + maxLength: 256 + type: string + serverURL: + description: ServerURL is the URL of the Konnect server in which the entity exists. + maxLength: 512 + type: string + type: object + required: + - metadata + type: object + served: true + storage: true + subresources: + status: {} +--- +# Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition metadata: annotations: helm.sh/resource-policy: keep @@ -68787,8 +68996,8 @@ rules: - konnectcloudgatewaydataplanegroupconfigurations - konnectcloudgatewaynetworks - konnectcloudgatewaytransitgateways - - konnecteventcontrolplanes - konnecteventdataplanecertificates + - konnecteventgateways - portalpages - portals - portalteams @@ -68811,10 +69020,10 @@ rules: - konnectcloudgatewaynetworks/status - konnectcloudgatewaytransitgateways/finalizers - konnectcloudgatewaytransitgateways/status - - konnecteventcontrolplanes/finalizers - - konnecteventcontrolplanes/status - konnecteventdataplanecertificates/finalizers - konnecteventdataplanecertificates/status + - konnecteventgateways/finalizers + - konnecteventgateways/status - konnectextensions/finalizers - konnectextensions/status - konnectgatewaycontrolplanes/finalizers @@ -68829,6 +69038,14 @@ rules: verbs: - patch - update +- apiGroups: + - konnect.konghq.com + resources: + - konnecteventcontrolplanes + verbs: + - get + - list + - watch - apiGroups: - konnect.konghq.com resources: diff --git a/charts/kong-operator/ci/__snapshots__/webhooks-validating-and-conversion-disabled-values.snap b/charts/kong-operator/ci/__snapshots__/webhooks-validating-and-conversion-disabled-values.snap index db0315eb18..4121b53b3a 100644 --- a/charts/kong-operator/ci/__snapshots__/webhooks-validating-and-conversion-disabled-values.snap +++ b/charts/kong-operator/ci/__snapshots__/webhooks-validating-and-conversion-disabled-values.snap @@ -39883,6 +39883,215 @@ spec: # Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition +metadata: + annotations: + helm.sh/resource-policy: keep + kubernetes-configuration.konghq.com/channels: kong-operator + kubernetes-configuration.konghq.com/version: v2.1.0 + name: konnecteventgateways.konnect.konghq.com +spec: + group: konnect.konghq.com + names: + kind: KonnectEventGateway + listKind: KonnectEventGatewayList + plural: konnecteventgateways + singular: konnecteventgateway + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Konnect ID + jsonPath: .status.id + name: ID + type: string + - description: The Resource is Programmed on Konnect + jsonPath: .status.conditions[?(@.type=='Programmed')].status + name: Programmed + type: string + - description: Konnect Organization ID this resource belongs to. + jsonPath: .status.organizationID + name: OrgID + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: KonnectEventGateway is the Schema for the konnecteventgateways API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: KonnectEventGatewaySpec defines the desired state of KonnectEventGateway. + properties: + apiSpec: + description: APISpec defines the desired state of the resource's API spec fields. + properties: + description: + description: A human-readable description of the Gateway. + maxLength: 512 + type: string + labels: + additionalProperties: + description: LabelsValue is the value type for Labels. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$ + type: string + description: |- + Labels store metadata of an entity that can be used for filtering an entity + list or for searching across entity types. + + Keys must be of length 1-63 characters, and cannot start with "kong", + "konnect", "mesh", "kic", or "_". + type: object + min_runtime_version: + description: |- + The minimum runtime version supported by the API. + This is the lowest version of the data plane + release that can be used with the entity model. + When not specified, the minimum runtime version will be pinned to the latest + available release. + maxLength: 253 + pattern: ^\d+\.\d+$ + type: string + name: + description: The name of the Gateway. + maxLength: 255 + minLength: 1 + type: string + required: + - name + type: object + konnect: + description: KonnectConfiguration is the Konnect configuration for this entity. + properties: + authRef: + description: |- + APIAuthConfigurationRef is the reference to the API Auth Configuration + that should be used for this Konnect Configuration. + properties: + name: + description: Name is the name of the KonnectAPIAuthConfiguration resource. + minLength: 1 + type: string + required: + - name + type: object + required: + - authRef + type: object + required: + - konnect + type: object + status: + description: KonnectEventGatewayStatus defines the observed state of KonnectEventGateway. + properties: + conditions: + description: Conditions represent the current state of the resource. + items: + description: Condition contains details for one aspect of the current state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 8 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: |- + ID is the unique identifier of the Konnect entity as assigned by Konnect API. + If it's unset (empty string), it means the Konnect entity hasn't been created yet. + maxLength: 256 + type: string + observedGeneration: + description: ObservedGeneration is the most recent generation observed + format: int64 + type: integer + organizationID: + description: OrgID is ID of Konnect Org that this entity has been created in. + maxLength: 256 + type: string + serverURL: + description: ServerURL is the URL of the Konnect server in which the entity exists. + maxLength: 512 + type: string + type: object + required: + - metadata + type: object + served: true + storage: true + subresources: + status: {} +--- +# Source: kong-operator/charts/ko-crds/templates/ko-crds.yaml +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition metadata: annotations: helm.sh/resource-policy: keep @@ -42288,8 +42497,8 @@ rules: - konnectcloudgatewaydataplanegroupconfigurations - konnectcloudgatewaynetworks - konnectcloudgatewaytransitgateways - - konnecteventcontrolplanes - konnecteventdataplanecertificates + - konnecteventgateways - portalpages - portals - portalteams @@ -42312,10 +42521,10 @@ rules: - konnectcloudgatewaynetworks/status - konnectcloudgatewaytransitgateways/finalizers - konnectcloudgatewaytransitgateways/status - - konnecteventcontrolplanes/finalizers - - konnecteventcontrolplanes/status - konnecteventdataplanecertificates/finalizers - konnecteventdataplanecertificates/status + - konnecteventgateways/finalizers + - konnecteventgateways/status - konnectextensions/finalizers - konnectextensions/status - konnectgatewaycontrolplanes/finalizers @@ -42330,6 +42539,14 @@ rules: verbs: - patch - update +- apiGroups: + - konnect.konghq.com + resources: + - konnecteventcontrolplanes + verbs: + - get + - list + - watch - apiGroups: - konnect.konghq.com resources: diff --git a/charts/kong-operator/templates/cluster-role.yaml b/charts/kong-operator/templates/cluster-role.yaml index c2f87cfe03..4c8a56f354 100644 --- a/charts/kong-operator/templates/cluster-role.yaml +++ b/charts/kong-operator/templates/cluster-role.yaml @@ -440,8 +440,8 @@ rules: - konnectcloudgatewaydataplanegroupconfigurations - konnectcloudgatewaynetworks - konnectcloudgatewaytransitgateways - - konnecteventcontrolplanes - konnecteventdataplanecertificates + - konnecteventgateways - portalpages - portals - portalteams @@ -464,10 +464,10 @@ rules: - konnectcloudgatewaynetworks/status - konnectcloudgatewaytransitgateways/finalizers - konnectcloudgatewaytransitgateways/status - - konnecteventcontrolplanes/finalizers - - konnecteventcontrolplanes/status - konnecteventdataplanecertificates/finalizers - konnecteventdataplanecertificates/status + - konnecteventgateways/finalizers + - konnecteventgateways/status - konnectextensions/finalizers - konnectextensions/status - konnectgatewaycontrolplanes/finalizers @@ -482,6 +482,14 @@ rules: verbs: - patch - update + - apiGroups: + - konnect.konghq.com + resources: + - konnecteventcontrolplanes + verbs: + - get + - list + - watch - apiGroups: - konnect.konghq.com resources: diff --git a/config/crd/kong-operator/konnect.konghq.com_konnecteventgateways.yaml b/config/crd/kong-operator/konnect.konghq.com_konnecteventgateways.yaml new file mode 100644 index 0000000000..b0a97ea265 --- /dev/null +++ b/config/crd/kong-operator/konnect.konghq.com_konnecteventgateways.yaml @@ -0,0 +1,214 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + kubernetes-configuration.konghq.com/channels: kong-operator + kubernetes-configuration.konghq.com/version: v2.1.0 + name: konnecteventgateways.konnect.konghq.com +spec: + group: konnect.konghq.com + names: + kind: KonnectEventGateway + listKind: KonnectEventGatewayList + plural: konnecteventgateways + singular: konnecteventgateway + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Konnect ID + jsonPath: .status.id + name: ID + type: string + - description: The Resource is Programmed on Konnect + jsonPath: .status.conditions[?(@.type=='Programmed')].status + name: Programmed + type: string + - description: Konnect Organization ID this resource belongs to. + jsonPath: .status.organizationID + name: OrgID + type: string + - jsonPath: .metadata.creationTimestamp + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + description: KonnectEventGateway is the Schema for the konnecteventgateways + API. + properties: + apiVersion: + description: |- + APIVersion defines the versioned schema of this representation of an object. + Servers should convert recognized schemas to the latest internal value, and + may reject unrecognized values. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources + type: string + kind: + description: |- + Kind is a string value representing the REST resource this object represents. + Servers may infer this from the endpoint the client submits requests to. + Cannot be updated. + In CamelCase. + More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds + type: string + metadata: + type: object + spec: + description: KonnectEventGatewaySpec defines the desired state of KonnectEventGateway. + properties: + apiSpec: + description: APISpec defines the desired state of the resource's API + spec fields. + properties: + description: + description: A human-readable description of the Gateway. + maxLength: 512 + type: string + labels: + additionalProperties: + description: LabelsValue is the value type for Labels. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9A-Z]{1}([a-z0-9A-Z-._]*[a-z0-9A-Z]+)?$ + type: string + description: |- + Labels store metadata of an entity that can be used for filtering an entity + list or for searching across entity types. + + Keys must be of length 1-63 characters, and cannot start with "kong", + "konnect", "mesh", "kic", or "_". + type: object + min_runtime_version: + description: |- + The minimum runtime version supported by the API. + This is the lowest version of the data plane + release that can be used with the entity model. + When not specified, the minimum runtime version will be pinned to the latest + available release. + maxLength: 253 + pattern: ^\d+\.\d+$ + type: string + name: + description: The name of the Gateway. + maxLength: 255 + minLength: 1 + type: string + required: + - name + type: object + konnect: + description: KonnectConfiguration is the Konnect configuration for + this entity. + properties: + authRef: + description: |- + APIAuthConfigurationRef is the reference to the API Auth Configuration + that should be used for this Konnect Configuration. + properties: + name: + description: Name is the name of the KonnectAPIAuthConfiguration + resource. + minLength: 1 + type: string + required: + - name + type: object + required: + - authRef + type: object + required: + - konnect + type: object + status: + description: KonnectEventGatewayStatus defines the observed state of KonnectEventGateway. + properties: + conditions: + description: Conditions represent the current state of the resource. + items: + description: Condition contains details for one aspect of the current + state of this API Resource. + properties: + lastTransitionTime: + description: |- + lastTransitionTime is the last time the condition transitioned from one status to another. + This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: |- + message is a human readable message indicating details about the transition. + This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: |- + observedGeneration represents the .metadata.generation that the condition was set based upon. + For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date + with respect to the current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: |- + reason contains a programmatic identifier indicating the reason for the condition's last transition. + Producers of specific condition types may define expected values and meanings for this field, + and whether the values are considered a guaranteed API. + The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + maxItems: 8 + type: array + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + id: + description: |- + ID is the unique identifier of the Konnect entity as assigned by Konnect API. + If it's unset (empty string), it means the Konnect entity hasn't been created yet. + maxLength: 256 + type: string + observedGeneration: + description: ObservedGeneration is the most recent generation observed + format: int64 + type: integer + organizationID: + description: OrgID is ID of Konnect Org that this entity has been + created in. + maxLength: 256 + type: string + serverURL: + description: ServerURL is the URL of the Konnect server in which the + entity exists. + maxLength: 512 + type: string + type: object + required: + - metadata + type: object + served: true + storage: true + subresources: + status: {} diff --git a/config/crd/kong-operator/kustomization.yaml b/config/crd/kong-operator/kustomization.yaml index e8650874f1..6439aa84ae 100644 --- a/config/crd/kong-operator/kustomization.yaml +++ b/config/crd/kong-operator/kustomization.yaml @@ -43,6 +43,7 @@ resources: - konnect.konghq.com_konnectcloudgatewaytransitgateways.yaml - konnect.konghq.com_konnecteventcontrolplanes.yaml - konnect.konghq.com_konnecteventdataplanecertificates.yaml + - konnect.konghq.com_konnecteventgateways.yaml - konnect.konghq.com_konnectextensions.yaml - konnect.konghq.com_konnectgatewaycontrolplanes.yaml - konnect.konghq.com_mcpservers.yaml diff --git a/config/rbac/role/role.yaml b/config/rbac/role/role.yaml index 7643a72b22..ca4d10eab0 100644 --- a/config/rbac/role/role.yaml +++ b/config/rbac/role/role.yaml @@ -440,8 +440,8 @@ rules: - konnectcloudgatewaydataplanegroupconfigurations - konnectcloudgatewaynetworks - konnectcloudgatewaytransitgateways - - konnecteventcontrolplanes - konnecteventdataplanecertificates + - konnecteventgateways - portalpages - portals - portalteams @@ -464,10 +464,10 @@ rules: - konnectcloudgatewaynetworks/status - konnectcloudgatewaytransitgateways/finalizers - konnectcloudgatewaytransitgateways/status - - konnecteventcontrolplanes/finalizers - - konnecteventcontrolplanes/status - konnecteventdataplanecertificates/finalizers - konnecteventdataplanecertificates/status + - konnecteventgateways/finalizers + - konnecteventgateways/status - konnectextensions/finalizers - konnectextensions/status - konnectgatewaycontrolplanes/finalizers @@ -482,6 +482,14 @@ rules: verbs: - patch - update +- apiGroups: + - konnect.konghq.com + resources: + - konnecteventcontrolplanes + verbs: + - get + - list + - watch - apiGroups: - konnect.konghq.com resources: diff --git a/config/samples/konnect_eventcontrolplane.yaml b/config/samples/konnect_eventgateway.yaml similarity index 95% rename from config/samples/konnect_eventcontrolplane.yaml rename to config/samples/konnect_eventgateway.yaml index efd2ff0add..e5139e1953 100644 --- a/config/samples/konnect_eventcontrolplane.yaml +++ b/config/samples/konnect_eventgateway.yaml @@ -9,7 +9,7 @@ spec: # For a complete list of available API URLs see:https://docs.konghq.com/konnect/network/#kong-gateway-hostnames serverURL: eu.api.konghq.com --- -kind: KonnectEventControlPlane +kind: KonnectEventGateway apiVersion: konnect.konghq.com/v1alpha1 metadata: name: cp-event-1 diff --git a/controller/eventgateway/dataplane/controller.go b/controller/eventgateway/dataplane/controller.go index 3cde1f864f..651759262b 100644 --- a/controller/eventgateway/dataplane/controller.go +++ b/controller/eventgateway/dataplane/controller.go @@ -76,7 +76,7 @@ func (r *Reconciler) SetupWithManager(ctx context.Context, mgr ctrl.Manager) err Owns(&corev1.Secret{}). Owns(&konnectv1alpha1.KonnectEventDataPlaneCertificate{}). Watches( - &konnectv1alpha1.KonnectEventControlPlane{}, + &konnectv1alpha1.KonnectEventGateway{}, handler.EnqueueRequestsFromMapFunc(enqueueForKonnectEventGatewayRef(mgr.GetClient())), ). Complete(r) @@ -95,7 +95,7 @@ func (r *Reconciler) Reconcile(ctx context.Context, req ctrl.Request) (res ctrl. defer func() { err = errors.Join(err, r.applyStatus(ctx, logger, egdp)) }() - // Resolve referenced KonnectEventControlPlane and set resolution condition. + // Resolve referenced KonnectEventGateway and set resolution condition. keg, err := r.resolveKonnectEventGateway(ctx, logger, egdp) if err != nil { return ctrl.Result{}, err diff --git a/controller/eventgateway/dataplane/controller_test.go b/controller/eventgateway/dataplane/controller_test.go index ecaff87fcf..301aa9acd2 100644 --- a/controller/eventgateway/dataplane/controller_test.go +++ b/controller/eventgateway/dataplane/controller_test.go @@ -77,14 +77,14 @@ func newReconcileEGDP() *eventgatewayv1alpha1.KegDataPlane { } } -// newProgrammedKEG builds a KonnectEventControlPlane with Programmed=True. -func newProgrammedKEG() *konnectv1alpha1.KonnectEventControlPlane { - return &konnectv1alpha1.KonnectEventControlPlane{ +// newProgrammedKEG builds a KonnectEventGateway with Programmed=True. +func newProgrammedKEG() *konnectv1alpha1.KonnectEventGateway { + return &konnectv1alpha1.KonnectEventGateway{ ObjectMeta: metav1.ObjectMeta{ Namespace: reconcileTestNS, Name: reconcileTestKEGName, }, - Status: konnectv1alpha1.KonnectEventControlPlaneStatus{ + Status: konnectv1alpha1.KonnectEventGatewayStatus{ Conditions: []metav1.Condition{ { Type: konnectv1alpha1.KonnectEntityProgrammedConditionType, @@ -101,8 +101,8 @@ func newProgrammedKEG() *konnectv1alpha1.KonnectEventControlPlane { } } -// newNotProgrammedKEG builds a KonnectEventControlPlane with Programmed=False. -func newNotProgrammedKEG() *konnectv1alpha1.KonnectEventControlPlane { +// newNotProgrammedKEG builds a KonnectEventGateway with Programmed=False. +func newNotProgrammedKEG() *konnectv1alpha1.KonnectEventGateway { keg := newProgrammedKEG() keg.Status.Conditions[0].Status = metav1.ConditionFalse return keg @@ -223,7 +223,7 @@ func TestReconciler_Reconcile(t *testing.T) { wantResult: ctrl.Result{}, }, { - name: "KonnectEventControlPlane not found: error returned (runtime handles backoff), KonnectResolved=False", + name: "KonnectEventGateway not found: error returned (runtime handles backoff), KonnectResolved=False", objects: []client.Object{ newReconcileEGDP(), caSecret(), @@ -241,7 +241,7 @@ func TestReconciler_Reconcile(t *testing.T) { }, }, { - name: "KonnectEventControlPlane not yet programmed: error returned (runtime handles backoff), KonnectResolved=False", + name: "KonnectEventGateway not yet programmed: error returned (runtime handles backoff), KonnectResolved=False", objects: []client.Object{ newReconcileEGDP(), newNotProgrammedKEG(), diff --git a/controller/eventgateway/dataplane/owned_deployment.go b/controller/eventgateway/dataplane/owned_deployment.go index 45ec62acca..c489515c0c 100644 --- a/controller/eventgateway/dataplane/owned_deployment.go +++ b/controller/eventgateway/dataplane/owned_deployment.go @@ -47,7 +47,7 @@ func (r *Reconciler) ensureDeployment( ctx context.Context, logger logr.Logger, egdp *eventgatewayv1alpha1.KegDataPlane, - keg *konnectv1alpha1.KonnectEventControlPlane, + keg *konnectv1alpha1.KonnectEventGateway, certSecretName string, ) error { image := resolveImage(egdp, consts.DefaultKEGImage) @@ -102,7 +102,7 @@ func resolveImage(egdp *eventgatewayv1alpha1.KegDataPlane, defaultImage string) func buildDeployment( tc managedfields.TypeConverter, egdp *eventgatewayv1alpha1.KegDataPlane, - keg *konnectv1alpha1.KonnectEventControlPlane, + keg *konnectv1alpha1.KonnectEventGateway, image string, certSecretName string, ) (*unstructured.Unstructured, error) { @@ -156,7 +156,7 @@ func buildDeployment( // generateBaseDeployment creates the operator-managed keg Deployment without user overlays. func generateBaseDeployment( egdp *eventgatewayv1alpha1.KegDataPlane, - keg *konnectv1alpha1.KonnectEventControlPlane, + keg *konnectv1alpha1.KonnectEventGateway, image string, certSecretName string, ) (*appsv1.Deployment, error) { @@ -283,9 +283,9 @@ func generateBaseDeployment( // KonnectEventGateway status and DataPlane spec.config. func buildKEGEnvVars( egdp *eventgatewayv1alpha1.KegDataPlane, - keg *konnectv1alpha1.KonnectEventControlPlane, + keg *konnectv1alpha1.KonnectEventGateway, ) ([]corev1.EnvVar, error) { - srv, err := server.NewServer[konnectv1alpha1.KonnectEventControlPlane](keg.Status.ServerURL) + srv, err := server.NewServer[konnectv1alpha1.KonnectEventGateway](keg.Status.ServerURL) if err != nil { return nil, fmt.Errorf("failed to parse Konnect server URL %q: %w", keg.Status.ServerURL, err) } diff --git a/controller/eventgateway/dataplane/owned_deployment_test.go b/controller/eventgateway/dataplane/owned_deployment_test.go index 0d6c66deb9..994611903f 100644 --- a/controller/eventgateway/dataplane/owned_deployment_test.go +++ b/controller/eventgateway/dataplane/owned_deployment_test.go @@ -29,9 +29,9 @@ import ( // helpers // ----------------------------------------------------------------- -// testKeg returns a minimal KonnectEventControlPlane with the given server URL and ID. -func testKeg(serverURL, id string) *konnectv1alpha1.KonnectEventControlPlane { - keg := &konnectv1alpha1.KonnectEventControlPlane{} +// testKeg returns a minimal KonnectEventGateway with the given server URL and ID. +func testKeg(serverURL, id string) *konnectv1alpha1.KonnectEventGateway { + keg := &konnectv1alpha1.KonnectEventGateway{} keg.Status.ServerURL = serverURL keg.Status.ID = id return keg @@ -152,7 +152,7 @@ func Test_buildKEGEnvVars(t *testing.T) { tests := []struct { name string egdp *eventgatewayv1alpha1.KegDataPlane - keg *konnectv1alpha1.KonnectEventControlPlane + keg *konnectv1alpha1.KonnectEventGateway wantErr bool // checkEnvs is called with the resulting env slice when wantErr is false. checkEnvs func(t *testing.T, envs []corev1.EnvVar) @@ -361,19 +361,19 @@ func Test_buildKEGEnvVars(t *testing.T) { func Test_buildDeployment(t *testing.T) { tc := managedfields.NewDeducedTypeConverter() - validKeg := &konnectv1alpha1.KonnectEventControlPlane{} + validKeg := &konnectv1alpha1.KonnectEventGateway{} validKeg.Status.KonnectEntityStatus = konnectv1alpha2.KonnectEntityStatus{ ServerURL: "https://us.api.konghq.com", ID: "gw-id", } - invalidKeg := &konnectv1alpha1.KonnectEventControlPlane{} + invalidKeg := &konnectv1alpha1.KonnectEventGateway{} invalidKeg.Status.ServerURL = "invalid-region.example.com" tests := []struct { name string egdp *eventgatewayv1alpha1.KegDataPlane - keg *konnectv1alpha1.KonnectEventControlPlane + keg *konnectv1alpha1.KonnectEventGateway image string certSecretName string wantErr bool @@ -491,7 +491,7 @@ func Test_ensureDeployment(t *testing.T) { tc := managedfields.NewDeducedTypeConverter() scheme := managerscheme.Get() - validKeg := &konnectv1alpha1.KonnectEventControlPlane{ + validKeg := &konnectv1alpha1.KonnectEventGateway{ ObjectMeta: metav1.ObjectMeta{Namespace: ns, Name: "my-keg"}, } validKeg.Status.KonnectEntityStatus = konnectv1alpha2.KonnectEntityStatus{ diff --git a/controller/eventgateway/dataplane/owned_konnect_cert.go b/controller/eventgateway/dataplane/owned_konnect_cert.go index e17edd9eb4..3399f97a05 100644 --- a/controller/eventgateway/dataplane/owned_konnect_cert.go +++ b/controller/eventgateway/dataplane/owned_konnect_cert.go @@ -37,12 +37,12 @@ import ( // ensureKonnectCertificate ensures a KonnectEventDataPlaneCertificate resource // exists for the given DataPlane, referencing the provisioned mTLS Secret and the -// resolved KonnectEventControlPlane's Konnect ID. +// resolved KonnectEventGateway's Konnect ID. func (r *Reconciler) ensureKonnectCertificate( ctx context.Context, logger logr.Logger, egdp *eventgatewayv1alpha1.KegDataPlane, - keg *konnectv1alpha1.KonnectEventControlPlane, + keg *konnectv1alpha1.KonnectEventGateway, certSecret *corev1.Secret, ) (programmed bool, err error) { secretRefType := konnectv1alpha1.SensitiveDataSourceTypeSecretRef diff --git a/controller/eventgateway/dataplane/owned_konnect_cert_test.go b/controller/eventgateway/dataplane/owned_konnect_cert_test.go index b4cc3a86b3..9df16e611b 100644 --- a/controller/eventgateway/dataplane/owned_konnect_cert_test.go +++ b/controller/eventgateway/dataplane/owned_konnect_cert_test.go @@ -61,13 +61,13 @@ func newTestEGDP() *eventgatewayv1alpha1.KegDataPlane { } } -func newTestKEG() *konnectv1alpha1.KonnectEventControlPlane { - return &konnectv1alpha1.KonnectEventControlPlane{ +func newTestKEG() *konnectv1alpha1.KonnectEventGateway { + return &konnectv1alpha1.KonnectEventGateway{ ObjectMeta: metav1.ObjectMeta{ Name: "test-keg", Namespace: "default", }, - Status: konnectv1alpha1.KonnectEventControlPlaneStatus{ + Status: konnectv1alpha1.KonnectEventGatewayStatus{ Conditions: []metav1.Condition{ { Type: konnectv1alpha1.KonnectEntityProgrammedConditionType, diff --git a/controller/eventgateway/dataplane/resolve_konnect.go b/controller/eventgateway/dataplane/resolve_konnect.go index f4a9f76003..64b27d33bc 100644 --- a/controller/eventgateway/dataplane/resolve_konnect.go +++ b/controller/eventgateway/dataplane/resolve_konnect.go @@ -38,8 +38,8 @@ func (r *Reconciler) resolveKonnectEventGateway( ctx context.Context, logger logr.Logger, egdp *eventgatewayv1alpha1.KegDataPlane, -) (*konnectv1alpha1.KonnectEventControlPlane, error) { - keg := &konnectv1alpha1.KonnectEventControlPlane{} +) (*konnectv1alpha1.KonnectEventGateway, error) { + keg := &konnectv1alpha1.KonnectEventGateway{} err := r.Get(ctx, types.NamespacedName{ Name: egdp.Spec.ControlPlaneRef.KonnectNamespacedRef.Name, Namespace: egdp.Namespace, @@ -76,7 +76,7 @@ func (r *Reconciler) resolveKonnectEventGateway( ObservedGeneration: egdp.Generation, }) - return nil, fmt.Errorf("referenced KonnectEventControlPlane %q is not yet Programmed", + return nil, fmt.Errorf("referenced KonnectEventGateway %q is not yet Programmed", egdp.Spec.ControlPlaneRef.KonnectNamespacedRef.Name) } diff --git a/controller/eventgateway/dataplane/resolve_konnect_test.go b/controller/eventgateway/dataplane/resolve_konnect_test.go index 359ef312d2..6974b9e9e2 100644 --- a/controller/eventgateway/dataplane/resolve_konnect_test.go +++ b/controller/eventgateway/dataplane/resolve_konnect_test.go @@ -19,10 +19,10 @@ import ( managerscheme "github.com/kong/kong-operator/v2/modules/manager/scheme" ) -func newKeg(ns, name string, programmed metav1.ConditionStatus) *konnectv1alpha1.KonnectEventControlPlane { - return &konnectv1alpha1.KonnectEventControlPlane{ +func newKeg(ns, name string, programmed metav1.ConditionStatus) *konnectv1alpha1.KonnectEventGateway { + return &konnectv1alpha1.KonnectEventGateway{ ObjectMeta: metav1.ObjectMeta{Namespace: ns, Name: name}, - Status: konnectv1alpha1.KonnectEventControlPlaneStatus{ + Status: konnectv1alpha1.KonnectEventGatewayStatus{ Conditions: []metav1.Condition{ { Type: konnectv1alpha1.KonnectEntityProgrammedConditionType, @@ -58,7 +58,7 @@ func Test_resolveKonnectEventGateway(t *testing.T) { tests := []struct { name string // nil = not in cluster - keg *konnectv1alpha1.KonnectEventControlPlane + keg *konnectv1alpha1.KonnectEventGateway getErr error // non-nil injects a GET error via interceptor wantKeg bool wantErr bool diff --git a/controller/eventgateway/dataplane/watch.go b/controller/eventgateway/dataplane/watch.go index 750e675a70..5364129fe8 100644 --- a/controller/eventgateway/dataplane/watch.go +++ b/controller/eventgateway/dataplane/watch.go @@ -33,7 +33,7 @@ import ( // spec.konnectEventGatewayRef.name matches the changed KonnectEventGateway. func enqueueForKonnectEventGatewayRef(cl client.Client) handler.MapFunc { return func(ctx context.Context, obj client.Object) []reconcile.Request { - keg, ok := obj.(*konnectv1alpha1.KonnectEventControlPlane) + keg, ok := obj.(*konnectv1alpha1.KonnectEventGateway) if !ok { return nil } diff --git a/controller/eventgateway/dataplane/watch_test.go b/controller/eventgateway/dataplane/watch_test.go index d787be05ad..a2ce5d17aa 100644 --- a/controller/eventgateway/dataplane/watch_test.go +++ b/controller/eventgateway/dataplane/watch_test.go @@ -30,7 +30,7 @@ func Test_enqueueForKonnectEventGatewayRef(t *testing.T) { kegName = "my-keg" ) - keg := &konnectv1alpha1.KonnectEventControlPlane{ + keg := &konnectv1alpha1.KonnectEventGateway{ ObjectMeta: metav1.ObjectMeta{Namespace: ns, Name: kegName}, } diff --git a/controller/konnect/constraints/constraints.go b/controller/konnect/constraints/constraints.go index 484820923c..3238d5158c 100644 --- a/controller/konnect/constraints/constraints.go +++ b/controller/konnect/constraints/constraints.go @@ -62,7 +62,7 @@ type SupportedKonnectEntityType interface { konnectv1alpha1.MCPServer | // TODO: auto-generate SupportedKonnectEntityType entries for generated Konnect entities. // https://github.com/Kong/kong-operator/issues/3785 - konnectv1alpha1.KonnectEventControlPlane | + konnectv1alpha1.KonnectEventGateway | konnectv1alpha1.KonnectEventDataPlaneCertificate | konnectv1alpha1.Portal | konnectv1alpha1.PortalPage | diff --git a/controller/konnect/ops/ops.go b/controller/konnect/ops/ops.go index 24b81694f9..0330d584e5 100644 --- a/controller/konnect/ops/ops.go +++ b/controller/konnect/ops/ops.go @@ -76,8 +76,8 @@ func Create[ err = createKonnectTransitGateway(ctx, sdk.GetCloudGatewaysSDK(), ent) // TODO: auto-generate ops entries for generated Konnect entities. // https://github.com/Kong/kong-operator/issues/3785 - case *konnectv1alpha1.KonnectEventControlPlane: - err = createKonnectEventControlPlane(ctx, sdk.GetEventGatewaysSDK(), ent) + case *konnectv1alpha1.KonnectEventGateway: + err = createKonnectEventGateway(ctx, sdk.GetEventGatewaysSDK(), ent) case *configurationv1alpha1.KongService: err = createService(ctx, sdk.GetServicesSDK(), ent) case *configurationv1alpha1.KongRoute: @@ -148,8 +148,8 @@ func Create[ id, err = getKonnectTransitGatewayMatchingSpecName(ctx, sdk.GetCloudGatewaysSDK(), ent) // TODO: auto-generate ops entries for generated Konnect entities. // https://github.com/Kong/kong-operator/issues/3785 - case *konnectv1alpha1.KonnectEventControlPlane: - id, errGet = getKonnectEventControlPlaneForUID(ctx, sdk.GetEventGatewaysSDK(), ent) + case *konnectv1alpha1.KonnectEventGateway: + id, errGet = getKonnectEventGatewayForUID(ctx, sdk.GetEventGatewaysSDK(), ent) case *konnectv1alpha1.KonnectEventDataPlaneCertificate: id, errGet = getKonnectEventDataPlaneCertificateForUID(ctx, sdk.GetEventGatewayDataPlaneCertificatesSDK(), ent) case *configurationv1alpha1.KongService: @@ -298,8 +298,8 @@ func Delete[ err = deleteKonnectTransitGateway(ctx, sdk.GetCloudGatewaysSDK(), e) // TODO: auto-generate ops entries for generated Konnect entities. // https://github.com/Kong/kong-operator/issues/3785 - case *konnectv1alpha1.KonnectEventControlPlane: - err = deleteKonnectEventControlPlane(ctx, sdk.GetEventGatewaysSDK(), e) + case *konnectv1alpha1.KonnectEventGateway: + err = deleteKonnectEventGateway(ctx, sdk.GetEventGatewaysSDK(), e) case *configurationv1alpha1.KongService: err = deleteService(ctx, sdk.GetServicesSDK(), e) case *configurationv1alpha1.KongRoute: @@ -463,8 +463,8 @@ func Update[ err = updateKonnectTransitGateway(ctx, sdk.GetCloudGatewaysSDK(), ent) // TODO: auto-generate ops entries for generated Konnect entities. // https://github.com/Kong/kong-operator/issues/3785 - case *konnectv1alpha1.KonnectEventControlPlane: - err = updateKonnectEventControlPlane(ctx, sdk.GetEventGatewaysSDK(), ent) + case *konnectv1alpha1.KonnectEventGateway: + err = updateKonnectEventGateway(ctx, sdk.GetEventGatewaysSDK(), ent) case *configurationv1alpha1.KongService: err = updateService(ctx, sdk.GetServicesSDK(), ent) case *configurationv1alpha1.KongRoute: diff --git a/controller/konnect/ops/ops_konnecteventcontrolplane_test.go b/controller/konnect/ops/ops_konnecteventcontrolplane_test.go index 7bd8903294..35adadfe78 100644 --- a/controller/konnect/ops/ops_konnecteventcontrolplane_test.go +++ b/controller/konnect/ops/ops_konnecteventcontrolplane_test.go @@ -16,12 +16,12 @@ import ( konnectv1alpha2 "github.com/kong/kong-operator/v2/api/konnect/v1alpha2" ) -func TestCreateKonnectEventControlPlane(t *testing.T) { +func TestCreateKonnectEventGateway(t *testing.T) { t.Parallel() ctx := context.Background() sdk := mocks.NewMockEventGatewaysSDK(t) - cp := testKonnectEventControlPlane() + cp := testKonnectEventGateway() expectedRequest, err := cp.Spec.APISpec.ToCreateGatewayRequest() require.NoError(t, err) @@ -36,17 +36,17 @@ func TestCreateKonnectEventControlPlane(t *testing.T) { }, nil). Once() - err = createKonnectEventControlPlane(ctx, sdk, cp) + err = createKonnectEventGateway(ctx, sdk, cp) require.NoError(t, err) assert.Equal(t, "gateway-1", cp.GetKonnectID()) } -func TestUpdateKonnectEventControlPlane(t *testing.T) { +func TestUpdateKonnectEventGateway(t *testing.T) { t.Parallel() ctx := context.Background() sdk := mocks.NewMockEventGatewaysSDK(t) - cp := testKonnectEventControlPlane() + cp := testKonnectEventGateway() cp.SetKonnectID("gateway-1") expectedRequest, err := cp.Spec.APISpec.ToUpdateGatewayRequest() @@ -62,17 +62,17 @@ func TestUpdateKonnectEventControlPlane(t *testing.T) { }, nil). Once() - err = updateKonnectEventControlPlane(ctx, sdk, cp) + err = updateKonnectEventGateway(ctx, sdk, cp) require.NoError(t, err) assert.Equal(t, "gateway-1", cp.GetKonnectID()) } -func TestDeleteKonnectEventControlPlane(t *testing.T) { +func TestDeleteKonnectEventGateway(t *testing.T) { t.Parallel() ctx := context.Background() sdk := mocks.NewMockEventGatewaysSDK(t) - cp := testKonnectEventControlPlane() + cp := testKonnectEventGateway() cp.SetKonnectID("gateway-1") sdk.EXPECT(). @@ -80,16 +80,16 @@ func TestDeleteKonnectEventControlPlane(t *testing.T) { Return(&sdkkonnectops.DeleteEventGatewayResponse{}, nil). Once() - err := deleteKonnectEventControlPlane(ctx, sdk, cp) + err := deleteKonnectEventGateway(ctx, sdk, cp) require.NoError(t, err) } -func TestGetKonnectEventControlPlaneForUID(t *testing.T) { +func TestGetKonnectEventGatewayForUID(t *testing.T) { t.Parallel() ctx := context.Background() sdk := mocks.NewMockEventGatewaysSDK(t) - cp := testKonnectEventControlPlane() + cp := testKonnectEventGateway() sdk.EXPECT(). ListEventGateways(mock.Anything, sdkkonnectops.ListEventGatewaysRequest{ @@ -114,16 +114,16 @@ func TestGetKonnectEventControlPlaneForUID(t *testing.T) { }, nil). Once() - id, err := getKonnectEventControlPlaneForUID(ctx, sdk, cp) + id, err := getKonnectEventGatewayForUID(ctx, sdk, cp) require.NoError(t, err) assert.Equal(t, "gateway-1", id) } -func testKonnectEventControlPlane() *konnectv1alpha1.KonnectEventControlPlane { - return &konnectv1alpha1.KonnectEventControlPlane{ +func testKonnectEventGateway() *konnectv1alpha1.KonnectEventGateway { + return &konnectv1alpha1.KonnectEventGateway{ TypeMeta: metav1.TypeMeta{ APIVersion: konnectv1alpha1.GroupVersion.String(), - Kind: "KonnectEventControlPlane", + Kind: "KonnectEventGateway", }, ObjectMeta: metav1.ObjectMeta{ Name: "event-control-plane", @@ -131,13 +131,13 @@ func testKonnectEventControlPlane() *konnectv1alpha1.KonnectEventControlPlane { UID: "event-control-plane-uid", Generation: 3, }, - Spec: konnectv1alpha1.KonnectEventControlPlaneSpec{ + Spec: konnectv1alpha1.KonnectEventGatewaySpec{ KonnectConfiguration: konnectv1alpha2.KonnectConfiguration{ APIAuthConfigurationRef: konnectv1alpha2.KonnectAPIAuthConfigurationRef{ Name: "test-auth", }, }, - APISpec: konnectv1alpha1.KonnectEventControlPlaneAPISpec{ + APISpec: konnectv1alpha1.KonnectEventGatewayAPISpec{ Name: "event-control-plane", Description: "Event gateway description", MinRuntimeVersion: "3.8", diff --git a/controller/konnect/ops/sdk/zz_generated_sdkfactory.go b/controller/konnect/ops/sdk/zz_generated_sdkfactory.go index 02237de372..4cfdd5093a 100644 --- a/controller/konnect/ops/sdk/zz_generated_sdkfactory.go +++ b/controller/konnect/ops/sdk/zz_generated_sdkfactory.go @@ -9,8 +9,8 @@ import ( // GeneratedSDK is the interface for generated SDKs. type GeneratedSDK interface { GetPortalAuthSettingsSDK() sdkkonnectgo.PortalAuthSettingsSDK - GetEventGatewaysSDK() sdkkonnectgo.EventGatewaysSDK GetEventGatewayDataPlaneCertificatesSDK() sdkkonnectgo.EventGatewayDataPlaneCertificatesSDK + GetEventGatewaysSDK() sdkkonnectgo.EventGatewaysSDK GetPortalsSDK() sdkkonnectgo.PortalsSDK GetPortalPagesSDK() sdkkonnectgo.PortalPagesSDK GetPortalTeamsSDK() sdkkonnectgo.PortalTeamsSDK @@ -21,16 +21,16 @@ func (w sdkWrapper) GetPortalAuthSettingsSDK() sdkkonnectgo.PortalAuthSettingsSD return w.sdk.PortalAuthSettings } -// GetEventGatewaysSDK returns the SDK to operate KonnectEventControlPlane. -func (w sdkWrapper) GetEventGatewaysSDK() sdkkonnectgo.EventGatewaysSDK { - return w.sdk.EventGateways -} - // GetEventGatewayDataPlaneCertificatesSDK returns the SDK to operate KonnectEventDataPlaneCertificate. func (w sdkWrapper) GetEventGatewayDataPlaneCertificatesSDK() sdkkonnectgo.EventGatewayDataPlaneCertificatesSDK { return w.sdk.EventGatewayDataPlaneCertificates } +// GetEventGatewaysSDK returns the SDK to operate KonnectEventGateway. +func (w sdkWrapper) GetEventGatewaysSDK() sdkkonnectgo.EventGatewaysSDK { + return w.sdk.EventGateways +} + // GetPortalsSDK returns the SDK to operate Portal. func (w sdkWrapper) GetPortalsSDK() sdkkonnectgo.PortalsSDK { return w.sdk.Portals diff --git a/controller/konnect/ops/zz_generated_ops_create.go b/controller/konnect/ops/zz_generated_ops_create.go index 95f955d2e7..e620b8d9e0 100644 --- a/controller/konnect/ops/zz_generated_ops_create.go +++ b/controller/konnect/ops/zz_generated_ops_create.go @@ -28,10 +28,10 @@ func CreateGeneratedOps[ switch ent := any(e).(type) { case *konnectv1alpha1.IdentityProviderRequest: return createIdentityProviderRequest(ctx, sdk.GetPortalAuthSettingsSDK(), ent) - case *konnectv1alpha1.KonnectEventControlPlane: - return createKonnectEventControlPlane(ctx, sdk.GetEventGatewaysSDK(), ent) case *konnectv1alpha1.KonnectEventDataPlaneCertificate: return createKonnectEventDataPlaneCertificate(ctx, cl, sdk.GetEventGatewayDataPlaneCertificatesSDK(), ent) + case *konnectv1alpha1.KonnectEventGateway: + return createKonnectEventGateway(ctx, sdk.GetEventGatewaysSDK(), ent) case *konnectv1alpha1.Portal: return createPortal(ctx, sdk.GetPortalsSDK(), ent) case *konnectv1alpha1.PortalPage: diff --git a/controller/konnect/ops/zz_generated_ops_delete.go b/controller/konnect/ops/zz_generated_ops_delete.go index f8ef3a04d4..4facd8a347 100644 --- a/controller/konnect/ops/zz_generated_ops_delete.go +++ b/controller/konnect/ops/zz_generated_ops_delete.go @@ -26,10 +26,10 @@ func DeleteGeneratedOps[ switch ent := any(e).(type) { case *konnectv1alpha1.IdentityProviderRequest: return deleteIdentityProviderRequest(ctx, sdk.GetPortalAuthSettingsSDK(), ent) - case *konnectv1alpha1.KonnectEventControlPlane: - return deleteKonnectEventControlPlane(ctx, sdk.GetEventGatewaysSDK(), ent) case *konnectv1alpha1.KonnectEventDataPlaneCertificate: return deleteKonnectEventDataPlaneCertificate(ctx, sdk.GetEventGatewayDataPlaneCertificatesSDK(), ent) + case *konnectv1alpha1.KonnectEventGateway: + return deleteKonnectEventGateway(ctx, sdk.GetEventGatewaysSDK(), ent) case *konnectv1alpha1.Portal: return deletePortal(ctx, sdk.GetPortalsSDK(), ent) case *konnectv1alpha1.PortalPage: diff --git a/controller/konnect/ops/zz_generated_ops_getforuid.go b/controller/konnect/ops/zz_generated_ops_getforuid.go index cf0cde797a..f1f7fdc0fb 100644 --- a/controller/konnect/ops/zz_generated_ops_getforuid.go +++ b/controller/konnect/ops/zz_generated_ops_getforuid.go @@ -40,8 +40,8 @@ func getForUID[ e TEnt, ) (string, error) { switch ent := any(e).(type) { - case *konnectv1alpha1.KonnectEventControlPlane: - return getKonnectEventControlPlaneForUID(ctx, sdk.GetEventGatewaysSDK(), ent) + case *konnectv1alpha1.KonnectEventGateway: + return getKonnectEventGatewayForUID(ctx, sdk.GetEventGatewaysSDK(), ent) case *konnectv1alpha1.Portal: return getPortalForUID(ctx, sdk.GetPortalsSDK(), ent) case *konnectv1alpha1.PortalPage: diff --git a/controller/konnect/ops/zz_generated_ops_konnect_eventdataplanecertificate.go b/controller/konnect/ops/zz_generated_ops_konnect_eventdataplanecertificate.go index c0632c2562..6180f37e17 100644 --- a/controller/konnect/ops/zz_generated_ops_konnect_eventdataplanecertificate.go +++ b/controller/konnect/ops/zz_generated_ops_konnect_eventdataplanecertificate.go @@ -21,7 +21,7 @@ func createKonnectEventDataPlaneCertificate( ) error { parentID := obj.GetGatewayID() if parentID == "" { - return CantPerformOperationWithoutParentIDError{Entity: obj, Parent: "KonnectEventControlPlane", Op: CreateOp} + return CantPerformOperationWithoutParentIDError{Entity: obj, Parent: "KonnectEventGateway", Op: CreateOp} } req, err := kongEventDataPlaneCertificateCreateRequest(ctx, cl, obj) if err != nil { @@ -48,7 +48,7 @@ func updateKonnectEventDataPlaneCertificate( ) error { parentID := obj.GetGatewayID() if parentID == "" { - return CantPerformOperationWithoutParentIDError{Entity: obj, Parent: "KonnectEventControlPlane", Op: UpdateOp} + return CantPerformOperationWithoutParentIDError{Entity: obj, Parent: "KonnectEventGateway", Op: UpdateOp} } id := obj.GetKonnectStatus().GetKonnectID() req, err := kongEventDataPlaneCertificateUpdateRequest(ctx, cl, obj) @@ -76,7 +76,7 @@ func deleteKonnectEventDataPlaneCertificate( ) error { parentID := obj.GetGatewayID() if parentID == "" { - return CantPerformOperationWithoutParentIDError{Entity: obj, Parent: "KonnectEventControlPlane", Op: DeleteOp} + return CantPerformOperationWithoutParentIDError{Entity: obj, Parent: "KonnectEventGateway", Op: DeleteOp} } id := obj.GetKonnectStatus().GetKonnectID() diff --git a/controller/konnect/ops/zz_generated_ops_konnect_eventcontrolplane.go b/controller/konnect/ops/zz_generated_ops_konnect_eventgateway.go similarity index 87% rename from controller/konnect/ops/zz_generated_ops_konnect_eventcontrolplane.go rename to controller/konnect/ops/zz_generated_ops_konnect_eventgateway.go index 981ab04a6a..b9e2f93510 100644 --- a/controller/konnect/ops/zz_generated_ops_konnect_eventcontrolplane.go +++ b/controller/konnect/ops/zz_generated_ops_konnect_eventgateway.go @@ -12,10 +12,10 @@ import ( konnectv1alpha1 "github.com/kong/kong-operator/v2/api/konnect/v1alpha1" ) -func createKonnectEventControlPlane( +func createKonnectEventGateway( ctx context.Context, sdk sdkkonnectgo.EventGatewaysSDK, - obj *konnectv1alpha1.KonnectEventControlPlane, + obj *konnectv1alpha1.KonnectEventGateway, ) error { req, err := obj.Spec.APISpec.ToCreateGatewayRequest() if err != nil { @@ -35,10 +35,10 @@ func createKonnectEventControlPlane( return nil } -func updateKonnectEventControlPlane( +func updateKonnectEventGateway( ctx context.Context, sdk sdkkonnectgo.EventGatewaysSDK, - obj *konnectv1alpha1.KonnectEventControlPlane, + obj *konnectv1alpha1.KonnectEventGateway, ) error { id := obj.GetKonnectStatus().GetKonnectID() req, err := obj.Spec.APISpec.ToUpdateGatewayRequest() @@ -50,16 +50,16 @@ func updateKonnectEventControlPlane( _, err = sdk.UpdateEventGateway(ctx, id, *req) if errWrap := wrapErrIfKonnectOpFailed(err, UpdateOp, obj); errWrap != nil { return handleUpdateError(ctx, err, obj, func(ctx context.Context) error { - return createKonnectEventControlPlane(ctx, sdk, obj) + return createKonnectEventGateway(ctx, sdk, obj) }) } return nil } -func deleteKonnectEventControlPlane( +func deleteKonnectEventGateway( ctx context.Context, sdk sdkkonnectgo.EventGatewaysSDK, - obj *konnectv1alpha1.KonnectEventControlPlane, + obj *konnectv1alpha1.KonnectEventGateway, ) error { id := obj.GetKonnectStatus().GetKonnectID() @@ -70,10 +70,10 @@ func deleteKonnectEventControlPlane( return nil } -func getKonnectEventControlPlaneForUID( +func getKonnectEventGatewayForUID( ctx context.Context, sdk sdkkonnectgo.EventGatewaysSDK, - obj *konnectv1alpha1.KonnectEventControlPlane, + obj *konnectv1alpha1.KonnectEventGateway, ) (string, error) { // TODO: pass a Filter to ListEventGateways (e.g. by name/labels) so we diff --git a/controller/konnect/ops/zz_generated_ops_update.go b/controller/konnect/ops/zz_generated_ops_update.go index dee8fc17a1..9156df86ae 100644 --- a/controller/konnect/ops/zz_generated_ops_update.go +++ b/controller/konnect/ops/zz_generated_ops_update.go @@ -28,10 +28,10 @@ func UpdateGeneratedOps[ switch ent := any(e).(type) { case *konnectv1alpha1.IdentityProviderRequest: return updateIdentityProviderRequest(ctx, sdk.GetPortalAuthSettingsSDK(), ent) - case *konnectv1alpha1.KonnectEventControlPlane: - return updateKonnectEventControlPlane(ctx, sdk.GetEventGatewaysSDK(), ent) case *konnectv1alpha1.KonnectEventDataPlaneCertificate: return updateKonnectEventDataPlaneCertificate(ctx, cl, sdk.GetEventGatewayDataPlaneCertificatesSDK(), ent) + case *konnectv1alpha1.KonnectEventGateway: + return updateKonnectEventGateway(ctx, sdk.GetEventGatewaysSDK(), ent) case *konnectv1alpha1.Portal: return updatePortal(ctx, sdk.GetPortalsSDK(), ent) case *konnectv1alpha1.PortalPage: diff --git a/controller/konnect/reconciler_eventgatewayref.go b/controller/konnect/reconciler_eventgatewayref.go index 2b504147c7..bd005ac2fa 100644 --- a/controller/konnect/reconciler_eventgatewayref.go +++ b/controller/konnect/reconciler_eventgatewayref.go @@ -56,7 +56,7 @@ func handleEventGatewayRef[T constraints.SupportedKonnectEntityType, TEnt constr } if delTimestamp := gateway.GetDeletionTimestamp(); !delTimestamp.IsZero() { - msg := fmt.Sprintf("Referenced KonnectEventControlPlane %s is being deleted", nn) + msg := fmt.Sprintf("Referenced KonnectEventGateway %s is being deleted", nn) if res, errStatus := patch.StatusWithCondition( ctx, cl, cert, konnectv1alpha1.EventGatewayRefValidConditionType, @@ -79,7 +79,7 @@ func handleEventGatewayRef[T constraints.SupportedKonnectEntityType, TEnt constr konnectv1alpha1.EventGatewayRefValidConditionType, metav1.ConditionFalse, konnectv1alpha1.EventGatewayRefReasonNotProgrammed, - fmt.Sprintf("Referenced KonnectEventControlPlane %s is not programmed yet", nn), + fmt.Sprintf("Referenced KonnectEventGateway %s is not programmed yet", nn), ); errStatus != nil || !res.IsZero() { return res, errStatus } @@ -89,7 +89,7 @@ func handleEventGatewayRef[T constraints.SupportedKonnectEntityType, TEnt constr if gateway.GetKonnectID() == "" { err := ReferencedObjectIsInvalidError{ Reference: nn.String(), - Msg: "Referenced KonnectEventControlPlane does not have a Konnect ID yet", + Msg: "Referenced KonnectEventGateway does not have a Konnect ID yet", } if res, errStatus := patch.StatusWithCondition( ctx, cl, cert, @@ -121,7 +121,7 @@ func handleEventGatewayRef[T constraints.SupportedKonnectEntityType, TEnt constr konnectv1alpha1.EventGatewayRefValidConditionType, metav1.ConditionTrue, konnectv1alpha1.EventGatewayRefReasonValid, - fmt.Sprintf("Referenced KonnectEventControlPlane %s is programmed", nn), + fmt.Sprintf("Referenced KonnectEventGateway %s is programmed", nn), ); errStatus != nil || !res.IsZero() { return res, errStatus } @@ -156,7 +156,7 @@ func ensureKongReferenceGrantForEventGatewayRef( targetNamespace, ref.NamespacedRef.Name, metav1.GroupVersionKind(ent.GetObjectKind().GroupVersionKind()), - metav1.GroupVersionKind(konnectv1alpha1.GroupVersion.WithKind("KonnectEventControlPlane")), + metav1.GroupVersionKind(konnectv1alpha1.GroupVersion.WithKind("KonnectEventGateway")), ) if crossnamespace.IsReferenceNotGranted(err) { if res, errStatus := patch.StatusWithCondition( @@ -165,7 +165,7 @@ func ensureKongReferenceGrantForEventGatewayRef( metav1.ConditionFalse, configurationv1alpha1.KongReferenceGrantReasonRefNotPermitted, fmt.Sprintf( - "KongReferenceGrants do not allow access to KonnectEventControlPlane %s/%s", + "KongReferenceGrants do not allow access to KonnectEventGateway %s/%s", targetNamespace, ref.NamespacedRef.Name, ), @@ -184,7 +184,7 @@ func ensureKongReferenceGrantForEventGatewayRef( metav1.ConditionTrue, configurationv1alpha1.KongReferenceGrantReasonResolvedRefs, fmt.Sprintf( - "KongReferenceGrants allow access to KonnectEventControlPlane %s/%s", + "KongReferenceGrants allow access to KonnectEventGateway %s/%s", targetNamespace, ref.NamespacedRef.Name, ), @@ -200,7 +200,7 @@ func getEventGatewayForRef( cl client.Client, ref commonv1alpha1.ObjectRef, namespace string, -) (*konnectv1alpha1.KonnectEventControlPlane, types.NamespacedName, error) { +) (*konnectv1alpha1.KonnectEventGateway, types.NamespacedName, error) { switch ref.Type { case commonv1alpha1.ObjectRefTypeNamespacedRef: if ref.NamespacedRef == nil { @@ -214,7 +214,7 @@ func getEventGatewayForRef( nn.Namespace = *ref.NamespacedRef.Namespace } - var gateway konnectv1alpha1.KonnectEventControlPlane + var gateway konnectv1alpha1.KonnectEventGateway if err := cl.Get(ctx, nn, &gateway); err != nil { if apierrors.IsNotFound(err) { return nil, nn, ReferencedObjectDoesNotExistError{ @@ -222,7 +222,7 @@ func getEventGatewayForRef( Err: err, } } - return nil, nn, fmt.Errorf("failed to get KonnectEventControlPlane %s: %w", nn, err) + return nil, nn, fmt.Errorf("failed to get KonnectEventGateway %s: %w", nn, err) } return &gateway, nn, nil @@ -231,9 +231,9 @@ func getEventGatewayForRef( return nil, types.NamespacedName{}, fmt.Errorf("gatewayRef.konnectID is required when type is konnectID") } - var gateways konnectv1alpha1.KonnectEventControlPlaneList + var gateways konnectv1alpha1.KonnectEventGatewayList if err := cl.List(ctx, &gateways, client.InNamespace(namespace)); err != nil { - return nil, types.NamespacedName{}, fmt.Errorf("failed to list KonnectEventControlPlanes in namespace %s: %w", namespace, err) + return nil, types.NamespacedName{}, fmt.Errorf("failed to list KonnectEventGateways in namespace %s: %w", namespace, err) } for i := range gateways.Items { @@ -249,7 +249,7 @@ func getEventGatewayForRef( return nil, types.NamespacedName{}, ReferencedObjectIsInvalidError{ Reference: fmt.Sprintf("", *ref.KonnectID), Msg: fmt.Sprintf( - "no local KonnectEventControlPlane with matching Konnect ID was found in namespace %s", + "no local KonnectEventGateway with matching Konnect ID was found in namespace %s", namespace, ), } diff --git a/controller/konnect/reconciler_konnectapiauth_test.go b/controller/konnect/reconciler_konnectapiauth_test.go index b299579b12..54d8a214b1 100644 --- a/controller/konnect/reconciler_konnectapiauth_test.go +++ b/controller/konnect/reconciler_konnectapiauth_test.go @@ -267,7 +267,7 @@ func TestEnsureFinalizerOnKonnectAPIAuthConfiguration(t *testing.T) { expectedPatched: true, }, { - name: "adds finalizer when KonnectEventControlPlane references the auth", + name: "adds finalizer when KonnectEventGateway references the auth", apiAuth: &konnectv1alpha1.KonnectAPIAuthConfiguration{ ObjectMeta: metav1.ObjectMeta{ Name: "test-auth", @@ -275,18 +275,18 @@ func TestEnsureFinalizerOnKonnectAPIAuthConfiguration(t *testing.T) { }, }, referencingResources: []client.Object{ - &konnectv1alpha1.KonnectEventControlPlane{ + &konnectv1alpha1.KonnectEventGateway{ ObjectMeta: metav1.ObjectMeta{ Name: "test-event-cp", Namespace: "default", }, - Spec: konnectv1alpha1.KonnectEventControlPlaneSpec{ + Spec: konnectv1alpha1.KonnectEventGatewaySpec{ KonnectConfiguration: konnectv1alpha2.KonnectConfiguration{ APIAuthConfigurationRef: konnectv1alpha2.KonnectAPIAuthConfigurationRef{ Name: "test-auth", }, }, - APISpec: konnectv1alpha1.KonnectEventControlPlaneAPISpec{ + APISpec: konnectv1alpha1.KonnectEventGatewayAPISpec{ Name: "event-cp", }, }, @@ -467,10 +467,10 @@ func TestEnsureFinalizerOnKonnectAPIAuthConfiguration(t *testing.T) { }, ) clientBuilder = clientBuilder.WithIndex( - &konnectv1alpha1.KonnectEventControlPlane{}, - index.IndexFieldKonnectEventControlPlaneOnAPIAuthConfiguration, + &konnectv1alpha1.KonnectEventGateway{}, + index.IndexFieldKonnectEventGatewayOnAPIAuthConfiguration, func(obj client.Object) []string { - cp := obj.(*konnectv1alpha1.KonnectEventControlPlane) + cp := obj.(*konnectv1alpha1.KonnectEventGateway) ns := cp.GetNamespace() authRef := cp.Spec.KonnectConfiguration.APIAuthConfigurationRef if authRef.Name != "" { diff --git a/controller/konnect/reconciler_konnectapiauth_watch.go b/controller/konnect/reconciler_konnectapiauth_watch.go index af29c1be71..42b6dee041 100644 --- a/controller/konnect/reconciler_konnectapiauth_watch.go +++ b/controller/konnect/reconciler_konnectapiauth_watch.go @@ -83,7 +83,7 @@ var konnectAPIAuthReferencingTypes = []constraints.EntityWithKonnectAPIAuthConfi &konnectv1alpha1.KonnectCloudGatewayNetwork{}, &konnectv1alpha2.KonnectGatewayControlPlane{}, &konnectv1alpha2.KonnectExtension{}, - &konnectv1alpha1.KonnectEventControlPlane{}, + &konnectv1alpha1.KonnectEventGateway{}, } // konnectAPIAuthReferencingTypeListsWithIndexes is a map of Konnect resource list types @@ -95,7 +95,7 @@ var konnectAPIAuthReferencingTypeListsWithIndexes = map[client.ObjectList]string &konnectv1alpha1.KonnectCloudGatewayNetworkList{}: index.IndexFieldKonnectCloudGatewayNetworkOnAPIAuthConfiguration, &konnectv1alpha2.KonnectGatewayControlPlaneList{}: index.IndexFieldKonnectGatewayControlPlaneOnAPIAuthConfiguration, &konnectv1alpha2.KonnectExtensionList{}: index.IndexFieldKonnectExtensionOnAPIAuthConfiguration, - &konnectv1alpha1.KonnectEventControlPlaneList{}: index.IndexFieldKonnectEventControlPlaneOnAPIAuthConfiguration, + &konnectv1alpha1.KonnectEventGatewayList{}: index.IndexFieldKonnectEventGatewayOnAPIAuthConfiguration, } // setKonnectAPIAuthConfigurationRefWatches sets up watches for types that reference KonnectAPIAuthConfiguration. diff --git a/controller/konnect/reconciler_konnectapiauth_watch_test.go b/controller/konnect/reconciler_konnectapiauth_watch_test.go index 25bad4b9f3..52ed795d8e 100644 --- a/controller/konnect/reconciler_konnectapiauth_watch_test.go +++ b/controller/konnect/reconciler_konnectapiauth_watch_test.go @@ -19,7 +19,7 @@ func TestKonnectAPIAuthReferencingTypesOnlyIncludeSupportedEntities(t *testing.T case *konnectv1alpha1.KonnectCloudGatewayNetwork, *konnectv1alpha2.KonnectGatewayControlPlane, *konnectv1alpha2.KonnectExtension, - *konnectv1alpha1.KonnectEventControlPlane: + *konnectv1alpha1.KonnectEventGateway: default: t.Fatalf("unexpected KonnectAPIAuthConfiguration referencing type %T", ent) } @@ -42,7 +42,7 @@ func assertSupportedKonnectAPIAuthReferencingListType(t *testing.T, objList clie case *konnectv1alpha1.KonnectCloudGatewayNetworkList, *konnectv1alpha2.KonnectGatewayControlPlaneList, *konnectv1alpha2.KonnectExtensionList, - *konnectv1alpha1.KonnectEventControlPlaneList: + *konnectv1alpha1.KonnectEventGatewayList: default: t.Fatalf("unexpected KonnectAPIAuthConfiguration referencing list type %T", objList) } diff --git a/controller/konnect/watch_test.go b/controller/konnect/watch_test.go index 199b3666d9..4bec1f523b 100644 --- a/controller/konnect/watch_test.go +++ b/controller/konnect/watch_test.go @@ -31,7 +31,7 @@ func TestWatchOptions(t *testing.T) { testReconciliationWatchOptionsForEntity(t, &configurationv1alpha1.KongCertificate{}) testReconciliationWatchOptionsForEntity(t, &configurationv1alpha1.KongKey{}) testReconciliationWatchOptionsForEntity(t, &configurationv1alpha1.KongKeySet{}) - testReconciliationWatchOptionsForEntity(t, &konnectv1alpha1.KonnectEventControlPlane{}) + testReconciliationWatchOptionsForEntity(t, &konnectv1alpha1.KonnectEventGateway{}) } func testReconciliationWatchOptionsForEntity[ diff --git a/controller/konnect/zz_generated_reconciler_generic_rbac_konnectv1alpha1.go b/controller/konnect/zz_generated_reconciler_generic_rbac_konnectv1alpha1.go index d5292cc2bc..b0dfee2256 100644 --- a/controller/konnect/zz_generated_reconciler_generic_rbac_konnectv1alpha1.go +++ b/controller/konnect/zz_generated_reconciler_generic_rbac_konnectv1alpha1.go @@ -5,12 +5,12 @@ package konnect //+kubebuilder:rbac:groups=konnect.konghq.com,resources=identityproviderrequests,verbs=get;list;watch;update;patch //+kubebuilder:rbac:groups=konnect.konghq.com,resources=identityproviderrequests/status,verbs=update;patch //+kubebuilder:rbac:groups=konnect.konghq.com,resources=identityproviderrequests/finalizers,verbs=update;patch -//+kubebuilder:rbac:groups=konnect.konghq.com,resources=konnecteventcontrolplanes,verbs=get;list;watch;update;patch -//+kubebuilder:rbac:groups=konnect.konghq.com,resources=konnecteventcontrolplanes/status,verbs=update;patch -//+kubebuilder:rbac:groups=konnect.konghq.com,resources=konnecteventcontrolplanes/finalizers,verbs=update;patch //+kubebuilder:rbac:groups=konnect.konghq.com,resources=konnecteventdataplanecertificates,verbs=get;list;watch;update;patch //+kubebuilder:rbac:groups=konnect.konghq.com,resources=konnecteventdataplanecertificates/status,verbs=update;patch //+kubebuilder:rbac:groups=konnect.konghq.com,resources=konnecteventdataplanecertificates/finalizers,verbs=update;patch +//+kubebuilder:rbac:groups=konnect.konghq.com,resources=konnecteventgateways,verbs=get;list;watch;update;patch +//+kubebuilder:rbac:groups=konnect.konghq.com,resources=konnecteventgateways/status,verbs=update;patch +//+kubebuilder:rbac:groups=konnect.konghq.com,resources=konnecteventgateways/finalizers,verbs=update;patch //+kubebuilder:rbac:groups=konnect.konghq.com,resources=portals,verbs=get;list;watch;update;patch //+kubebuilder:rbac:groups=konnect.konghq.com,resources=portals/status,verbs=update;patch //+kubebuilder:rbac:groups=konnect.konghq.com,resources=portals/finalizers,verbs=update;patch diff --git a/controller/konnect/zz_generated_watch.go b/controller/konnect/zz_generated_watch.go index 069e239163..76a682cbea 100644 --- a/controller/konnect/zz_generated_watch.go +++ b/controller/konnect/zz_generated_watch.go @@ -22,10 +22,10 @@ func reconciliationWatchOptionsForEntity[ switch any(ent).(type) { case *konnectv1alpha1.IdentityProviderRequest: return IdentityProviderRequestReconciliationWatchOptions(cl) - case *konnectv1alpha1.KonnectEventControlPlane: - return KonnectEventControlPlaneReconciliationWatchOptions(cl) case *konnectv1alpha1.KonnectEventDataPlaneCertificate: return KonnectEventDataPlaneCertificateReconciliationWatchOptions(cl) + case *konnectv1alpha1.KonnectEventGateway: + return KonnectEventGatewayReconciliationWatchOptions(cl) case *konnectv1alpha1.Portal: return PortalReconciliationWatchOptions(cl) case *konnectv1alpha1.PortalPage: diff --git a/controller/konnect/zz_generated_watch_konnect_eventdataplanecertificate.go b/controller/konnect/zz_generated_watch_konnect_eventdataplanecertificate.go index 743208369b..f10cde3236 100644 --- a/controller/konnect/zz_generated_watch_konnect_eventdataplanecertificate.go +++ b/controller/konnect/zz_generated_watch_konnect_eventdataplanecertificate.go @@ -25,20 +25,20 @@ func KonnectEventDataPlaneCertificateReconciliationWatchOptions( }, func(b *ctrl.Builder) *ctrl.Builder { return b.Watches( - &konnectv1alpha1.KonnectEventControlPlane{}, + &konnectv1alpha1.KonnectEventGateway{}, handler.EnqueueRequestsFromMapFunc( - enqueueKonnectEventDataPlaneCertificateForKonnectEventControlPlane(cl), + enqueueKonnectEventDataPlaneCertificateForKonnectEventGateway(cl), ), ) }, } } -func enqueueKonnectEventDataPlaneCertificateForKonnectEventControlPlane( +func enqueueKonnectEventDataPlaneCertificateForKonnectEventGateway( cl client.Client, ) func(ctx context.Context, obj client.Object) []reconcile.Request { return func(ctx context.Context, obj client.Object) []reconcile.Request { - parent, ok := obj.(*konnectv1alpha1.KonnectEventControlPlane) + parent, ok := obj.(*konnectv1alpha1.KonnectEventGateway) if !ok { return nil } @@ -47,7 +47,7 @@ func enqueueKonnectEventDataPlaneCertificateForKonnectEventControlPlane( // TODO: change this when cross namespace refs are allowed. client.InNamespace(parent.GetNamespace()), client.MatchingFields{ - index.IndexFieldKonnectEventDataPlaneCertificateOnKonnectEventControlPlaneRef: parent.Name, + index.IndexFieldKonnectEventDataPlaneCertificateOnKonnectEventGatewayRef: parent.Name, }, ); err != nil { return nil diff --git a/controller/konnect/zz_generated_watch_konnect_eventcontrolplane.go b/controller/konnect/zz_generated_watch_konnect_eventgateway.go similarity index 70% rename from controller/konnect/zz_generated_watch_konnect_eventcontrolplane.go rename to controller/konnect/zz_generated_watch_konnect_eventgateway.go index dd991642b2..8cdd9ba36a 100644 --- a/controller/konnect/zz_generated_watch_konnect_eventcontrolplane.go +++ b/controller/konnect/zz_generated_watch_konnect_eventgateway.go @@ -13,27 +13,27 @@ import ( "github.com/kong/kong-operator/v2/internal/utils/index" ) -// KonnectEventControlPlaneReconciliationWatchOptions returns the watch options for -// the KonnectEventControlPlane. -func KonnectEventControlPlaneReconciliationWatchOptions( +// KonnectEventGatewayReconciliationWatchOptions returns the watch options for +// the KonnectEventGateway. +func KonnectEventGatewayReconciliationWatchOptions( cl client.Client, ) []func(*ctrl.Builder) *ctrl.Builder { return []func(*ctrl.Builder) *ctrl.Builder{ func(b *ctrl.Builder) *ctrl.Builder { - return b.For(&konnectv1alpha1.KonnectEventControlPlane{}) + return b.For(&konnectv1alpha1.KonnectEventGateway{}) }, func(b *ctrl.Builder) *ctrl.Builder { return b.Watches( &konnectv1alpha1.KonnectAPIAuthConfiguration{}, handler.EnqueueRequestsFromMapFunc( - enqueueKonnectEventControlPlaneForKonnectAPIAuthConfiguration(cl), + enqueueKonnectEventGatewayForKonnectAPIAuthConfiguration(cl), ), ) }, } } -func enqueueKonnectEventControlPlaneForKonnectAPIAuthConfiguration( +func enqueueKonnectEventGatewayForKonnectAPIAuthConfiguration( cl client.Client, ) func(ctx context.Context, obj client.Object) []reconcile.Request { return func(ctx context.Context, obj client.Object) []reconcile.Request { @@ -41,12 +41,12 @@ func enqueueKonnectEventControlPlaneForKonnectAPIAuthConfiguration( if !ok { return nil } - var l konnectv1alpha1.KonnectEventControlPlaneList + var l konnectv1alpha1.KonnectEventGatewayList if err := cl.List(ctx, &l, // TODO: change this when cross namespace refs are allowed. client.InNamespace(auth.GetNamespace()), client.MatchingFields{ - index.IndexFieldKonnectEventControlPlaneOnAPIAuthConfiguration: auth.Namespace + "/" + auth.Name, + index.IndexFieldKonnectEventGatewayOnAPIAuthConfiguration: auth.Namespace + "/" + auth.Name, }, ); err != nil { return nil diff --git a/crd-from-oas/README.md b/crd-from-oas/README.md index b39cf5f5d1..df888f063b 100644 --- a/crd-from-oas/README.md +++ b/crd-from-oas/README.md @@ -18,7 +18,7 @@ apiGroupVersions: alias: commonv1alpha1 types: - path: /v1/event-gateways - name: KonnectEventControlPlane + name: KonnectEventGateway - path: /v1/event-gateways/{gatewayId}/data-plane-certificates name: KonnectEventDataPlaneCertificate optionalSecretReference: true diff --git a/crd-from-oas/config.yaml b/crd-from-oas/config.yaml index 1a186d425c..9d77922051 100644 --- a/crd-from-oas/config.yaml +++ b/crd-from-oas/config.yaml @@ -11,7 +11,7 @@ apiGroupVersions: types: # Event Gateway APIs - path: /v1/event-gateways - name: KonnectEventControlPlane + name: KonnectEventGateway ops: sdk: interface: github.com/Kong/sdk-konnect-go.EventGatewaysSDK @@ -41,7 +41,7 @@ apiGroupVersions: delete: {} reconciler: isRoot: false - parentEntityType: KonnectEventControlPlane + parentEntityType: KonnectEventGateway # Portal APIs - path: /v3/portals diff --git a/crd-from-oas/pkg/config/config_test.go b/crd-from-oas/pkg/config/config_test.go index 91f753363e..b82654e13c 100644 --- a/crd-from-oas/pkg/config/config_test.go +++ b/crd-from-oas/pkg/config/config_test.go @@ -309,7 +309,7 @@ apiGroupVersions: konnect.konghq.com/v1alpha1: types: - path: /v1/event-gateways - name: KonnectEventControlPlane + name: KonnectEventGateway - path: /v3/portals ` path := filepath.Join(t.TempDir(), "config.yaml") @@ -320,7 +320,7 @@ apiGroupVersions: konnect := cfg.APIGroupVersions["konnect.konghq.com/v1alpha1"] require.NotNil(t, konnect) - assert.Equal(t, "KonnectEventControlPlane", konnect.Types[0].Name) + assert.Equal(t, "KonnectEventGateway", konnect.Types[0].Name) assert.Empty(t, konnect.Types[1].Name) } @@ -328,13 +328,13 @@ func TestAPIGroupVersionConfig_NameOverrides(t *testing.T) { t.Run("with overrides", func(t *testing.T) { agv := &APIGroupVersionConfig{ Types: []*TypeConfig{ - {Path: "/v1/event-gateways", Name: "KonnectEventControlPlane"}, + {Path: "/v1/event-gateways", Name: "KonnectEventGateway"}, {Path: "/v3/portals"}, }, } overrides := agv.NameOverrides() assert.Equal(t, map[string]string{ - "/v1/event-gateways": "KonnectEventControlPlane", + "/v1/event-gateways": "KonnectEventGateway", }, overrides) }) diff --git a/crd-from-oas/pkg/generator/generator.go b/crd-from-oas/pkg/generator/generator.go index 5d4fdf4fe4..d26770c215 100644 --- a/crd-from-oas/pkg/generator/generator.go +++ b/crd-from-oas/pkg/generator/generator.go @@ -703,7 +703,7 @@ func rootRefDependency(schema *parser.Schema) *parser.Dependency { // EntityFilePrefix converts a PascalCase entity name to a lowercase file name // prefix, inserting an underscore after a leading "Konnect" prefix. -// e.g. "KonnectEventControlPlane" → "konnect_eventcontrolplane", +// e.g. "KonnectEventGateway" → "konnect_eventcontrolplane", // // "Portal" → "portal". func EntityFilePrefix(entityName string) string { diff --git a/crd-from-oas/pkg/generator/generator_test.go b/crd-from-oas/pkg/generator/generator_test.go index f2a0e737c8..ad0b6306f6 100644 --- a/crd-from-oas/pkg/generator/generator_test.go +++ b/crd-from-oas/pkg/generator/generator_test.go @@ -158,7 +158,7 @@ func TestGenerateWatchAndIndex_ForChildEntity(t *testing.T) { metadata := reconcilerEntityMetadata{ EntityName: "KonnectEventDataPlaneCertificate", EntityNameLowerCamel: "konnectEventDataPlaneCertificate", - ParentEntityName: "KonnectEventControlPlane", + ParentEntityName: "KonnectEventGateway", ParentRefFieldName: "GatewayRef", APIGroupPackagePath: "github.com/kong/kong-operator/v2/api/konnect/v1alpha1", APIGroupPackageAlias: "konnectv1alpha1", @@ -167,23 +167,23 @@ func TestGenerateWatchAndIndex_ForChildEntity(t *testing.T) { t.Run("watches parent entity", func(t *testing.T) { content, err := g.generateWatch(metadata, &config.ReconcilerConfig{ IsRoot: false, - ParentEntityType: "KonnectEventControlPlane", + ParentEntityType: "KonnectEventGateway", }) require.NoError(t, err) - assert.Contains(t, content, `&konnectv1alpha1.KonnectEventControlPlane{}`) - assert.Contains(t, content, `enqueueKonnectEventDataPlaneCertificateForKonnectEventControlPlane(cl)`) - assert.Contains(t, content, `index.IndexFieldKonnectEventDataPlaneCertificateOnKonnectEventControlPlaneRef: parent.Name,`) + assert.Contains(t, content, `&konnectv1alpha1.KonnectEventGateway{}`) + assert.Contains(t, content, `enqueueKonnectEventDataPlaneCertificateForKonnectEventGateway(cl)`) + assert.Contains(t, content, `index.IndexFieldKonnectEventDataPlaneCertificateOnKonnectEventGatewayRef: parent.Name,`) }) t.Run("indexes by dependency namespaced ref", func(t *testing.T) { content, err := g.generateIndex(metadata, &config.ReconcilerConfig{ IsRoot: false, - ParentEntityType: "KonnectEventControlPlane", + ParentEntityType: "KonnectEventGateway", }) require.NoError(t, err) - assert.Contains(t, content, `IndexFieldKonnectEventDataPlaneCertificateOnKonnectEventControlPlaneRef`) + assert.Contains(t, content, `IndexFieldKonnectEventDataPlaneCertificateOnKonnectEventGatewayRef`) assert.Contains(t, content, `if ent.Spec.GatewayRef.NamespacedRef == nil {`) assert.Contains(t, content, `return []string{ent.Spec.GatewayRef.NamespacedRef.Name}`) }) @@ -652,8 +652,8 @@ func TestEntityFilePrefix(t *testing.T) { }, { name: "Konnect-prefixed entity", - input: "KonnectEventControlPlane", - expected: "konnect_eventcontrolplane", + input: "KonnectEventGateway", + expected: "konnect_eventgateway", }, { name: "Konnect alone stays unchanged", @@ -1546,7 +1546,7 @@ func TestGenerateSDKOpsTest_SupportsPointerAndNamedFields(t *testing.T) { }, } - content, err := g.generateSDKOpsTest("KonnectEventControlPlane", schema, opsConfig) + content, err := g.generateSDKOpsTest("KonnectEventGateway", schema, opsConfig) require.NoError(t, err) assert.Contains(t, content, `Description: new("test-value")`) assert.Contains(t, content, `Labels: Labels{"test-key": "test-value"}`) @@ -1794,7 +1794,7 @@ func TestGenerateMockSDKFactoryDispatcher(t *testing.T) { SDKFieldName: "EventGatewayDataPlaneCertificates", }, { - Entity: "KonnectEventControlPlane", + Entity: "KonnectEventGateway", SDKInterfaceImportPath: "github.com/Kong/sdk-konnect-go", SDKInterfaceTypeName: "EventGatewaysSDK", SDKFieldName: "EventGateways", @@ -1827,7 +1827,7 @@ func TestGenerateMockSDKFactoryDispatcher(t *testing.T) { idxEventCert := strings.Index(file.Content, "*mocks.MockEventGatewayDataPlaneCertificatesSDK") idxPortal := strings.Index(file.Content, "*mocks.MockPortalsSDK") assert.Less(t, idxIdentity, idxEvent) - assert.Less(t, idxEvent, idxEventCert) + assert.Less(t, idxEventCert, idxEvent) assert.Less(t, idxEventCert, idxPortal) } @@ -1915,6 +1915,16 @@ func TestGenerateSchemaTypes_NoValueTypeForNonMapTypes(t *testing.T) { } func TestGenerateRBAC(t *testing.T) { + t.Run("gateway kinds use gateways plural", func(t *testing.T) { + g := NewGenerator(Config{ + APIGroup: "konnect.konghq.com", + APIVersion: "v1alpha1", + }) + + assert.Equal(t, "gateways", g.resourceNameForKind("Gateway")) + assert.Equal(t, "konnecteventgateways", g.resourceNameForKind("KonnectEventGateway")) + }) + t.Run("single entity", func(t *testing.T) { g := NewGenerator(Config{ APIGroup: "x-konnect.konghq.com", @@ -1936,9 +1946,9 @@ func TestGenerateRBAC(t *testing.T) { APIVersion: "v1alpha1", }) - content, err := g.generateRBAC([]string{"KonnectEventControlPlane", "SomeOtherEntity"}) + content, err := g.generateRBAC([]string{"KonnectEventGateway", "SomeOtherEntity"}) require.NoError(t, err) - assert.Contains(t, content, "resources=konnecteventcontrolplanes,") + assert.Contains(t, content, "resources=konnecteventgateways,") assert.Contains(t, content, "resources=someotherentities,") }) } @@ -2090,7 +2100,7 @@ func TestGenerateOpsCreate_NonRootEntityWithParentTypeOverride(t *testing.T) { ReconcilerConfig: map[string]*config.ReconcilerConfig{ "KonnectEventDataPlaneCertificate": { IsRoot: false, - ParentEntityType: "KonnectEventControlPlane", + ParentEntityType: "KonnectEventGateway", }, }, }) @@ -2117,12 +2127,12 @@ func TestGenerateOpsCreate_NonRootEntityWithParentTypeOverride(t *testing.T) { require.NotNil(t, file) require.NotNil(t, info) - // parentIDGetter must use dep.EntityName ("Gateway") not ParentEntityType ("KonnectEventControlPlane"), + // parentIDGetter must use dep.EntityName ("Gateway") not ParentEntityType ("KonnectEventGateway"), // because crdFuncsTemplate emits GetGatewayID() based on the OAS path param. assert.Contains(t, file.Content, "parentID := obj.GetGatewayID()") // ParentEntityName uses ParentEntityType override in the error message. - assert.Contains(t, file.Content, `Parent: "KonnectEventControlPlane"`) + assert.Contains(t, file.Content, `Parent: "KonnectEventGateway"`) assert.True(t, info.NeedsClient) assert.Contains(t, file.Content, `"sigs.k8s.io/controller-runtime/pkg/client"`) assert.Contains(t, file.Content, "cl client.Client") @@ -2350,7 +2360,7 @@ func TestGenerateOpsUpdate_NonRootEntityWithParentTypeOverride(t *testing.T) { ReconcilerConfig: map[string]*config.ReconcilerConfig{ "KonnectEventDataPlaneCertificate": { IsRoot: false, - ParentEntityType: "KonnectEventControlPlane", + ParentEntityType: "KonnectEventGateway", }, }, }) @@ -2384,7 +2394,7 @@ func TestGenerateOpsUpdate_NonRootEntityWithParentTypeOverride(t *testing.T) { assert.Contains(t, file.Content, "parentID := obj.GetGatewayID()") // Error label uses ParentEntityType override. - assert.Contains(t, file.Content, `Parent: "KonnectEventControlPlane"`) + assert.Contains(t, file.Content, `Parent: "KonnectEventGateway"`) // Struct fields derived from path params: gatewayId → GatewayID, certificateId → CertificateID. assert.Contains(t, file.Content, "GatewayID: parentID,") @@ -2620,7 +2630,7 @@ func TestGenerateOpsDelete_NonRootEntityWithParentTypeOverride(t *testing.T) { ReconcilerConfig: map[string]*config.ReconcilerConfig{ "KonnectEventDataPlaneCertificate": { IsRoot: false, - ParentEntityType: "KonnectEventControlPlane", + ParentEntityType: "KonnectEventGateway", }, }, }) @@ -2656,7 +2666,7 @@ func TestGenerateOpsDelete_NonRootEntityWithParentTypeOverride(t *testing.T) { assert.Contains(t, file.Content, "parentID := obj.GetGatewayID()") // Error label uses ParentEntityType override. - assert.Contains(t, file.Content, `Parent: "KonnectEventControlPlane"`) + assert.Contains(t, file.Content, `Parent: "KonnectEventGateway"`) // Positional call: sdk.DeleteEventGatewayDataPlaneCertificate(ctx, parentID, id). assert.Contains(t, file.Content, "sdk.DeleteEventGatewayDataPlaneCertificate(ctx, parentID, id)") diff --git a/crd-from-oas/pkg/generator/reconciler.go b/crd-from-oas/pkg/generator/reconciler.go index 16d79a3849..e6821874f1 100644 --- a/crd-from-oas/pkg/generator/reconciler.go +++ b/crd-from-oas/pkg/generator/reconciler.go @@ -130,18 +130,9 @@ type rbacEntity struct { func (g *Generator) generateRBAC(entityNames []string) (string, error) { entities := make([]rbacEntity, 0, len(entityNames)) for _, entityName := range entityNames { - // UnsafeGuessKindToResource _is_ marker as broken but for our purposes - // it's sufficient to get the pluralized resource name for RBAC generation. - // If it fails, changes will get caught in tests or in review or controller-gen - // will generate code that doesn't compile, so it's not a silent failure. - gvk, _ := meta.UnsafeGuessKindToResource(schema.GroupVersionKind{ - Group: g.config.APIGroup, - Version: g.config.APIVersion, - Kind: entityName, - }) entities = append(entities, rbacEntity{ APIGroup: g.config.APIGroup, - ResourceName: gvk.Resource, + ResourceName: g.resourceNameForKind(entityName), }) } @@ -160,6 +151,23 @@ func (g *Generator) generateRBAC(entityNames []string) (string, error) { return buf.String(), nil } +func (g *Generator) resourceNameForKind(kind string) string { + // UnsafeGuessKindToResource is good enough for generated RBAC markers, but + // it incorrectly pluralizes Gateway kinds as gatewaies. + gvr, _ := meta.UnsafeGuessKindToResource(schema.GroupVersionKind{ + Group: g.config.APIGroup, + Version: g.config.APIVersion, + Kind: kind, + }) + + resourceName := gvr.Resource + if strings.HasSuffix(kind, "Gateway") && strings.HasSuffix(resourceName, "gatewaies") { + return strings.TrimSuffix(resourceName, "gatewaies") + "gateways" + } + + return resourceName +} + const childWatchTemplate = sharedGeneratedFilePreamble + ` package konnect @@ -426,13 +434,13 @@ func (g *Generator) reconcilerEntityMetadata( } // toLowerCamel converts a PascalCase name to lowerCamelCase. -// e.g. "Portal" → "portal", "KonnectEventControlPlane" → "konnectEventControlPlane". +// e.g. "Portal" → "portal", "KonnectEventGateway" → "konnectEventControlPlane". func toLowerCamel(s string) string { if s == "" { return s } // Find the boundary: lowercase the leading uppercase run. - // For "KonnectEventControlPlane" → "konnectEventControlPlane" + // For "KonnectEventGateway" → "konnectEventControlPlane" runes := []rune(s) i := 0 for i < len(runes) && unicode.IsUpper(runes[i]) { diff --git a/crd-from-oas/pkg/generator/sdkfactory.go b/crd-from-oas/pkg/generator/sdkfactory.go index 9278049ba6..ef054c60c9 100644 --- a/crd-from-oas/pkg/generator/sdkfactory.go +++ b/crd-from-oas/pkg/generator/sdkfactory.go @@ -27,7 +27,7 @@ type sdkFactoryTemplateData struct { // SDKFactoryFileInfo captures what is needed to emit one GetSDK method on // the shared sdkWrapper and one entry in the GeneratedSDK interface. type SDKFactoryFileInfo struct { - Entity string // e.g. "KonnectEventControlPlane" + Entity string // e.g. "KonnectEventGateway" SDKInterfaceImportPath string // e.g. "github.com/Kong/sdk-konnect-go" SDKInterfaceTypeName string // e.g. "EventGatewaysSDK" SDKFieldName string // e.g. "EventGateways" diff --git a/crd-from-oas/pkg/run/run_test.go b/crd-from-oas/pkg/run/run_test.go index e36b95368d..4dc77c9352 100644 --- a/crd-from-oas/pkg/run/run_test.go +++ b/crd-from-oas/pkg/run/run_test.go @@ -39,8 +39,8 @@ func TestCleanupLegacyGeneratedFiles(t *testing.T) { func TestHandWrittenOpsFileNamesIncludesLegacyKonnectName(t *testing.T) { require.Equal( t, - []string{"ops_konnect_eventcontrolplane.go", "ops_konnecteventcontrolplane.go"}, - handWrittenOpsFileNames("KonnectEventControlPlane"), + []string{"ops_konnect_eventgateway.go", "ops_konnecteventgateway.go"}, + handWrittenOpsFileNames("KonnectEventGateway"), ) } @@ -48,8 +48,8 @@ func TestGeneratedOpsFileNameMatchesGeneratorConvention(t *testing.T) { require.Equal(t, "zz_generated_ops_portal.go", generatedOpsFileName("Portal")) require.Equal( t, - "zz_generated_ops_konnect_eventcontrolplane.go", - generatedOpsFileName("KonnectEventControlPlane"), + "zz_generated_ops_konnect_eventgateway.go", + generatedOpsFileName("KonnectEventGateway"), ) } diff --git a/docs/all-api-reference.md b/docs/all-api-reference.md index af21f91d74..beb1779bfc 100644 --- a/docs/all-api-reference.md +++ b/docs/all-api-reference.md @@ -4947,8 +4947,8 @@ Package v1alpha1 contains API Schema definitions for the konnect.konghq.com v1al - [KonnectCloudGatewayDataPlaneGroupConfiguration](#konnect-konghq-com-v1alpha1-konnectcloudgatewaydataplanegroupconfiguration) - [KonnectCloudGatewayNetwork](#konnect-konghq-com-v1alpha1-konnectcloudgatewaynetwork) - [KonnectCloudGatewayTransitGateway](#konnect-konghq-com-v1alpha1-konnectcloudgatewaytransitgateway) -- [KonnectEventControlPlane](#konnect-konghq-com-v1alpha1-konnecteventcontrolplane) - [KonnectEventDataPlaneCertificate](#konnect-konghq-com-v1alpha1-konnecteventdataplanecertificate) +- [KonnectEventGateway](#konnect-konghq-com-v1alpha1-konnecteventgateway) - [KonnectExtension](#konnect-konghq-com-v1alpha1-konnectextension) - [KonnectGatewayControlPlane](#konnect-konghq-com-v1alpha1-konnectgatewaycontrolplane) - [MCPServer](#konnect-konghq-com-v1alpha1-mcpserver) @@ -5031,35 +5031,35 @@ KonnectCloudGatewayTransitGateway is the Schema for the Konnect Transit Gateway | `spec` _[KonnectCloudGatewayTransitGatewaySpec](#konnect-konghq-com-v1alpha1-types-konnectcloudgatewaytransitgatewayspec)_ | Spec defines the desired state of KonnectCloudGatewayTransitGateway. | | `status` _[KonnectCloudGatewayTransitGatewayStatus](#konnect-konghq-com-v1alpha1-types-konnectcloudgatewaytransitgatewaystatus)_ | Status defines the observed state of KonnectCloudGatewayTransitGateway. | -### KonnectEventControlPlane +### KonnectEventDataPlaneCertificate -KonnectEventControlPlane is the Schema for the konnecteventcontrolplanes API. +KonnectEventDataPlaneCertificate is the Schema for the konnecteventdataplanecertificates API. - + | Field | Description | | --- | --- | | `apiVersion` _string_ | `konnect.konghq.com/v1alpha1` -| `kind` _string_ | `KonnectEventControlPlane` +| `kind` _string_ | `KonnectEventDataPlaneCertificate` | `metadata` _k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta_ | Refer to Kubernetes API documentation for fields of `metadata`. | -| `spec` _[KonnectEventControlPlaneSpec](#konnect-konghq-com-v1alpha1-types-konnecteventcontrolplanespec)_ | | -| `status` _[KonnectEventControlPlaneStatus](#konnect-konghq-com-v1alpha1-types-konnecteventcontrolplanestatus)_ | | +| `spec` _[KonnectEventDataPlaneCertificateSpec](#konnect-konghq-com-v1alpha1-types-konnecteventdataplanecertificatespec)_ | | +| `status` _[KonnectEventDataPlaneCertificateStatus](#konnect-konghq-com-v1alpha1-types-konnecteventdataplanecertificatestatus)_ | | -### KonnectEventDataPlaneCertificate +### KonnectEventGateway -KonnectEventDataPlaneCertificate is the Schema for the konnecteventdataplanecertificates API. +KonnectEventGateway is the Schema for the konnecteventgateways API. - + | Field | Description | | --- | --- | | `apiVersion` _string_ | `konnect.konghq.com/v1alpha1` -| `kind` _string_ | `KonnectEventDataPlaneCertificate` +| `kind` _string_ | `KonnectEventGateway` | `metadata` _k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta_ | Refer to Kubernetes API documentation for fields of `metadata`. | -| `spec` _[KonnectEventDataPlaneCertificateSpec](#konnect-konghq-com-v1alpha1-types-konnecteventdataplanecertificatespec)_ | | -| `status` _[KonnectEventDataPlaneCertificateStatus](#konnect-konghq-com-v1alpha1-types-konnecteventdataplanecertificatestatus)_ | | +| `spec` _[KonnectEventGatewaySpec](#konnect-konghq-com-v1alpha1-types-konnecteventgatewayspec)_ | | +| `status` _[KonnectEventGatewayStatus](#konnect-konghq-com-v1alpha1-types-konnecteventgatewaystatus)_ | | ### KonnectExtension @@ -5406,7 +5406,7 @@ GatewayDescription A human-readable description of the Gateway. _Appears in:_ -- [KonnectEventControlPlaneAPISpec](#konnect-konghq-com-v1alpha1-types-konnecteventcontrolplaneapispec) +- [KonnectEventGatewayAPISpec](#konnect-konghq-com-v1alpha1-types-konnecteventgatewayapispec) #### GatewayName @@ -5419,7 +5419,7 @@ GatewayName The name of the Gateway. _Appears in:_ -- [KonnectEventControlPlaneAPISpec](#konnect-konghq-com-v1alpha1-types-konnecteventcontrolplaneapispec) +- [KonnectEventGatewayAPISpec](#konnect-konghq-com-v1alpha1-types-konnecteventgatewayapispec) #### IdentityProviderEnabled @@ -5811,110 +5811,110 @@ _Appears in:_ -#### KonnectEventControlPlaneAPISpec +#### KonnectEventDataPlaneCertificateAPISpec -KonnectEventControlPlaneAPISpec defines the API spec fields for KonnectEventControlPlane. +KonnectEventDataPlaneCertificateAPISpec defines the API spec fields for KonnectEventDataPlaneCertificate. | Field | Description | | --- | --- | -| `description` _[GatewayDescription](#konnect-konghq-com-v1alpha1-types-gatewaydescription)_ | A human-readable description of the Gateway. | -| `labels` _[Labels](#konnect-konghq-com-v1alpha1-types-labels)_ | Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.

Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_". | -| `min_runtime_version` _[MinRuntimeVersion](#konnect-konghq-com-v1alpha1-types-minruntimeversion)_ | The minimum runtime version supported by the API. This is the lowest version of the data plane release that can be used with the entity model. When not specified, the minimum runtime version will be pinned to the latest available release. | -| `name` _[GatewayName](#konnect-konghq-com-v1alpha1-types-gatewayname)_ | The name of the Gateway. | +| `certificate` _string_ | JSON escaped string of the certificate. | +| `description` _string_ | A description of the certificate. | +| `name` _string_ | The name to identify of the certificate. | _Appears in:_ -- [KonnectEventControlPlaneSpec](#konnect-konghq-com-v1alpha1-types-konnecteventcontrolplanespec) +- [KonnectEventDataPlaneCertificateSpec](#konnect-konghq-com-v1alpha1-types-konnecteventdataplanecertificatespec) -#### KonnectEventControlPlaneSpec +#### KonnectEventDataPlaneCertificateSpec -KonnectEventControlPlaneSpec defines the desired state of KonnectEventControlPlane. +KonnectEventDataPlaneCertificateSpec defines the desired state of KonnectEventDataPlaneCertificate. | Field | Description | | --- | --- | -| `konnect` _[KonnectConfiguration](#konnect-konghq-com-v1alpha2-types-konnectconfiguration)_ | KonnectConfiguration is the Konnect configuration for this entity. | -| `apiSpec` _[KonnectEventControlPlaneAPISpec](#konnect-konghq-com-v1alpha1-types-konnecteventcontrolplaneapispec)_ | APISpec defines the desired state of the resource's API spec fields. | +| `gateway_ref` _[ObjectRef](#common-konghq-com-v1alpha1-types-objectref)_ | GatewayRef is the reference to the parent Gateway object. | +| `type` _[SensitiveDataSourceType](#konnect-konghq-com-v1alpha1-types-sensitivedatasourcetype)_ | Type indicates the source of the sensitive data. Can be 'inline' or 'secretRef'. | +| `apiSpec` _[KonnectEventDataPlaneCertificateAPISpec](#konnect-konghq-com-v1alpha1-types-konnecteventdataplanecertificateapispec)_ | APISpec defines the desired state of the resource's API spec fields. | +| `secretRef` _[NamespacedRef](#common-konghq-com-v1alpha1-types-namespacedref)_ | SecretRef is a reference to a Kubernetes Secret containing the sensitive data. This field is used when type is 'secretRef'. The Secret must contain the relevant data keys for this resource. | _Appears in:_ -- [KonnectEventControlPlane](#konnect-konghq-com-v1alpha1-konnecteventcontrolplane) +- [KonnectEventDataPlaneCertificate](#konnect-konghq-com-v1alpha1-konnecteventdataplanecertificate) -#### KonnectEventControlPlaneStatus +#### KonnectEventDataPlaneCertificateStatus -KonnectEventControlPlaneStatus defines the observed state of KonnectEventControlPlane. +KonnectEventDataPlaneCertificateStatus defines the observed state of KonnectEventDataPlaneCertificate. | Field | Description | | --- | --- | | `conditions` _[]k8s.io/apimachinery/pkg/apis/meta/v1.Condition_ | Conditions represent the current state of the resource. | -| `id` _string_ | ID is the unique identifier of the Konnect entity as assigned by Konnect API. If it's unset (empty string), it means the Konnect entity hasn't been created yet. | -| `serverURL` _string_ | ServerURL is the URL of the Konnect server in which the entity exists. | -| `organizationID` _string_ | OrgID is ID of Konnect Org that this entity has been created in. | +| `gatewayID` _[KonnectEntityRef](#konnect-konghq-com-v1alpha1-types-konnectentityref)_ | GatewayID is the Konnect ID of the parent Gateway. | | `observedGeneration` _int64_ | ObservedGeneration is the most recent generation observed | _Appears in:_ -- [KonnectEventControlPlane](#konnect-konghq-com-v1alpha1-konnecteventcontrolplane) +- [KonnectEventDataPlaneCertificate](#konnect-konghq-com-v1alpha1-konnecteventdataplanecertificate) -#### KonnectEventDataPlaneCertificateAPISpec +#### KonnectEventGatewayAPISpec -KonnectEventDataPlaneCertificateAPISpec defines the API spec fields for KonnectEventDataPlaneCertificate. +KonnectEventGatewayAPISpec defines the API spec fields for KonnectEventGateway. | Field | Description | | --- | --- | -| `certificate` _string_ | JSON escaped string of the certificate. | -| `description` _string_ | A description of the certificate. | -| `name` _string_ | The name to identify of the certificate. | +| `description` _[GatewayDescription](#konnect-konghq-com-v1alpha1-types-gatewaydescription)_ | A human-readable description of the Gateway. | +| `labels` _[Labels](#konnect-konghq-com-v1alpha1-types-labels)_ | Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.

Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_". | +| `min_runtime_version` _[MinRuntimeVersion](#konnect-konghq-com-v1alpha1-types-minruntimeversion)_ | The minimum runtime version supported by the API. This is the lowest version of the data plane release that can be used with the entity model. When not specified, the minimum runtime version will be pinned to the latest available release. | +| `name` _[GatewayName](#konnect-konghq-com-v1alpha1-types-gatewayname)_ | The name of the Gateway. | _Appears in:_ -- [KonnectEventDataPlaneCertificateSpec](#konnect-konghq-com-v1alpha1-types-konnecteventdataplanecertificatespec) +- [KonnectEventGatewaySpec](#konnect-konghq-com-v1alpha1-types-konnecteventgatewayspec) -#### KonnectEventDataPlaneCertificateSpec +#### KonnectEventGatewaySpec -KonnectEventDataPlaneCertificateSpec defines the desired state of KonnectEventDataPlaneCertificate. +KonnectEventGatewaySpec defines the desired state of KonnectEventGateway. | Field | Description | | --- | --- | -| `gateway_ref` _[ObjectRef](#common-konghq-com-v1alpha1-types-objectref)_ | GatewayRef is the reference to the parent Gateway object. | -| `type` _[SensitiveDataSourceType](#konnect-konghq-com-v1alpha1-types-sensitivedatasourcetype)_ | Type indicates the source of the sensitive data. Can be 'inline' or 'secretRef'. | -| `apiSpec` _[KonnectEventDataPlaneCertificateAPISpec](#konnect-konghq-com-v1alpha1-types-konnecteventdataplanecertificateapispec)_ | APISpec defines the desired state of the resource's API spec fields. | -| `secretRef` _[NamespacedRef](#common-konghq-com-v1alpha1-types-namespacedref)_ | SecretRef is a reference to a Kubernetes Secret containing the sensitive data. This field is used when type is 'secretRef'. The Secret must contain the relevant data keys for this resource. | +| `konnect` _[KonnectConfiguration](#konnect-konghq-com-v1alpha2-types-konnectconfiguration)_ | KonnectConfiguration is the Konnect configuration for this entity. | +| `apiSpec` _[KonnectEventGatewayAPISpec](#konnect-konghq-com-v1alpha1-types-konnecteventgatewayapispec)_ | APISpec defines the desired state of the resource's API spec fields. | _Appears in:_ -- [KonnectEventDataPlaneCertificate](#konnect-konghq-com-v1alpha1-konnecteventdataplanecertificate) +- [KonnectEventGateway](#konnect-konghq-com-v1alpha1-konnecteventgateway) -#### KonnectEventDataPlaneCertificateStatus +#### KonnectEventGatewayStatus -KonnectEventDataPlaneCertificateStatus defines the observed state of KonnectEventDataPlaneCertificate. +KonnectEventGatewayStatus defines the observed state of KonnectEventGateway. | Field | Description | | --- | --- | | `conditions` _[]k8s.io/apimachinery/pkg/apis/meta/v1.Condition_ | Conditions represent the current state of the resource. | -| `gatewayID` _[KonnectEntityRef](#konnect-konghq-com-v1alpha1-types-konnectentityref)_ | GatewayID is the Konnect ID of the parent Gateway. | +| `id` _string_ | ID is the unique identifier of the Konnect entity as assigned by Konnect API. If it's unset (empty string), it means the Konnect entity hasn't been created yet. | +| `serverURL` _string_ | ServerURL is the URL of the Konnect server in which the entity exists. | +| `organizationID` _string_ | OrgID is ID of Konnect Org that this entity has been created in. | | `observedGeneration` _int64_ | ObservedGeneration is the most recent generation observed | _Appears in:_ -- [KonnectEventDataPlaneCertificate](#konnect-konghq-com-v1alpha1-konnecteventdataplanecertificate) +- [KonnectEventGateway](#konnect-konghq-com-v1alpha1-konnecteventgateway) #### KonnectExtensionClientAuth @@ -6127,7 +6127,7 @@ list or for searching across entity types.

Keys must be of length 1-6 _Appears in:_ -- [KonnectEventControlPlaneAPISpec](#konnect-konghq-com-v1alpha1-types-konnecteventcontrolplaneapispec) +- [KonnectEventGatewayAPISpec](#konnect-konghq-com-v1alpha1-types-konnecteventgatewayapispec) #### LabelsUpdate @@ -6238,7 +6238,7 @@ available release. _Appears in:_ -- [KonnectEventControlPlaneAPISpec](#konnect-konghq-com-v1alpha1-types-konnecteventcontrolplaneapispec) +- [KonnectEventGatewayAPISpec](#konnect-konghq-com-v1alpha1-types-konnecteventgatewayapispec) #### MirrorKonnect @@ -6902,7 +6902,7 @@ KonnectConfiguration is the Schema for the KonnectConfiguration API. _Appears in:_ - [KonnectCloudGatewayNetworkSpec](#konnect-konghq-com-v1alpha1-types-konnectcloudgatewaynetworkspec) -- [KonnectEventControlPlaneSpec](#konnect-konghq-com-v1alpha1-types-konnecteventcontrolplanespec) +- [KonnectEventGatewaySpec](#konnect-konghq-com-v1alpha1-types-konnecteventgatewayspec) - [KonnectExtensionKonnectSpec](#konnect-konghq-com-v1alpha1-types-konnectextensionkonnectspec) - [KonnectGatewayControlPlaneSpec](#konnect-konghq-com-v1alpha1-types-konnectgatewaycontrolplanespec) - [PortalSpec](#konnect-konghq-com-v1alpha1-types-portalspec) @@ -6949,7 +6949,7 @@ _Appears in:_ - [KonnectEntityStatusWithControlPlaneAndUpstreamRefs](#konnect-konghq-com-v1alpha2-types-konnectentitystatuswithcontrolplaneandupstreamrefs) - [KonnectEntityStatusWithControlPlaneRef](#konnect-konghq-com-v1alpha2-types-konnectentitystatuswithcontrolplaneref) - [KonnectEntityStatusWithNetworkRef](#konnect-konghq-com-v1alpha2-types-konnectentitystatuswithnetworkref) -- [KonnectEventControlPlaneStatus](#konnect-konghq-com-v1alpha1-types-konnecteventcontrolplanestatus) +- [KonnectEventGatewayStatus](#konnect-konghq-com-v1alpha1-types-konnecteventgatewaystatus) - [KonnectGatewayControlPlaneStatus](#konnect-konghq-com-v1alpha1-types-konnectgatewaycontrolplanestatus) - [KonnectGatewayControlPlaneStatus](#konnect-konghq-com-v1alpha2-types-konnectgatewaycontrolplanestatus) - [MCPServerStatus](#konnect-konghq-com-v1alpha1-types-mcpserverstatus) diff --git a/docs/konnect-api-reference.md b/docs/konnect-api-reference.md index f4f0707d96..03f49ada69 100644 --- a/docs/konnect-api-reference.md +++ b/docs/konnect-api-reference.md @@ -14,8 +14,8 @@ Package v1alpha1 contains API Schema definitions for the konnect.konghq.com v1al - [KonnectCloudGatewayDataPlaneGroupConfiguration](#konnect-konghq-com-v1alpha1-konnectcloudgatewaydataplanegroupconfiguration) - [KonnectCloudGatewayNetwork](#konnect-konghq-com-v1alpha1-konnectcloudgatewaynetwork) - [KonnectCloudGatewayTransitGateway](#konnect-konghq-com-v1alpha1-konnectcloudgatewaytransitgateway) -- [KonnectEventControlPlane](#konnect-konghq-com-v1alpha1-konnecteventcontrolplane) - [KonnectEventDataPlaneCertificate](#konnect-konghq-com-v1alpha1-konnecteventdataplanecertificate) +- [KonnectEventGateway](#konnect-konghq-com-v1alpha1-konnecteventgateway) - [KonnectExtension](#konnect-konghq-com-v1alpha1-konnectextension) - [KonnectGatewayControlPlane](#konnect-konghq-com-v1alpha1-konnectgatewaycontrolplane) - [MCPServer](#konnect-konghq-com-v1alpha1-mcpserver) @@ -98,35 +98,35 @@ KonnectCloudGatewayTransitGateway is the Schema for the Konnect Transit Gateway | `spec` _[KonnectCloudGatewayTransitGatewaySpec](#konnect-konghq-com-v1alpha1-types-konnectcloudgatewaytransitgatewayspec)_ | Spec defines the desired state of KonnectCloudGatewayTransitGateway. | | `status` _[KonnectCloudGatewayTransitGatewayStatus](#konnect-konghq-com-v1alpha1-types-konnectcloudgatewaytransitgatewaystatus)_ | Status defines the observed state of KonnectCloudGatewayTransitGateway. | -### KonnectEventControlPlane +### KonnectEventDataPlaneCertificate -KonnectEventControlPlane is the Schema for the konnecteventcontrolplanes API. +KonnectEventDataPlaneCertificate is the Schema for the konnecteventdataplanecertificates API. - + | Field | Description | | --- | --- | | `apiVersion` _string_ | `konnect.konghq.com/v1alpha1` -| `kind` _string_ | `KonnectEventControlPlane` +| `kind` _string_ | `KonnectEventDataPlaneCertificate` | `metadata` _k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta_ | Refer to Kubernetes API documentation for fields of `metadata`. | -| `spec` _[KonnectEventControlPlaneSpec](#konnect-konghq-com-v1alpha1-types-konnecteventcontrolplanespec)_ | | -| `status` _[KonnectEventControlPlaneStatus](#konnect-konghq-com-v1alpha1-types-konnecteventcontrolplanestatus)_ | | +| `spec` _[KonnectEventDataPlaneCertificateSpec](#konnect-konghq-com-v1alpha1-types-konnecteventdataplanecertificatespec)_ | | +| `status` _[KonnectEventDataPlaneCertificateStatus](#konnect-konghq-com-v1alpha1-types-konnecteventdataplanecertificatestatus)_ | | -### KonnectEventDataPlaneCertificate +### KonnectEventGateway -KonnectEventDataPlaneCertificate is the Schema for the konnecteventdataplanecertificates API. +KonnectEventGateway is the Schema for the konnecteventgateways API. - + | Field | Description | | --- | --- | | `apiVersion` _string_ | `konnect.konghq.com/v1alpha1` -| `kind` _string_ | `KonnectEventDataPlaneCertificate` +| `kind` _string_ | `KonnectEventGateway` | `metadata` _k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta_ | Refer to Kubernetes API documentation for fields of `metadata`. | -| `spec` _[KonnectEventDataPlaneCertificateSpec](#konnect-konghq-com-v1alpha1-types-konnecteventdataplanecertificatespec)_ | | -| `status` _[KonnectEventDataPlaneCertificateStatus](#konnect-konghq-com-v1alpha1-types-konnecteventdataplanecertificatestatus)_ | | +| `spec` _[KonnectEventGatewaySpec](#konnect-konghq-com-v1alpha1-types-konnecteventgatewayspec)_ | | +| `status` _[KonnectEventGatewayStatus](#konnect-konghq-com-v1alpha1-types-konnecteventgatewaystatus)_ | | ### KonnectExtension @@ -473,7 +473,7 @@ GatewayDescription A human-readable description of the Gateway. _Appears in:_ -- [KonnectEventControlPlaneAPISpec](#konnect-konghq-com-v1alpha1-types-konnecteventcontrolplaneapispec) +- [KonnectEventGatewayAPISpec](#konnect-konghq-com-v1alpha1-types-konnecteventgatewayapispec) #### GatewayName @@ -486,7 +486,7 @@ GatewayName The name of the Gateway. _Appears in:_ -- [KonnectEventControlPlaneAPISpec](#konnect-konghq-com-v1alpha1-types-konnecteventcontrolplaneapispec) +- [KonnectEventGatewayAPISpec](#konnect-konghq-com-v1alpha1-types-konnecteventgatewayapispec) #### IdentityProviderEnabled @@ -878,110 +878,110 @@ _Appears in:_ -#### KonnectEventControlPlaneAPISpec +#### KonnectEventDataPlaneCertificateAPISpec -KonnectEventControlPlaneAPISpec defines the API spec fields for KonnectEventControlPlane. +KonnectEventDataPlaneCertificateAPISpec defines the API spec fields for KonnectEventDataPlaneCertificate. | Field | Description | | --- | --- | -| `description` _[GatewayDescription](#konnect-konghq-com-v1alpha1-types-gatewaydescription)_ | A human-readable description of the Gateway. | -| `labels` _[Labels](#konnect-konghq-com-v1alpha1-types-labels)_ | Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.

Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_". | -| `min_runtime_version` _[MinRuntimeVersion](#konnect-konghq-com-v1alpha1-types-minruntimeversion)_ | The minimum runtime version supported by the API. This is the lowest version of the data plane release that can be used with the entity model. When not specified, the minimum runtime version will be pinned to the latest available release. | -| `name` _[GatewayName](#konnect-konghq-com-v1alpha1-types-gatewayname)_ | The name of the Gateway. | +| `certificate` _string_ | JSON escaped string of the certificate. | +| `description` _string_ | A description of the certificate. | +| `name` _string_ | The name to identify of the certificate. | _Appears in:_ -- [KonnectEventControlPlaneSpec](#konnect-konghq-com-v1alpha1-types-konnecteventcontrolplanespec) +- [KonnectEventDataPlaneCertificateSpec](#konnect-konghq-com-v1alpha1-types-konnecteventdataplanecertificatespec) -#### KonnectEventControlPlaneSpec +#### KonnectEventDataPlaneCertificateSpec -KonnectEventControlPlaneSpec defines the desired state of KonnectEventControlPlane. +KonnectEventDataPlaneCertificateSpec defines the desired state of KonnectEventDataPlaneCertificate. | Field | Description | | --- | --- | -| `konnect` _[KonnectConfiguration](#konnect-konghq-com-v1alpha2-types-konnectconfiguration)_ | KonnectConfiguration is the Konnect configuration for this entity. | -| `apiSpec` _[KonnectEventControlPlaneAPISpec](#konnect-konghq-com-v1alpha1-types-konnecteventcontrolplaneapispec)_ | APISpec defines the desired state of the resource's API spec fields. | +| `gateway_ref` _[ObjectRef](#common-konghq-com-v1alpha1-types-objectref)_ | GatewayRef is the reference to the parent Gateway object. | +| `type` _[SensitiveDataSourceType](#konnect-konghq-com-v1alpha1-types-sensitivedatasourcetype)_ | Type indicates the source of the sensitive data. Can be 'inline' or 'secretRef'. | +| `apiSpec` _[KonnectEventDataPlaneCertificateAPISpec](#konnect-konghq-com-v1alpha1-types-konnecteventdataplanecertificateapispec)_ | APISpec defines the desired state of the resource's API spec fields. | +| `secretRef` _[NamespacedRef](#common-konghq-com-v1alpha1-types-namespacedref)_ | SecretRef is a reference to a Kubernetes Secret containing the sensitive data. This field is used when type is 'secretRef'. The Secret must contain the relevant data keys for this resource. | _Appears in:_ -- [KonnectEventControlPlane](#konnect-konghq-com-v1alpha1-konnecteventcontrolplane) +- [KonnectEventDataPlaneCertificate](#konnect-konghq-com-v1alpha1-konnecteventdataplanecertificate) -#### KonnectEventControlPlaneStatus +#### KonnectEventDataPlaneCertificateStatus -KonnectEventControlPlaneStatus defines the observed state of KonnectEventControlPlane. +KonnectEventDataPlaneCertificateStatus defines the observed state of KonnectEventDataPlaneCertificate. | Field | Description | | --- | --- | | `conditions` _[]k8s.io/apimachinery/pkg/apis/meta/v1.Condition_ | Conditions represent the current state of the resource. | -| `id` _string_ | ID is the unique identifier of the Konnect entity as assigned by Konnect API. If it's unset (empty string), it means the Konnect entity hasn't been created yet. | -| `serverURL` _string_ | ServerURL is the URL of the Konnect server in which the entity exists. | -| `organizationID` _string_ | OrgID is ID of Konnect Org that this entity has been created in. | +| `gatewayID` _[KonnectEntityRef](#konnect-konghq-com-v1alpha1-types-konnectentityref)_ | GatewayID is the Konnect ID of the parent Gateway. | | `observedGeneration` _int64_ | ObservedGeneration is the most recent generation observed | _Appears in:_ -- [KonnectEventControlPlane](#konnect-konghq-com-v1alpha1-konnecteventcontrolplane) +- [KonnectEventDataPlaneCertificate](#konnect-konghq-com-v1alpha1-konnecteventdataplanecertificate) -#### KonnectEventDataPlaneCertificateAPISpec +#### KonnectEventGatewayAPISpec -KonnectEventDataPlaneCertificateAPISpec defines the API spec fields for KonnectEventDataPlaneCertificate. +KonnectEventGatewayAPISpec defines the API spec fields for KonnectEventGateway. | Field | Description | | --- | --- | -| `certificate` _string_ | JSON escaped string of the certificate. | -| `description` _string_ | A description of the certificate. | -| `name` _string_ | The name to identify of the certificate. | +| `description` _[GatewayDescription](#konnect-konghq-com-v1alpha1-types-gatewaydescription)_ | A human-readable description of the Gateway. | +| `labels` _[Labels](#konnect-konghq-com-v1alpha1-types-labels)_ | Labels store metadata of an entity that can be used for filtering an entity list or for searching across entity types.

Keys must be of length 1-63 characters, and cannot start with "kong", "konnect", "mesh", "kic", or "_". | +| `min_runtime_version` _[MinRuntimeVersion](#konnect-konghq-com-v1alpha1-types-minruntimeversion)_ | The minimum runtime version supported by the API. This is the lowest version of the data plane release that can be used with the entity model. When not specified, the minimum runtime version will be pinned to the latest available release. | +| `name` _[GatewayName](#konnect-konghq-com-v1alpha1-types-gatewayname)_ | The name of the Gateway. | _Appears in:_ -- [KonnectEventDataPlaneCertificateSpec](#konnect-konghq-com-v1alpha1-types-konnecteventdataplanecertificatespec) +- [KonnectEventGatewaySpec](#konnect-konghq-com-v1alpha1-types-konnecteventgatewayspec) -#### KonnectEventDataPlaneCertificateSpec +#### KonnectEventGatewaySpec -KonnectEventDataPlaneCertificateSpec defines the desired state of KonnectEventDataPlaneCertificate. +KonnectEventGatewaySpec defines the desired state of KonnectEventGateway. | Field | Description | | --- | --- | -| `gateway_ref` _[ObjectRef](#common-konghq-com-v1alpha1-types-objectref)_ | GatewayRef is the reference to the parent Gateway object. | -| `type` _[SensitiveDataSourceType](#konnect-konghq-com-v1alpha1-types-sensitivedatasourcetype)_ | Type indicates the source of the sensitive data. Can be 'inline' or 'secretRef'. | -| `apiSpec` _[KonnectEventDataPlaneCertificateAPISpec](#konnect-konghq-com-v1alpha1-types-konnecteventdataplanecertificateapispec)_ | APISpec defines the desired state of the resource's API spec fields. | -| `secretRef` _[NamespacedRef](#common-konghq-com-v1alpha1-types-namespacedref)_ | SecretRef is a reference to a Kubernetes Secret containing the sensitive data. This field is used when type is 'secretRef'. The Secret must contain the relevant data keys for this resource. | +| `konnect` _[KonnectConfiguration](#konnect-konghq-com-v1alpha2-types-konnectconfiguration)_ | KonnectConfiguration is the Konnect configuration for this entity. | +| `apiSpec` _[KonnectEventGatewayAPISpec](#konnect-konghq-com-v1alpha1-types-konnecteventgatewayapispec)_ | APISpec defines the desired state of the resource's API spec fields. | _Appears in:_ -- [KonnectEventDataPlaneCertificate](#konnect-konghq-com-v1alpha1-konnecteventdataplanecertificate) +- [KonnectEventGateway](#konnect-konghq-com-v1alpha1-konnecteventgateway) -#### KonnectEventDataPlaneCertificateStatus +#### KonnectEventGatewayStatus -KonnectEventDataPlaneCertificateStatus defines the observed state of KonnectEventDataPlaneCertificate. +KonnectEventGatewayStatus defines the observed state of KonnectEventGateway. | Field | Description | | --- | --- | | `conditions` _[]k8s.io/apimachinery/pkg/apis/meta/v1.Condition_ | Conditions represent the current state of the resource. | -| `gatewayID` _[KonnectEntityRef](#konnect-konghq-com-v1alpha1-types-konnectentityref)_ | GatewayID is the Konnect ID of the parent Gateway. | +| `id` _string_ | ID is the unique identifier of the Konnect entity as assigned by Konnect API. If it's unset (empty string), it means the Konnect entity hasn't been created yet. | +| `serverURL` _string_ | ServerURL is the URL of the Konnect server in which the entity exists. | +| `organizationID` _string_ | OrgID is ID of Konnect Org that this entity has been created in. | | `observedGeneration` _int64_ | ObservedGeneration is the most recent generation observed | _Appears in:_ -- [KonnectEventDataPlaneCertificate](#konnect-konghq-com-v1alpha1-konnecteventdataplanecertificate) +- [KonnectEventGateway](#konnect-konghq-com-v1alpha1-konnecteventgateway) #### KonnectExtensionClientAuth @@ -1194,7 +1194,7 @@ list or for searching across entity types.

Keys must be of length 1-6 _Appears in:_ -- [KonnectEventControlPlaneAPISpec](#konnect-konghq-com-v1alpha1-types-konnecteventcontrolplaneapispec) +- [KonnectEventGatewayAPISpec](#konnect-konghq-com-v1alpha1-types-konnecteventgatewayapispec) #### LabelsUpdate @@ -1305,7 +1305,7 @@ available release. _Appears in:_ -- [KonnectEventControlPlaneAPISpec](#konnect-konghq-com-v1alpha1-types-konnecteventcontrolplaneapispec) +- [KonnectEventGatewayAPISpec](#konnect-konghq-com-v1alpha1-types-konnecteventgatewayapispec) #### MirrorKonnect @@ -1967,7 +1967,7 @@ KonnectConfiguration is the Schema for the KonnectConfiguration API. _Appears in:_ - [KonnectCloudGatewayNetworkSpec](#konnect-konghq-com-v1alpha1-types-konnectcloudgatewaynetworkspec) -- [KonnectEventControlPlaneSpec](#konnect-konghq-com-v1alpha1-types-konnecteventcontrolplanespec) +- [KonnectEventGatewaySpec](#konnect-konghq-com-v1alpha1-types-konnecteventgatewayspec) - [KonnectExtensionKonnectSpec](#konnect-konghq-com-v1alpha1-types-konnectextensionkonnectspec) - [KonnectGatewayControlPlaneSpec](#konnect-konghq-com-v1alpha1-types-konnectgatewaycontrolplanespec) - [PortalSpec](#konnect-konghq-com-v1alpha1-types-portalspec) @@ -2014,7 +2014,7 @@ _Appears in:_ - [KonnectEntityStatusWithControlPlaneAndUpstreamRefs](#konnect-konghq-com-v1alpha2-types-konnectentitystatuswithcontrolplaneandupstreamrefs) - [KonnectEntityStatusWithControlPlaneRef](#konnect-konghq-com-v1alpha2-types-konnectentitystatuswithcontrolplaneref) - [KonnectEntityStatusWithNetworkRef](#konnect-konghq-com-v1alpha2-types-konnectentitystatuswithnetworkref) -- [KonnectEventControlPlaneStatus](#konnect-konghq-com-v1alpha1-types-konnecteventcontrolplanestatus) +- [KonnectEventGatewayStatus](#konnect-konghq-com-v1alpha1-types-konnecteventgatewaystatus) - [KonnectGatewayControlPlaneStatus](#konnect-konghq-com-v1alpha1-types-konnectgatewaycontrolplanestatus) - [KonnectGatewayControlPlaneStatus](#konnect-konghq-com-v1alpha2-types-konnectgatewaycontrolplanestatus) - [MCPServerStatus](#konnect-konghq-com-v1alpha1-types-mcpserverstatus) diff --git a/internal/utils/index/zz_generated_konnect_eventcontrolplane.go b/internal/utils/index/zz_generated_konnect_eventcontrolplane.go deleted file mode 100644 index e496afa9b0..0000000000 --- a/internal/utils/index/zz_generated_konnect_eventcontrolplane.go +++ /dev/null @@ -1,37 +0,0 @@ -// Code generated by CRD generation pipeline. DO NOT EDIT. - -package index - -import ( - "sigs.k8s.io/controller-runtime/pkg/client" - - konnectv1alpha1 "github.com/kong/kong-operator/v2/api/konnect/v1alpha1" -) - -const ( - // IndexFieldKonnectEventControlPlaneOnAPIAuthConfiguration is the index field for KonnectEventControlPlane -> APIAuthConfiguration. - IndexFieldKonnectEventControlPlaneOnAPIAuthConfiguration = "konnectEventControlPlaneAPIAuthConfigurationRef" -) - -// OptionsForKonnectEventControlPlane returns required Index options for KonnectEventControlPlane reconciler. -func OptionsForKonnectEventControlPlane() []Option { - return []Option{ - { - Object: &konnectv1alpha1.KonnectEventControlPlane{}, - Field: IndexFieldKonnectEventControlPlaneOnAPIAuthConfiguration, - ExtractValueFn: konnectEventControlPlaneAPIAuthConfigurationRef, - }, - } -} - -func konnectEventControlPlaneAPIAuthConfigurationRef(object client.Object) []string { - ent, ok := object.(*konnectv1alpha1.KonnectEventControlPlane) - if !ok { - return nil - } - if ent.Spec.KonnectConfiguration.APIAuthConfigurationRef.Name == "" { - return nil - } - - return []string{ent.GetNamespace() + "/" + ent.Spec.KonnectConfiguration.APIAuthConfigurationRef.Name} -} diff --git a/internal/utils/index/zz_generated_konnect_eventcontrolplane_test.go b/internal/utils/index/zz_generated_konnect_eventcontrolplane_test.go deleted file mode 100644 index 0e0bc3a155..0000000000 --- a/internal/utils/index/zz_generated_konnect_eventcontrolplane_test.go +++ /dev/null @@ -1,92 +0,0 @@ -package index - -import ( - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "sigs.k8s.io/controller-runtime/pkg/client" - - konnectv1alpha1 "github.com/kong/kong-operator/v2/api/konnect/v1alpha1" - konnectv1alpha2 "github.com/kong/kong-operator/v2/api/konnect/v1alpha2" -) - -func TestOptionsForKonnectEventControlPlane(t *testing.T) { - options := OptionsForKonnectEventControlPlane() - - require.Len(t, options, 1) - - option := options[0] - assert.IsType(t, &konnectv1alpha1.KonnectEventControlPlane{}, option.Object) - assert.Equal(t, IndexFieldKonnectEventControlPlaneOnAPIAuthConfiguration, option.Field) - assert.NotNil(t, option.ExtractValueFn) - - result := option.ExtractValueFn(&konnectv1alpha1.KonnectEventControlPlane{ - ObjectMeta: metav1.ObjectMeta{ - Name: "event-cp", - Namespace: "default", - }, - Spec: konnectv1alpha1.KonnectEventControlPlaneSpec{ - KonnectConfiguration: konnectv1alpha2.KonnectConfiguration{ - APIAuthConfigurationRef: konnectv1alpha2.KonnectAPIAuthConfigurationRef{ - Name: "auth", - }, - }, - }, - }) - assert.Equal(t, []string{"default/auth"}, result) -} - -func TestKonnectEventControlPlaneAPIAuthConfigurationRef(t *testing.T) { - tests := []struct { - name string - input client.Object - expected []string - }{ - { - name: "returns nil for nil object", - input: nil, - expected: nil, - }, - { - name: "returns nil for wrong type", - input: &konnectv1alpha2.KonnectExtension{}, - expected: nil, - }, - { - name: "returns nil when auth ref name is empty", - input: &konnectv1alpha1.KonnectEventControlPlane{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: "default", - }, - Spec: konnectv1alpha1.KonnectEventControlPlaneSpec{ - KonnectConfiguration: konnectv1alpha2.KonnectConfiguration{}, - }, - }, - expected: nil, - }, - { - name: "returns namespace scoped auth ref key", - input: &konnectv1alpha1.KonnectEventControlPlane{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: "default", - }, - Spec: konnectv1alpha1.KonnectEventControlPlaneSpec{ - KonnectConfiguration: konnectv1alpha2.KonnectConfiguration{ - APIAuthConfigurationRef: konnectv1alpha2.KonnectAPIAuthConfigurationRef{ - Name: "auth", - }, - }, - }, - }, - expected: []string{"default/auth"}, - }, - } - - for _, tc := range tests { - t.Run(tc.name, func(t *testing.T) { - assert.Equal(t, tc.expected, konnectEventControlPlaneAPIAuthConfigurationRef(tc.input)) - }) - } -} diff --git a/internal/utils/index/zz_generated_konnect_eventdataplanecertificate.go b/internal/utils/index/zz_generated_konnect_eventdataplanecertificate.go index f1415bb1bf..db7c79893b 100644 --- a/internal/utils/index/zz_generated_konnect_eventdataplanecertificate.go +++ b/internal/utils/index/zz_generated_konnect_eventdataplanecertificate.go @@ -9,8 +9,8 @@ import ( ) const ( - // IndexFieldKonnectEventDataPlaneCertificateOnKonnectEventControlPlaneRef is the index field for KonnectEventDataPlaneCertificate -> KonnectEventControlPlane. - IndexFieldKonnectEventDataPlaneCertificateOnKonnectEventControlPlaneRef = "konnectEventDataPlaneCertificateOnKonnectEventControlPlaneRef" + // IndexFieldKonnectEventDataPlaneCertificateOnKonnectEventGatewayRef is the index field for KonnectEventDataPlaneCertificate -> KonnectEventGateway. + IndexFieldKonnectEventDataPlaneCertificateOnKonnectEventGatewayRef = "konnectEventDataPlaneCertificateOnKonnectEventGatewayRef" ) // OptionsForKonnectEventDataPlaneCertificate returns required Index options for KonnectEventDataPlaneCertificate reconciler. @@ -18,13 +18,13 @@ func OptionsForKonnectEventDataPlaneCertificate() []Option { return []Option{ { Object: &konnectv1alpha1.KonnectEventDataPlaneCertificate{}, - Field: IndexFieldKonnectEventDataPlaneCertificateOnKonnectEventControlPlaneRef, - ExtractValueFn: konnectEventDataPlaneCertificateOnKonnectEventControlPlaneRef, + Field: IndexFieldKonnectEventDataPlaneCertificateOnKonnectEventGatewayRef, + ExtractValueFn: konnectEventDataPlaneCertificateOnKonnectEventGatewayRef, }, } } -func konnectEventDataPlaneCertificateOnKonnectEventControlPlaneRef(object client.Object) []string { +func konnectEventDataPlaneCertificateOnKonnectEventGatewayRef(object client.Object) []string { ent, ok := object.(*konnectv1alpha1.KonnectEventDataPlaneCertificate) if !ok { return nil diff --git a/internal/utils/index/zz_generated_konnect_eventdataplanecertificate_test.go b/internal/utils/index/zz_generated_konnect_eventdataplanecertificate_test.go deleted file mode 100644 index 6d2854ce6c..0000000000 --- a/internal/utils/index/zz_generated_konnect_eventdataplanecertificate_test.go +++ /dev/null @@ -1,86 +0,0 @@ -package index - -import ( - "testing" - - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "sigs.k8s.io/controller-runtime/pkg/client" - - commonv1alpha1 "github.com/kong/kong-operator/v2/api/common/v1alpha1" - konnectv1alpha1 "github.com/kong/kong-operator/v2/api/konnect/v1alpha1" - konnectv1alpha2 "github.com/kong/kong-operator/v2/api/konnect/v1alpha2" -) - -func TestOptionsForKonnectEventDataPlaneCertificate(t *testing.T) { - options := OptionsForKonnectEventDataPlaneCertificate() - - require.Len(t, options, 1) - - option := options[0] - assert.IsType(t, &konnectv1alpha1.KonnectEventDataPlaneCertificate{}, option.Object) - assert.Equal(t, IndexFieldKonnectEventDataPlaneCertificateOnKonnectEventControlPlaneRef, option.Field) - assert.NotNil(t, option.ExtractValueFn) - - result := option.ExtractValueFn(&konnectv1alpha1.KonnectEventDataPlaneCertificate{ - ObjectMeta: metav1.ObjectMeta{ - Namespace: "default", - }, - Spec: konnectv1alpha1.KonnectEventDataPlaneCertificateSpec{ - GatewayRef: commonv1alpha1.ObjectRef{ - Type: commonv1alpha1.ObjectRefTypeNamespacedRef, - NamespacedRef: &commonv1alpha1.NamespacedRef{ - Name: "event-cp", - }, - }, - }, - }) - assert.Equal(t, []string{"event-cp"}, result) -} - -func TestKonnectEventDataPlaneCertificateOnKonnectEventControlPlaneRef(t *testing.T) { - tests := []struct { - name string - input client.Object - expected []string - }{ - { - name: "returns nil for nil object", - input: nil, - expected: nil, - }, - { - name: "returns nil for wrong type", - input: &konnectv1alpha2.KonnectExtension{}, - expected: nil, - }, - { - name: "returns nil when namespaced ref is empty", - input: &konnectv1alpha1.KonnectEventDataPlaneCertificate{ - Spec: konnectv1alpha1.KonnectEventDataPlaneCertificateSpec{}, - }, - expected: nil, - }, - { - name: "returns gateway ref name", - input: &konnectv1alpha1.KonnectEventDataPlaneCertificate{ - Spec: konnectv1alpha1.KonnectEventDataPlaneCertificateSpec{ - GatewayRef: commonv1alpha1.ObjectRef{ - Type: commonv1alpha1.ObjectRefTypeNamespacedRef, - NamespacedRef: &commonv1alpha1.NamespacedRef{ - Name: "event-cp", - }, - }, - }, - }, - expected: []string{"event-cp"}, - }, - } - - for _, tc := range tests { - t.Run(tc.name, func(t *testing.T) { - assert.Equal(t, tc.expected, konnectEventDataPlaneCertificateOnKonnectEventControlPlaneRef(tc.input)) - }) - } -} diff --git a/internal/utils/index/zz_generated_konnect_eventgateway.go b/internal/utils/index/zz_generated_konnect_eventgateway.go new file mode 100644 index 0000000000..da6cde39fb --- /dev/null +++ b/internal/utils/index/zz_generated_konnect_eventgateway.go @@ -0,0 +1,37 @@ +// Code generated by CRD generation pipeline. DO NOT EDIT. + +package index + +import ( + "sigs.k8s.io/controller-runtime/pkg/client" + + konnectv1alpha1 "github.com/kong/kong-operator/v2/api/konnect/v1alpha1" +) + +const ( + // IndexFieldKonnectEventGatewayOnAPIAuthConfiguration is the index field for KonnectEventGateway -> APIAuthConfiguration. + IndexFieldKonnectEventGatewayOnAPIAuthConfiguration = "konnectEventGatewayAPIAuthConfigurationRef" +) + +// OptionsForKonnectEventGateway returns required Index options for KonnectEventGateway reconciler. +func OptionsForKonnectEventGateway() []Option { + return []Option{ + { + Object: &konnectv1alpha1.KonnectEventGateway{}, + Field: IndexFieldKonnectEventGatewayOnAPIAuthConfiguration, + ExtractValueFn: konnectEventGatewayAPIAuthConfigurationRef, + }, + } +} + +func konnectEventGatewayAPIAuthConfigurationRef(object client.Object) []string { + ent, ok := object.(*konnectv1alpha1.KonnectEventGateway) + if !ok { + return nil + } + if ent.Spec.KonnectConfiguration.APIAuthConfigurationRef.Name == "" { + return nil + } + + return []string{ent.GetNamespace() + "/" + ent.Spec.KonnectConfiguration.APIAuthConfigurationRef.Name} +} diff --git a/modules/manager/zz_generated_konnect_controller_setup.go b/modules/manager/zz_generated_konnect_controller_setup.go index ac8e07fb8f..98b2336af0 100644 --- a/modules/manager/zz_generated_konnect_controller_setup.go +++ b/modules/manager/zz_generated_konnect_controller_setup.go @@ -11,8 +11,8 @@ func generatedControllersForKonnectEntities( ) []ControllerDef { return []ControllerDef{ newKonnectEntityController[konnectv1alpha1.IdentityProviderRequest](controllerFactory), - newKonnectEntityController[konnectv1alpha1.KonnectEventControlPlane](controllerFactory), newKonnectEntityController[konnectv1alpha1.KonnectEventDataPlaneCertificate](controllerFactory), + newKonnectEntityController[konnectv1alpha1.KonnectEventGateway](controllerFactory), newKonnectEntityController[konnectv1alpha1.Portal](controllerFactory), newKonnectEntityController[konnectv1alpha1.PortalPage](controllerFactory), newKonnectEntityController[konnectv1alpha1.PortalTeam](controllerFactory), diff --git a/modules/manager/zz_generated_konnect_index_options.go b/modules/manager/zz_generated_konnect_index_options.go index 27f10af5ab..72d0c5d091 100644 --- a/modules/manager/zz_generated_konnect_index_options.go +++ b/modules/manager/zz_generated_konnect_index_options.go @@ -15,8 +15,8 @@ func generatedIndexOptionsForKonnectEntities( ) []index.Option { return slices.Concat( index.OptionsForIdentityProviderRequest(), - index.OptionsForKonnectEventControlPlane(), index.OptionsForKonnectEventDataPlaneCertificate(), + index.OptionsForKonnectEventGateway(), index.OptionsForPortal(), index.OptionsForPortalPage(), index.OptionsForPortalTeam(), diff --git a/test/crdsvalidation/konnect.konghq.com/konnecteventcontrolplane_test.go b/test/crdsvalidation/konnect.konghq.com/konnecteventcontrolplane_test.go index 46fffe0526..a79a87feb3 100644 --- a/test/crdsvalidation/konnect.konghq.com/konnecteventcontrolplane_test.go +++ b/test/crdsvalidation/konnect.konghq.com/konnecteventcontrolplane_test.go @@ -11,7 +11,7 @@ import ( "github.com/kong/kong-operator/v2/test/envtest" ) -func TestKonnectEventControlPlane(t *testing.T) { +func TestKonnectEventGateway(t *testing.T) { t.Parallel() ctx := t.Context() @@ -19,16 +19,16 @@ func TestKonnectEventControlPlane(t *testing.T) { cfg, ns := envtest.Setup(t, ctx, scheme) t.Run("labels field validation", func(t *testing.T) { - controlPlaneWithLabelValue := func(labelValue string) *konnectv1alpha1.KonnectEventControlPlane { - return &konnectv1alpha1.KonnectEventControlPlane{ + controlPlaneWithLabelValue := func(labelValue string) *konnectv1alpha1.KonnectEventGateway { + return &konnectv1alpha1.KonnectEventGateway{ ObjectMeta: common.CommonObjectMeta(ns.Name), - Spec: konnectv1alpha1.KonnectEventControlPlaneSpec{ + Spec: konnectv1alpha1.KonnectEventGatewaySpec{ KonnectConfiguration: konnectv1alpha2.KonnectConfiguration{ APIAuthConfigurationRef: konnectv1alpha2.KonnectAPIAuthConfigurationRef{ Name: "test-auth", }, }, - APISpec: konnectv1alpha1.KonnectEventControlPlaneAPISpec{ + APISpec: konnectv1alpha1.KonnectEventGatewayAPISpec{ Name: "event-control-plane", Labels: konnectv1alpha1.Labels{ "team": konnectv1alpha1.LabelsValue(labelValue), @@ -38,7 +38,7 @@ func TestKonnectEventControlPlane(t *testing.T) { } } - common.TestCasesGroup[*konnectv1alpha1.KonnectEventControlPlane]{ + common.TestCasesGroup[*konnectv1alpha1.KonnectEventGateway]{ { Name: "labels value at max length (63) passes validation", TestObject: controlPlaneWithLabelValue(strings.Repeat("a", 63)), diff --git a/test/envtest/keg_dataplane_controller_test.go b/test/envtest/keg_dataplane_controller_test.go index 419f496354..777d977ee1 100644 --- a/test/envtest/keg_dataplane_controller_test.go +++ b/test/envtest/keg_dataplane_controller_test.go @@ -58,7 +58,7 @@ func TestKEGDataPlaneReconciler(t *testing.T) { cl := mgr.GetClient() - t.Run("KonnectEventControlPlane not found sets NotFound condition", func(t *testing.T) { + t.Run("KonnectEventGateway not found sets NotFound condition", func(t *testing.T) { t.Parallel() egdp := &eventgatewayv1alpha1.KegDataPlane{ @@ -98,10 +98,10 @@ func TestKEGDataPlaneReconciler(t *testing.T) { require.Empty(t, deployList.Items) }) - t.Run("KonnectEventControlPlane not programmed sets NotProgrammed condition", func(t *testing.T) { + t.Run("KonnectEventGateway not programmed sets NotProgrammed condition", func(t *testing.T) { t.Parallel() - kep := &konnectv1alpha1.KonnectEventControlPlane{ + kep := &konnectv1alpha1.KonnectEventGateway{ ObjectMeta: metav1.ObjectMeta{ Name: "kep-not-programmed", Namespace: ns.Name, @@ -148,14 +148,14 @@ func TestKEGDataPlaneReconciler(t *testing.T) { t.Run("KEP programmed but cert not yet programmed: cert Secret + KonnectEventDataPlaneCertificate created, no Deployment", func(t *testing.T) { t.Parallel() - kep := &konnectv1alpha1.KonnectEventControlPlane{ + kep := &konnectv1alpha1.KonnectEventGateway{ ObjectMeta: metav1.ObjectMeta{ Name: "kep-no-cert-programmed", Namespace: ns.Name, }, } require.NoError(t, cl.Create(ctx, kep)) - updateKonnectEventControlPlaneStatusWithProgrammed(t, ctx, cl, kep, "konnect-id-no-cert") + updateKonnectEventGatewayStatusWithProgrammed(t, ctx, cl, kep, "konnect-id-no-cert") egdp := &eventgatewayv1alpha1.KegDataPlane{ ObjectMeta: metav1.ObjectMeta{ @@ -227,14 +227,14 @@ func TestKEGDataPlaneReconciler(t *testing.T) { t.Run("cert programmed: Deployment and Kafka Service are created, Ready=True", func(t *testing.T) { t.Parallel() - kep := &konnectv1alpha1.KonnectEventControlPlane{ + kep := &konnectv1alpha1.KonnectEventGateway{ ObjectMeta: metav1.ObjectMeta{ Name: "kep-happy-path", Namespace: ns.Name, }, } require.NoError(t, cl.Create(ctx, kep)) - updateKonnectEventControlPlaneStatusWithProgrammed(t, ctx, cl, kep, "konnect-id-happy") + updateKonnectEventGatewayStatusWithProgrammed(t, ctx, cl, kep, "konnect-id-happy") egdp := &eventgatewayv1alpha1.KegDataPlane{ ObjectMeta: metav1.ObjectMeta{ @@ -306,14 +306,14 @@ func TestKEGDataPlaneReconciler(t *testing.T) { t.Run("idempotency: re-reconcile does not duplicate Deployment or Service", func(t *testing.T) { t.Parallel() - kep := &konnectv1alpha1.KonnectEventControlPlane{ + kep := &konnectv1alpha1.KonnectEventGateway{ ObjectMeta: metav1.ObjectMeta{ Name: "kep-idempotent", Namespace: ns.Name, }, } require.NoError(t, cl.Create(ctx, kep)) - updateKonnectEventControlPlaneStatusWithProgrammed(t, ctx, cl, kep, "konnect-id-idempotent") + updateKonnectEventGatewayStatusWithProgrammed(t, ctx, cl, kep, "konnect-id-idempotent") egdp := &eventgatewayv1alpha1.KegDataPlane{ ObjectMeta: metav1.ObjectMeta{ @@ -372,14 +372,14 @@ func TestKEGDataPlaneReconciler(t *testing.T) { t.Run("deletion: owned Deployment and KonnectEventDataPlaneCertificate are GC'd", func(t *testing.T) { t.Parallel() - kep := &konnectv1alpha1.KonnectEventControlPlane{ + kep := &konnectv1alpha1.KonnectEventGateway{ ObjectMeta: metav1.ObjectMeta{ Name: "kep-deletion", Namespace: ns.Name, }, } require.NoError(t, cl.Create(ctx, kep)) - updateKonnectEventControlPlaneStatusWithProgrammed(t, ctx, cl, kep, "konnect-id-deletion") + updateKonnectEventGatewayStatusWithProgrammed(t, ctx, cl, kep, "konnect-id-deletion") egdp := &eventgatewayv1alpha1.KegDataPlane{ ObjectMeta: metav1.ObjectMeta{ @@ -859,7 +859,7 @@ func triggerReconcile(t *testing.T, ctx context.Context, cl client.Client, obj c }, waitTime, tickTime) } -// setupProgrammedKEGDP creates a KonnectEventControlPlane and a KegDataPlane, +// setupProgrammedKEGDP creates a KonnectEventGateway and a KegDataPlane, // programs the control plane and the resulting KonnectEventDataPlaneCertificate, // and returns the KegDataPlane object. spec.ControlPlaneRef is populated by the // helper, so callers only need to set the fields they care about. @@ -872,11 +872,11 @@ func setupProgrammedKEGDP( ) *eventgatewayv1alpha1.KegDataPlane { t.Helper() - kep := &konnectv1alpha1.KonnectEventControlPlane{ + kep := &konnectv1alpha1.KonnectEventGateway{ ObjectMeta: metav1.ObjectMeta{Name: kepName, Namespace: ns}, } require.NoError(t, cl.Create(ctx, kep)) - updateKonnectEventControlPlaneStatusWithProgrammed(t, ctx, cl, kep, konnectID) + updateKonnectEventGatewayStatusWithProgrammed(t, ctx, cl, kep, konnectID) spec.ControlPlaneRef = eventgatewayv1alpha1.ControlPlaneRef{ Type: eventgatewayv1alpha1.ControlPlaneRefTypeKonnectNamespacedRef, diff --git a/test/envtest/update_status.go b/test/envtest/update_status.go index e261c6cb3c..5ca41fc8d4 100644 --- a/test/envtest/update_status.go +++ b/test/envtest/update_status.go @@ -127,11 +127,11 @@ func updateKongUpstreamStatusWithProgrammed( require.NoError(t, cl.Status().Update(ctx, obj)) } -func updateKonnectEventControlPlaneStatusWithProgrammed( +func updateKonnectEventGatewayStatusWithProgrammed( t *testing.T, ctx context.Context, cl client.Client, - obj *konnectv1alpha1.KonnectEventControlPlane, + obj *konnectv1alpha1.KonnectEventGateway, id string, ) { require.EventuallyWithT(t, func(ct *assert.CollectT) { diff --git a/test/mocks/sdkmocks/zz_generated_sdkfactory_mock.go b/test/mocks/sdkmocks/zz_generated_sdkfactory_mock.go index ebfaa2bf53..6beda43f8f 100644 --- a/test/mocks/sdkmocks/zz_generated_sdkfactory_mock.go +++ b/test/mocks/sdkmocks/zz_generated_sdkfactory_mock.go @@ -11,8 +11,8 @@ import ( type generatedMockSDKWrapper struct { PortalAuthSettingsSDK *mocks.MockPortalAuthSettingsSDK - EventGatewaysSDK *mocks.MockEventGatewaysSDK EventGatewayDataPlaneCertificatesSDK *mocks.MockEventGatewayDataPlaneCertificatesSDK + EventGatewaysSDK *mocks.MockEventGatewaysSDK PortalsSDK *mocks.MockPortalsSDK PortalPagesSDK *mocks.MockPortalPagesSDK PortalTeamsSDK *mocks.MockPortalTeamsSDK @@ -21,8 +21,8 @@ type generatedMockSDKWrapper struct { func newGeneratedMockSDKWrapper(t *testing.T) generatedMockSDKWrapper { return generatedMockSDKWrapper{ PortalAuthSettingsSDK: mocks.NewMockPortalAuthSettingsSDK(t), - EventGatewaysSDK: mocks.NewMockEventGatewaysSDK(t), EventGatewayDataPlaneCertificatesSDK: mocks.NewMockEventGatewayDataPlaneCertificatesSDK(t), + EventGatewaysSDK: mocks.NewMockEventGatewaysSDK(t), PortalsSDK: mocks.NewMockPortalsSDK(t), PortalPagesSDK: mocks.NewMockPortalPagesSDK(t), PortalTeamsSDK: mocks.NewMockPortalTeamsSDK(t), @@ -34,16 +34,16 @@ func (m generatedMockSDKWrapper) GetPortalAuthSettingsSDK() sdkkonnectgo.PortalA return m.PortalAuthSettingsSDK } -// GetEventGatewaysSDK returns the SDK to operate KonnectEventControlPlane. -func (m generatedMockSDKWrapper) GetEventGatewaysSDK() sdkkonnectgo.EventGatewaysSDK { - return m.EventGatewaysSDK -} - // GetEventGatewayDataPlaneCertificatesSDK returns the SDK to operate KonnectEventDataPlaneCertificate. func (m generatedMockSDKWrapper) GetEventGatewayDataPlaneCertificatesSDK() sdkkonnectgo.EventGatewayDataPlaneCertificatesSDK { return m.EventGatewayDataPlaneCertificatesSDK } +// GetEventGatewaysSDK returns the SDK to operate KonnectEventGateway. +func (m generatedMockSDKWrapper) GetEventGatewaysSDK() sdkkonnectgo.EventGatewaysSDK { + return m.EventGatewaysSDK +} + // GetPortalsSDK returns the SDK to operate Portal. func (m generatedMockSDKWrapper) GetPortalsSDK() sdkkonnectgo.PortalsSDK { return m.PortalsSDK