From dfbb77689973bd84d2d981f416f6135b8e58e565 Mon Sep 17 00:00:00 2001 From: Arko Dasgupta Date: Wed, 4 Oct 2023 18:33:31 -0700 Subject: [PATCH] move EnvoyProxy API to gateway.envoyproxy.io (#1921) * move EnvoyProxy API to gateway.envoyproxy.io * this keeps all CRDs/APIs under the gateway.envoyproxy.io group * this is a breaking change, that needs to be highlighted in the release notes. Undesirable but acceptable since these APIs are experimental (alpha) and are not yet stable Fixes: https://github.com/envoyproxy/gateway/issues/809 Signed-off-by: Arko Dasgupta * fix config Signed-off-by: Arko Dasgupta * fix rbac Signed-off-by: Arko Dasgupta --------- Signed-off-by: Arko Dasgupta --- api/config/doc.go | 6 - api/config/v1alpha1/doc.go | 11 - api/config/v1alpha1/groupversion_info.go | 22 - api/config/v1alpha1/zz_generated.deepcopy.go | 1331 --------------- .../v1alpha1/accesslogging_types.go | 0 api/v1alpha1/doc.go | 3 +- .../v1alpha1/envoygateway_helpers.go | 0 .../v1alpha1/envoygateway_types.go | 0 .../v1alpha1/envoyproxy_helpers.go | 0 api/{config => }/v1alpha1/envoyproxy_types.go | 0 .../v1alpha1/kubernetes_helpers.go | 0 api/{config => }/v1alpha1/metric_types.go | 0 api/{config => }/v1alpha1/shared_types.go | 0 api/{config => }/v1alpha1/tracing_types.go | 0 ...rent-dynamic-resources-user-bootstrap.yaml | 0 ...fferent-xds-cluster-address-bootstrap.yaml | 0 .../testdata/merge-user-bootstrap.yaml | 0 .../missing-admin-address-user-bootstrap.yaml | 0 .../testdata/valid-user-bootstrap.yaml | 0 .../v1alpha1/validation/validate.go | 36 +- .../v1alpha1/validation/validate_test.go | 348 ++-- api/v1alpha1/zz_generated.deepcopy.go | 1485 ++++++++++++++++- ...> gateway.envoyproxy.io_envoyproxies.yaml} | 4 +- charts/gateway-helm/templates/_rbac.tpl | 15 +- .../templates/envoy-gateway-config.yaml | 2 +- docs/latest/api/config_types.md | 1051 ------------ docs/latest/api/extension_types.md | 1214 +++++++++++++- docs/latest/design/accesslog.md | 10 +- docs/latest/design/bootstrap.md | 12 +- docs/latest/design/config-api.md | 18 +- docs/latest/design/extending-envoy-gateway.md | 2 +- docs/latest/design/metrics.md | 4 +- docs/latest/design/pprof.md | 2 +- docs/latest/design/tracing.md | 2 +- docs/latest/user/customize-envoyproxy.md | 18 +- docs/latest/user/egctl.md | 2 +- docs/latest/user/envoy-patch-policy.md | 2 +- docs/latest/user/rate-limit.md | 4 +- .../accesslog/disable-accesslog.yaml | 4 +- .../kubernetes/accesslog/json-accesslog.yaml | 4 +- .../kubernetes/accesslog/multi-sinks.yaml | 4 +- .../kubernetes/accesslog/otel-accesslog.yaml | 4 +- .../kubernetes/accesslog/text-accesslog.yaml | 4 +- examples/kubernetes/envoy-proxy-config.yaml | 4 +- examples/kubernetes/metric/otel-sink.yaml | 4 +- examples/kubernetes/metric/prometheus.yaml | 4 +- examples/kubernetes/multicluster-service.yaml | 4 +- examples/kubernetes/tracing/default.yaml | 4 +- examples/redis/redis.yaml | 2 +- .../translate/in/invalid-envoyproxy.yaml | 4 +- .../translate/in/valid-envoyproxy.yaml | 4 +- .../translate/out/default-resources.all.yaml | 2 +- .../translate/out/invalid-envoyproxy.all.yaml | 2 +- .../translate/out/valid-envoyproxy.all.yaml | 2 +- internal/cmd/egctl/translate.go | 19 +- internal/cmd/server_test.go | 4 +- internal/cmd/version/version.go | 2 +- internal/crypto/certgen.go | 2 +- internal/envoygateway/config/config.go | 2 +- internal/envoygateway/config/config_test.go | 2 +- internal/envoygateway/config/decoder.go | 2 +- internal/envoygateway/config/decoder_test.go | 2 +- .../decoder/in/gateway-controller-name.yaml | 2 +- .../decoder/in/gateway-global-ratelimit.yaml | 2 +- .../testdata/decoder/in/gateway-logging.yaml | 2 +- .../decoder/in/gateway-mixing-provider.yaml | 2 +- .../decoder/in/gateway-ratelimit.yaml | 2 +- .../decoder/in/invalid-gateway-kind.yaml | 2 +- .../decoder/in/invalid-gateway-logging.yaml | 2 +- .../decoder/in/invalid-gateway-version.yaml | 2 +- .../testdata/decoder/in/kube-provider.yaml | 2 +- .../config/testdata/decoder/in/no-kind.yaml | 2 +- .../decoder/in/provider-mixing-gateway.yaml | 2 +- .../decoder/in/provider-with-gateway.yaml | 2 +- internal/envoygateway/scheme.go | 4 - .../extension/registry/extension_manager.go | 2 +- internal/extension/testutils/manager.go | 2 +- internal/extension/types/manager.go | 2 +- internal/gatewayapi/listener.go | 20 +- internal/gatewayapi/listener_test.go | 2 +- internal/gatewayapi/resource.go | 3 +- internal/gatewayapi/runner/runner.go | 2 +- internal/gatewayapi/runner/runner_test.go | 4 +- .../testdata/disable-accesslog.in.yaml | 2 +- .../testdata/disable-accesslog.out.yaml | 2 +- ...roxy-accesslog-file-json-no-format.in.yaml | 2 +- ...oxy-accesslog-file-json-no-format.out.yaml | 2 +- .../envoyproxy-accesslog-file-json.in.yaml | 2 +- .../envoyproxy-accesslog-file-json.out.yaml | 2 +- ...nvoyproxy-accesslog-with-bad-sinks.in.yaml | 2 +- ...voyproxy-accesslog-with-bad-sinks.out.yaml | 2 +- .../testdata/envoyproxy-accesslog.in.yaml | 2 +- .../testdata/envoyproxy-accesslog.out.yaml | 2 +- .../testdata/envoyproxy-valid.in.yaml | 2 +- .../testdata/envoyproxy-valid.out.yaml | 2 +- internal/gatewayapi/translator_test.go | 6 +- internal/gatewayapi/zz_generated.deepcopy.go | 3 +- internal/globalratelimit/runner/runner.go | 2 +- internal/infrastructure/kubernetes/infra.go | 2 +- .../kubernetes/proxy/resource.go | 12 +- .../kubernetes/proxy/resource_provider.go | 4 +- .../proxy/resource_provider_test.go | 64 +- .../kubernetes/proxy_deployment_test.go | 16 +- .../kubernetes/proxy_infra_test.go | 16 +- .../kubernetes/ratelimit/resource.go | 12 +- .../kubernetes/ratelimit/resource_provider.go | 12 +- .../ratelimit/resource_provider_test.go | 122 +- .../kubernetes/ratelimit_deployment_test.go | 20 +- .../kubernetes/ratelimit_service_test.go | 10 +- .../ratelimit_serviceaccount_test.go | 18 +- .../kubernetes/resource/resource.go | 12 +- .../kubernetes/resource/resource_test.go | 32 +- internal/infrastructure/manager.go | 2 +- internal/infrastructure/runner/runner.go | 2 +- internal/ir/infra.go | 2 +- internal/ir/xds.go | 3 +- internal/ir/zz_generated.deepcopy.go | 7 +- internal/logging/log.go | 2 +- internal/logging/log_test.go | 2 +- internal/provider/kubernetes/controller.go | 17 +- .../provider/kubernetes/controller_test.go | 82 +- internal/provider/kubernetes/helpers.go | 8 +- internal/provider/kubernetes/helpers_test.go | 60 +- internal/provider/kubernetes/kubernetes.go | 2 +- .../provider/kubernetes/kubernetes_test.go | 41 +- .../provider/kubernetes/predicates_test.go | 2 +- internal/provider/kubernetes/routes_test.go | 17 +- internal/provider/kubernetes/test/utils.go | 5 +- internal/provider/runner/runner.go | 2 +- internal/provider/runner/runner_test.go | 2 +- internal/xds/bootstrap/bootstrap.go | 10 +- internal/xds/bootstrap/bootstrap_test.go | 30 +- internal/xds/bootstrap/util.go | 6 +- internal/xds/server/runner/runner.go | 2 +- internal/xds/server/runner/runner_test.go | 2 +- internal/xds/translator/extension.go | 2 +- internal/xds/translator/runner/runner.go | 2 +- internal/xds/translator/tracing.go | 8 +- internal/xds/translator/translator_test.go | 2 +- test/config/gatewayclass.yaml | 4 +- tools/hack/docs-headings.sh | 2 +- tools/make/docs.mk | 6 - 142 files changed, 3190 insertions(+), 3291 deletions(-) delete mode 100644 api/config/doc.go delete mode 100644 api/config/v1alpha1/doc.go delete mode 100644 api/config/v1alpha1/groupversion_info.go delete mode 100644 api/config/v1alpha1/zz_generated.deepcopy.go rename api/{config => }/v1alpha1/accesslogging_types.go (100%) rename api/{config => }/v1alpha1/envoygateway_helpers.go (100%) rename api/{config => }/v1alpha1/envoygateway_types.go (100%) rename api/{config => }/v1alpha1/envoyproxy_helpers.go (100%) rename api/{config => }/v1alpha1/envoyproxy_types.go (100%) rename api/{config => }/v1alpha1/kubernetes_helpers.go (100%) rename api/{config => }/v1alpha1/metric_types.go (100%) rename api/{config => }/v1alpha1/shared_types.go (100%) rename api/{config => }/v1alpha1/tracing_types.go (100%) rename api/{config => }/v1alpha1/validation/testdata/different-dynamic-resources-user-bootstrap.yaml (100%) rename api/{config => }/v1alpha1/validation/testdata/different-xds-cluster-address-bootstrap.yaml (100%) rename api/{config => }/v1alpha1/validation/testdata/merge-user-bootstrap.yaml (100%) rename api/{config => }/v1alpha1/validation/testdata/missing-admin-address-user-bootstrap.yaml (100%) rename api/{config => }/v1alpha1/validation/testdata/valid-user-bootstrap.yaml (100%) rename api/{config => }/v1alpha1/validation/validate.go (85%) rename api/{config => }/v1alpha1/validation/validate_test.go (55%) rename charts/gateway-helm/crds/generated/{config.gateway.envoyproxy.io_envoyproxies.yaml => gateway.envoyproxy.io_envoyproxies.yaml} (99%) delete mode 100644 docs/latest/api/config_types.md diff --git a/api/config/doc.go b/api/config/doc.go deleted file mode 100644 index a9b235ea604..00000000000 --- a/api/config/doc.go +++ /dev/null @@ -1,6 +0,0 @@ -// Copyright Envoy Gateway Authors -// SPDX-License-Identifier: Apache-2.0 -// The full text of the Apache license is available in the LICENSE file at -// the root of the repo. - -package config diff --git a/api/config/v1alpha1/doc.go b/api/config/v1alpha1/doc.go deleted file mode 100644 index cbf70c5e359..00000000000 --- a/api/config/v1alpha1/doc.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright Envoy Gateway Authors -// SPDX-License-Identifier: Apache-2.0 -// The full text of the Apache license is available in the LICENSE file at -// the root of the repo. - -// Package v1alpha1 contains API schema definitions for the config.gateway.envoyproxy.io -// API group. -// -// +kubebuilder:object:generate=true -// +groupName=config.gateway.envoyproxy.io -package v1alpha1 diff --git a/api/config/v1alpha1/groupversion_info.go b/api/config/v1alpha1/groupversion_info.go deleted file mode 100644 index b8d005fb16e..00000000000 --- a/api/config/v1alpha1/groupversion_info.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright Envoy Gateway Authors -// SPDX-License-Identifier: Apache-2.0 -// The full text of the Apache license is available in the LICENSE file at -// the root of the repo. - -package v1alpha1 - -import ( - "k8s.io/apimachinery/pkg/runtime/schema" - "sigs.k8s.io/controller-runtime/pkg/scheme" -) - -var ( - // GroupVersion is group version used to register these objects - GroupVersion = schema.GroupVersion{Group: "config.gateway.envoyproxy.io", Version: "v1alpha1"} - - // SchemeBuilder is used to add go types to the GroupVersionKind scheme - SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion} - - // AddToScheme adds the types in this group-version to the given scheme. - AddToScheme = SchemeBuilder.AddToScheme -) diff --git a/api/config/v1alpha1/zz_generated.deepcopy.go b/api/config/v1alpha1/zz_generated.deepcopy.go deleted file mode 100644 index 9a5abf68a76..00000000000 --- a/api/config/v1alpha1/zz_generated.deepcopy.go +++ /dev/null @@ -1,1331 +0,0 @@ -//go:build !ignore_autogenerated -// +build !ignore_autogenerated - -// Copyright Envoy Gateway Authors -// SPDX-License-Identifier: Apache-2.0 -// The full text of the Apache license is available in the LICENSE file at -// the root of the repo. - -// Code generated by controller-gen. DO NOT EDIT. - -package v1alpha1 - -import ( - appsv1 "k8s.io/api/apps/v1" - corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/apis/meta/v1" - runtime "k8s.io/apimachinery/pkg/runtime" - "sigs.k8s.io/gateway-api/apis/v1beta1" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CustomTag) DeepCopyInto(out *CustomTag) { - *out = *in - if in.Literal != nil { - in, out := &in.Literal, &out.Literal - *out = new(LiteralCustomTag) - **out = **in - } - if in.Environment != nil { - in, out := &in.Environment, &out.Environment - *out = new(EnvironmentCustomTag) - (*in).DeepCopyInto(*out) - } - if in.RequestHeader != nil { - in, out := &in.RequestHeader, &out.RequestHeader - *out = new(RequestHeaderCustomTag) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomTag. -func (in *CustomTag) DeepCopy() *CustomTag { - if in == nil { - return nil - } - out := new(CustomTag) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvironmentCustomTag) DeepCopyInto(out *EnvironmentCustomTag) { - *out = *in - if in.DefaultValue != nil { - in, out := &in.DefaultValue, &out.DefaultValue - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvironmentCustomTag. -func (in *EnvironmentCustomTag) DeepCopy() *EnvironmentCustomTag { - if in == nil { - return nil - } - out := new(EnvironmentCustomTag) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyGateway) DeepCopyInto(out *EnvoyGateway) { - *out = *in - out.TypeMeta = in.TypeMeta - in.EnvoyGatewaySpec.DeepCopyInto(&out.EnvoyGatewaySpec) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGateway. -func (in *EnvoyGateway) DeepCopy() *EnvoyGateway { - if in == nil { - return nil - } - out := new(EnvoyGateway) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EnvoyGateway) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyGatewayAdmin) DeepCopyInto(out *EnvoyGatewayAdmin) { - *out = *in - if in.Address != nil { - in, out := &in.Address, &out.Address - *out = new(EnvoyGatewayAdminAddress) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayAdmin. -func (in *EnvoyGatewayAdmin) DeepCopy() *EnvoyGatewayAdmin { - if in == nil { - return nil - } - out := new(EnvoyGatewayAdmin) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyGatewayAdminAddress) DeepCopyInto(out *EnvoyGatewayAdminAddress) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayAdminAddress. -func (in *EnvoyGatewayAdminAddress) DeepCopy() *EnvoyGatewayAdminAddress { - if in == nil { - return nil - } - out := new(EnvoyGatewayAdminAddress) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyGatewayCustomProvider) DeepCopyInto(out *EnvoyGatewayCustomProvider) { - *out = *in - in.Resource.DeepCopyInto(&out.Resource) - in.Infrastructure.DeepCopyInto(&out.Infrastructure) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayCustomProvider. -func (in *EnvoyGatewayCustomProvider) DeepCopy() *EnvoyGatewayCustomProvider { - if in == nil { - return nil - } - out := new(EnvoyGatewayCustomProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyGatewayFileResourceProvider) DeepCopyInto(out *EnvoyGatewayFileResourceProvider) { - *out = *in - if in.Paths != nil { - in, out := &in.Paths, &out.Paths - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayFileResourceProvider. -func (in *EnvoyGatewayFileResourceProvider) DeepCopy() *EnvoyGatewayFileResourceProvider { - if in == nil { - return nil - } - out := new(EnvoyGatewayFileResourceProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyGatewayHostInfrastructureProvider) DeepCopyInto(out *EnvoyGatewayHostInfrastructureProvider) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayHostInfrastructureProvider. -func (in *EnvoyGatewayHostInfrastructureProvider) DeepCopy() *EnvoyGatewayHostInfrastructureProvider { - if in == nil { - return nil - } - out := new(EnvoyGatewayHostInfrastructureProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyGatewayInfrastructureProvider) DeepCopyInto(out *EnvoyGatewayInfrastructureProvider) { - *out = *in - if in.Host != nil { - in, out := &in.Host, &out.Host - *out = new(EnvoyGatewayHostInfrastructureProvider) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayInfrastructureProvider. -func (in *EnvoyGatewayInfrastructureProvider) DeepCopy() *EnvoyGatewayInfrastructureProvider { - if in == nil { - return nil - } - out := new(EnvoyGatewayInfrastructureProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyGatewayKubernetesProvider) DeepCopyInto(out *EnvoyGatewayKubernetesProvider) { - *out = *in - if in.RateLimitDeployment != nil { - in, out := &in.RateLimitDeployment, &out.RateLimitDeployment - *out = new(KubernetesDeploymentSpec) - (*in).DeepCopyInto(*out) - } - if in.Watch != nil { - in, out := &in.Watch, &out.Watch - *out = new(KubernetesWatchMode) - (*in).DeepCopyInto(*out) - } - if in.Deploy != nil { - in, out := &in.Deploy, &out.Deploy - *out = new(KubernetesDeployMode) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayKubernetesProvider. -func (in *EnvoyGatewayKubernetesProvider) DeepCopy() *EnvoyGatewayKubernetesProvider { - if in == nil { - return nil - } - out := new(EnvoyGatewayKubernetesProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyGatewayLogging) DeepCopyInto(out *EnvoyGatewayLogging) { - *out = *in - if in.Level != nil { - in, out := &in.Level, &out.Level - *out = make(map[EnvoyGatewayLogComponent]LogLevel, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayLogging. -func (in *EnvoyGatewayLogging) DeepCopy() *EnvoyGatewayLogging { - if in == nil { - return nil - } - out := new(EnvoyGatewayLogging) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyGatewayProvider) DeepCopyInto(out *EnvoyGatewayProvider) { - *out = *in - if in.Kubernetes != nil { - in, out := &in.Kubernetes, &out.Kubernetes - *out = new(EnvoyGatewayKubernetesProvider) - (*in).DeepCopyInto(*out) - } - if in.Custom != nil { - in, out := &in.Custom, &out.Custom - *out = new(EnvoyGatewayCustomProvider) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayProvider. -func (in *EnvoyGatewayProvider) DeepCopy() *EnvoyGatewayProvider { - if in == nil { - return nil - } - out := new(EnvoyGatewayProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyGatewayResourceProvider) DeepCopyInto(out *EnvoyGatewayResourceProvider) { - *out = *in - if in.File != nil { - in, out := &in.File, &out.File - *out = new(EnvoyGatewayFileResourceProvider) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayResourceProvider. -func (in *EnvoyGatewayResourceProvider) DeepCopy() *EnvoyGatewayResourceProvider { - if in == nil { - return nil - } - out := new(EnvoyGatewayResourceProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyGatewaySpec) DeepCopyInto(out *EnvoyGatewaySpec) { - *out = *in - if in.Gateway != nil { - in, out := &in.Gateway, &out.Gateway - *out = new(Gateway) - **out = **in - } - if in.Provider != nil { - in, out := &in.Provider, &out.Provider - *out = new(EnvoyGatewayProvider) - (*in).DeepCopyInto(*out) - } - if in.Logging != nil { - in, out := &in.Logging, &out.Logging - *out = new(EnvoyGatewayLogging) - (*in).DeepCopyInto(*out) - } - if in.Admin != nil { - in, out := &in.Admin, &out.Admin - *out = new(EnvoyGatewayAdmin) - (*in).DeepCopyInto(*out) - } - if in.RateLimit != nil { - in, out := &in.RateLimit, &out.RateLimit - *out = new(RateLimit) - (*in).DeepCopyInto(*out) - } - if in.ExtensionManager != nil { - in, out := &in.ExtensionManager, &out.ExtensionManager - *out = new(ExtensionManager) - (*in).DeepCopyInto(*out) - } - if in.ExtensionAPIs != nil { - in, out := &in.ExtensionAPIs, &out.ExtensionAPIs - *out = new(ExtensionAPISettings) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewaySpec. -func (in *EnvoyGatewaySpec) DeepCopy() *EnvoyGatewaySpec { - if in == nil { - return nil - } - out := new(EnvoyGatewaySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyProxy) DeepCopyInto(out *EnvoyProxy) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - out.Status = in.Status -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyProxy. -func (in *EnvoyProxy) DeepCopy() *EnvoyProxy { - if in == nil { - return nil - } - out := new(EnvoyProxy) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EnvoyProxy) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyProxyKubernetesProvider) DeepCopyInto(out *EnvoyProxyKubernetesProvider) { - *out = *in - if in.EnvoyDeployment != nil { - in, out := &in.EnvoyDeployment, &out.EnvoyDeployment - *out = new(KubernetesDeploymentSpec) - (*in).DeepCopyInto(*out) - } - if in.EnvoyService != nil { - in, out := &in.EnvoyService, &out.EnvoyService - *out = new(KubernetesServiceSpec) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyProxyKubernetesProvider. -func (in *EnvoyProxyKubernetesProvider) DeepCopy() *EnvoyProxyKubernetesProvider { - if in == nil { - return nil - } - out := new(EnvoyProxyKubernetesProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyProxyList) DeepCopyInto(out *EnvoyProxyList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]EnvoyProxy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyProxyList. -func (in *EnvoyProxyList) DeepCopy() *EnvoyProxyList { - if in == nil { - return nil - } - out := new(EnvoyProxyList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EnvoyProxyList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyProxyProvider) DeepCopyInto(out *EnvoyProxyProvider) { - *out = *in - if in.Kubernetes != nil { - in, out := &in.Kubernetes, &out.Kubernetes - *out = new(EnvoyProxyKubernetesProvider) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyProxyProvider. -func (in *EnvoyProxyProvider) DeepCopy() *EnvoyProxyProvider { - if in == nil { - return nil - } - out := new(EnvoyProxyProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyProxySpec) DeepCopyInto(out *EnvoyProxySpec) { - *out = *in - if in.Provider != nil { - in, out := &in.Provider, &out.Provider - *out = new(EnvoyProxyProvider) - (*in).DeepCopyInto(*out) - } - in.Logging.DeepCopyInto(&out.Logging) - in.Telemetry.DeepCopyInto(&out.Telemetry) - if in.Bootstrap != nil { - in, out := &in.Bootstrap, &out.Bootstrap - *out = new(ProxyBootstrap) - (*in).DeepCopyInto(*out) - } - if in.Concurrency != nil { - in, out := &in.Concurrency, &out.Concurrency - *out = new(int32) - **out = **in - } - if in.MergeGateways != nil { - in, out := &in.MergeGateways, &out.MergeGateways - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyProxySpec. -func (in *EnvoyProxySpec) DeepCopy() *EnvoyProxySpec { - if in == nil { - return nil - } - out := new(EnvoyProxySpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyProxyStatus) DeepCopyInto(out *EnvoyProxyStatus) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyProxyStatus. -func (in *EnvoyProxyStatus) DeepCopy() *EnvoyProxyStatus { - if in == nil { - return nil - } - out := new(EnvoyProxyStatus) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExtensionAPISettings) DeepCopyInto(out *ExtensionAPISettings) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionAPISettings. -func (in *ExtensionAPISettings) DeepCopy() *ExtensionAPISettings { - if in == nil { - return nil - } - out := new(ExtensionAPISettings) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExtensionHooks) DeepCopyInto(out *ExtensionHooks) { - *out = *in - if in.XDSTranslator != nil { - in, out := &in.XDSTranslator, &out.XDSTranslator - *out = new(XDSTranslatorHooks) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionHooks. -func (in *ExtensionHooks) DeepCopy() *ExtensionHooks { - if in == nil { - return nil - } - out := new(ExtensionHooks) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExtensionManager) DeepCopyInto(out *ExtensionManager) { - *out = *in - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make([]GroupVersionKind, len(*in)) - copy(*out, *in) - } - if in.Hooks != nil { - in, out := &in.Hooks, &out.Hooks - *out = new(ExtensionHooks) - (*in).DeepCopyInto(*out) - } - if in.Service != nil { - in, out := &in.Service, &out.Service - *out = new(ExtensionService) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionManager. -func (in *ExtensionManager) DeepCopy() *ExtensionManager { - if in == nil { - return nil - } - out := new(ExtensionManager) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExtensionService) DeepCopyInto(out *ExtensionService) { - *out = *in - if in.TLS != nil { - in, out := &in.TLS, &out.TLS - *out = new(ExtensionTLS) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionService. -func (in *ExtensionService) DeepCopy() *ExtensionService { - if in == nil { - return nil - } - out := new(ExtensionService) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExtensionTLS) DeepCopyInto(out *ExtensionTLS) { - *out = *in - in.CertificateRef.DeepCopyInto(&out.CertificateRef) -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionTLS. -func (in *ExtensionTLS) DeepCopy() *ExtensionTLS { - if in == nil { - return nil - } - out := new(ExtensionTLS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *FileEnvoyProxyAccessLog) DeepCopyInto(out *FileEnvoyProxyAccessLog) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileEnvoyProxyAccessLog. -func (in *FileEnvoyProxyAccessLog) DeepCopy() *FileEnvoyProxyAccessLog { - if in == nil { - return nil - } - out := new(FileEnvoyProxyAccessLog) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Gateway) DeepCopyInto(out *Gateway) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Gateway. -func (in *Gateway) DeepCopy() *Gateway { - if in == nil { - return nil - } - out := new(Gateway) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GroupVersionKind) DeepCopyInto(out *GroupVersionKind) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupVersionKind. -func (in *GroupVersionKind) DeepCopy() *GroupVersionKind { - if in == nil { - return nil - } - out := new(GroupVersionKind) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubernetesContainerSpec) DeepCopyInto(out *KubernetesContainerSpec) { - *out = *in - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]corev1.EnvVar, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = new(corev1.ResourceRequirements) - (*in).DeepCopyInto(*out) - } - if in.SecurityContext != nil { - in, out := &in.SecurityContext, &out.SecurityContext - *out = new(corev1.SecurityContext) - (*in).DeepCopyInto(*out) - } - if in.Image != nil { - in, out := &in.Image, &out.Image - *out = new(string) - **out = **in - } - if in.VolumeMounts != nil { - in, out := &in.VolumeMounts, &out.VolumeMounts - *out = make([]corev1.VolumeMount, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesContainerSpec. -func (in *KubernetesContainerSpec) DeepCopy() *KubernetesContainerSpec { - if in == nil { - return nil - } - out := new(KubernetesContainerSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubernetesDeployMode) DeepCopyInto(out *KubernetesDeployMode) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesDeployMode. -func (in *KubernetesDeployMode) DeepCopy() *KubernetesDeployMode { - if in == nil { - return nil - } - out := new(KubernetesDeployMode) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubernetesDeploymentSpec) DeepCopyInto(out *KubernetesDeploymentSpec) { - *out = *in - if in.Replicas != nil { - in, out := &in.Replicas, &out.Replicas - *out = new(int32) - **out = **in - } - if in.Strategy != nil { - in, out := &in.Strategy, &out.Strategy - *out = new(appsv1.DeploymentStrategy) - (*in).DeepCopyInto(*out) - } - if in.Pod != nil { - in, out := &in.Pod, &out.Pod - *out = new(KubernetesPodSpec) - (*in).DeepCopyInto(*out) - } - if in.Container != nil { - in, out := &in.Container, &out.Container - *out = new(KubernetesContainerSpec) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesDeploymentSpec. -func (in *KubernetesDeploymentSpec) DeepCopy() *KubernetesDeploymentSpec { - if in == nil { - return nil - } - out := new(KubernetesDeploymentSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubernetesPodSpec) DeepCopyInto(out *KubernetesPodSpec) { - *out = *in - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Labels != nil { - in, out := &in.Labels, &out.Labels - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.SecurityContext != nil { - in, out := &in.SecurityContext, &out.SecurityContext - *out = new(corev1.PodSecurityContext) - (*in).DeepCopyInto(*out) - } - if in.Affinity != nil { - in, out := &in.Affinity, &out.Affinity - *out = new(corev1.Affinity) - (*in).DeepCopyInto(*out) - } - if in.Tolerations != nil { - in, out := &in.Tolerations, &out.Tolerations - *out = make([]corev1.Toleration, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Volumes != nil { - in, out := &in.Volumes, &out.Volumes - *out = make([]corev1.Volume, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesPodSpec. -func (in *KubernetesPodSpec) DeepCopy() *KubernetesPodSpec { - if in == nil { - return nil - } - out := new(KubernetesPodSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubernetesServiceSpec) DeepCopyInto(out *KubernetesServiceSpec) { - *out = *in - if in.Annotations != nil { - in, out := &in.Annotations, &out.Annotations - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.Type != nil { - in, out := &in.Type, &out.Type - *out = new(ServiceType) - **out = **in - } - if in.LoadBalancerClass != nil { - in, out := &in.LoadBalancerClass, &out.LoadBalancerClass - *out = new(string) - **out = **in - } - if in.AllocateLoadBalancerNodePorts != nil { - in, out := &in.AllocateLoadBalancerNodePorts, &out.AllocateLoadBalancerNodePorts - *out = new(bool) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesServiceSpec. -func (in *KubernetesServiceSpec) DeepCopy() *KubernetesServiceSpec { - if in == nil { - return nil - } - out := new(KubernetesServiceSpec) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *KubernetesWatchMode) DeepCopyInto(out *KubernetesWatchMode) { - *out = *in - if in.Namespaces != nil { - in, out := &in.Namespaces, &out.Namespaces - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.NamespaceSelectors != nil { - in, out := &in.NamespaceSelectors, &out.NamespaceSelectors - *out = make([]string, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesWatchMode. -func (in *KubernetesWatchMode) DeepCopy() *KubernetesWatchMode { - if in == nil { - return nil - } - out := new(KubernetesWatchMode) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LiteralCustomTag) DeepCopyInto(out *LiteralCustomTag) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LiteralCustomTag. -func (in *LiteralCustomTag) DeepCopy() *LiteralCustomTag { - if in == nil { - return nil - } - out := new(LiteralCustomTag) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Match) DeepCopyInto(out *Match) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Match. -func (in *Match) DeepCopy() *Match { - if in == nil { - return nil - } - out := new(Match) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *MetricSink) DeepCopyInto(out *MetricSink) { - *out = *in - if in.OpenTelemetry != nil { - in, out := &in.OpenTelemetry, &out.OpenTelemetry - *out = new(OpenTelemetrySink) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricSink. -func (in *MetricSink) DeepCopy() *MetricSink { - if in == nil { - return nil - } - out := new(MetricSink) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenTelemetryEnvoyProxyAccessLog) DeepCopyInto(out *OpenTelemetryEnvoyProxyAccessLog) { - *out = *in - if in.Resources != nil { - in, out := &in.Resources, &out.Resources - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryEnvoyProxyAccessLog. -func (in *OpenTelemetryEnvoyProxyAccessLog) DeepCopy() *OpenTelemetryEnvoyProxyAccessLog { - if in == nil { - return nil - } - out := new(OpenTelemetryEnvoyProxyAccessLog) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *OpenTelemetrySink) DeepCopyInto(out *OpenTelemetrySink) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetrySink. -func (in *OpenTelemetrySink) DeepCopy() *OpenTelemetrySink { - if in == nil { - return nil - } - out := new(OpenTelemetrySink) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PrometheusProvider) DeepCopyInto(out *PrometheusProvider) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusProvider. -func (in *PrometheusProvider) DeepCopy() *PrometheusProvider { - if in == nil { - return nil - } - out := new(PrometheusProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProxyAccessLog) DeepCopyInto(out *ProxyAccessLog) { - *out = *in - if in.Settings != nil { - in, out := &in.Settings, &out.Settings - *out = make([]ProxyAccessLogSetting, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyAccessLog. -func (in *ProxyAccessLog) DeepCopy() *ProxyAccessLog { - if in == nil { - return nil - } - out := new(ProxyAccessLog) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProxyAccessLogFormat) DeepCopyInto(out *ProxyAccessLogFormat) { - *out = *in - if in.Text != nil { - in, out := &in.Text, &out.Text - *out = new(string) - **out = **in - } - if in.JSON != nil { - in, out := &in.JSON, &out.JSON - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyAccessLogFormat. -func (in *ProxyAccessLogFormat) DeepCopy() *ProxyAccessLogFormat { - if in == nil { - return nil - } - out := new(ProxyAccessLogFormat) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProxyAccessLogSetting) DeepCopyInto(out *ProxyAccessLogSetting) { - *out = *in - in.Format.DeepCopyInto(&out.Format) - if in.Sinks != nil { - in, out := &in.Sinks, &out.Sinks - *out = make([]ProxyAccessLogSink, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyAccessLogSetting. -func (in *ProxyAccessLogSetting) DeepCopy() *ProxyAccessLogSetting { - if in == nil { - return nil - } - out := new(ProxyAccessLogSetting) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProxyAccessLogSink) DeepCopyInto(out *ProxyAccessLogSink) { - *out = *in - if in.File != nil { - in, out := &in.File, &out.File - *out = new(FileEnvoyProxyAccessLog) - **out = **in - } - if in.OpenTelemetry != nil { - in, out := &in.OpenTelemetry, &out.OpenTelemetry - *out = new(OpenTelemetryEnvoyProxyAccessLog) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyAccessLogSink. -func (in *ProxyAccessLogSink) DeepCopy() *ProxyAccessLogSink { - if in == nil { - return nil - } - out := new(ProxyAccessLogSink) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProxyBootstrap) DeepCopyInto(out *ProxyBootstrap) { - *out = *in - if in.Type != nil { - in, out := &in.Type, &out.Type - *out = new(BootstrapType) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyBootstrap. -func (in *ProxyBootstrap) DeepCopy() *ProxyBootstrap { - if in == nil { - return nil - } - out := new(ProxyBootstrap) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProxyLogging) DeepCopyInto(out *ProxyLogging) { - *out = *in - if in.Level != nil { - in, out := &in.Level, &out.Level - *out = make(map[LogComponent]LogLevel, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyLogging. -func (in *ProxyLogging) DeepCopy() *ProxyLogging { - if in == nil { - return nil - } - out := new(ProxyLogging) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProxyMetrics) DeepCopyInto(out *ProxyMetrics) { - *out = *in - if in.Prometheus != nil { - in, out := &in.Prometheus, &out.Prometheus - *out = new(PrometheusProvider) - **out = **in - } - if in.Sinks != nil { - in, out := &in.Sinks, &out.Sinks - *out = make([]MetricSink, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - if in.Matches != nil { - in, out := &in.Matches, &out.Matches - *out = make([]Match, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyMetrics. -func (in *ProxyMetrics) DeepCopy() *ProxyMetrics { - if in == nil { - return nil - } - out := new(ProxyMetrics) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProxyTelemetry) DeepCopyInto(out *ProxyTelemetry) { - *out = *in - if in.AccessLog != nil { - in, out := &in.AccessLog, &out.AccessLog - *out = new(ProxyAccessLog) - (*in).DeepCopyInto(*out) - } - if in.Tracing != nil { - in, out := &in.Tracing, &out.Tracing - *out = new(ProxyTracing) - (*in).DeepCopyInto(*out) - } - if in.Metrics != nil { - in, out := &in.Metrics, &out.Metrics - *out = new(ProxyMetrics) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyTelemetry. -func (in *ProxyTelemetry) DeepCopy() *ProxyTelemetry { - if in == nil { - return nil - } - out := new(ProxyTelemetry) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ProxyTracing) DeepCopyInto(out *ProxyTracing) { - *out = *in - if in.SamplingRate != nil { - in, out := &in.SamplingRate, &out.SamplingRate - *out = new(uint32) - **out = **in - } - if in.CustomTags != nil { - in, out := &in.CustomTags, &out.CustomTags - *out = make(map[string]CustomTag, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } - out.Provider = in.Provider -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyTracing. -func (in *ProxyTracing) DeepCopy() *ProxyTracing { - if in == nil { - return nil - } - out := new(ProxyTracing) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RateLimit) DeepCopyInto(out *RateLimit) { - *out = *in - in.Backend.DeepCopyInto(&out.Backend) - if in.Timeout != nil { - in, out := &in.Timeout, &out.Timeout - *out = new(v1.Duration) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimit. -func (in *RateLimit) DeepCopy() *RateLimit { - if in == nil { - return nil - } - out := new(RateLimit) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RateLimitDatabaseBackend) DeepCopyInto(out *RateLimitDatabaseBackend) { - *out = *in - if in.Redis != nil { - in, out := &in.Redis, &out.Redis - *out = new(RateLimitRedisSettings) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimitDatabaseBackend. -func (in *RateLimitDatabaseBackend) DeepCopy() *RateLimitDatabaseBackend { - if in == nil { - return nil - } - out := new(RateLimitDatabaseBackend) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RateLimitRedisSettings) DeepCopyInto(out *RateLimitRedisSettings) { - *out = *in - if in.TLS != nil { - in, out := &in.TLS, &out.TLS - *out = new(RedisTLSSettings) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimitRedisSettings. -func (in *RateLimitRedisSettings) DeepCopy() *RateLimitRedisSettings { - if in == nil { - return nil - } - out := new(RateLimitRedisSettings) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RedisTLSSettings) DeepCopyInto(out *RedisTLSSettings) { - *out = *in - if in.CertificateRef != nil { - in, out := &in.CertificateRef, &out.CertificateRef - *out = new(v1beta1.SecretObjectReference) - (*in).DeepCopyInto(*out) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisTLSSettings. -func (in *RedisTLSSettings) DeepCopy() *RedisTLSSettings { - if in == nil { - return nil - } - out := new(RedisTLSSettings) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RequestHeaderCustomTag) DeepCopyInto(out *RequestHeaderCustomTag) { - *out = *in - if in.DefaultValue != nil { - in, out := &in.DefaultValue, &out.DefaultValue - *out = new(string) - **out = **in - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestHeaderCustomTag. -func (in *RequestHeaderCustomTag) DeepCopy() *RequestHeaderCustomTag { - if in == nil { - return nil - } - out := new(RequestHeaderCustomTag) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *TracingProvider) DeepCopyInto(out *TracingProvider) { - *out = *in -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TracingProvider. -func (in *TracingProvider) DeepCopy() *TracingProvider { - if in == nil { - return nil - } - out := new(TracingProvider) - in.DeepCopyInto(out) - return out -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *XDSTranslatorHooks) DeepCopyInto(out *XDSTranslatorHooks) { - *out = *in - if in.Pre != nil { - in, out := &in.Pre, &out.Pre - *out = make([]XDSTranslatorHook, len(*in)) - copy(*out, *in) - } - if in.Post != nil { - in, out := &in.Post, &out.Post - *out = make([]XDSTranslatorHook, len(*in)) - copy(*out, *in) - } -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XDSTranslatorHooks. -func (in *XDSTranslatorHooks) DeepCopy() *XDSTranslatorHooks { - if in == nil { - return nil - } - out := new(XDSTranslatorHooks) - in.DeepCopyInto(out) - return out -} diff --git a/api/config/v1alpha1/accesslogging_types.go b/api/v1alpha1/accesslogging_types.go similarity index 100% rename from api/config/v1alpha1/accesslogging_types.go rename to api/v1alpha1/accesslogging_types.go diff --git a/api/v1alpha1/doc.go b/api/v1alpha1/doc.go index ba39955fc08..4e705afd0e9 100644 --- a/api/v1alpha1/doc.go +++ b/api/v1alpha1/doc.go @@ -3,7 +3,8 @@ // The full text of the Apache license is available in the LICENSE file at // the root of the repo. -// Package v1alpha1 contains API schema definitions for the gateway.envoyproxy.io API group. +// Package v1alpha1 contains API schema definitions for the gateway.envoyproxy.io +// API group. // // +kubebuilder:object:generate=true // +groupName=gateway.envoyproxy.io diff --git a/api/config/v1alpha1/envoygateway_helpers.go b/api/v1alpha1/envoygateway_helpers.go similarity index 100% rename from api/config/v1alpha1/envoygateway_helpers.go rename to api/v1alpha1/envoygateway_helpers.go diff --git a/api/config/v1alpha1/envoygateway_types.go b/api/v1alpha1/envoygateway_types.go similarity index 100% rename from api/config/v1alpha1/envoygateway_types.go rename to api/v1alpha1/envoygateway_types.go diff --git a/api/config/v1alpha1/envoyproxy_helpers.go b/api/v1alpha1/envoyproxy_helpers.go similarity index 100% rename from api/config/v1alpha1/envoyproxy_helpers.go rename to api/v1alpha1/envoyproxy_helpers.go diff --git a/api/config/v1alpha1/envoyproxy_types.go b/api/v1alpha1/envoyproxy_types.go similarity index 100% rename from api/config/v1alpha1/envoyproxy_types.go rename to api/v1alpha1/envoyproxy_types.go diff --git a/api/config/v1alpha1/kubernetes_helpers.go b/api/v1alpha1/kubernetes_helpers.go similarity index 100% rename from api/config/v1alpha1/kubernetes_helpers.go rename to api/v1alpha1/kubernetes_helpers.go diff --git a/api/config/v1alpha1/metric_types.go b/api/v1alpha1/metric_types.go similarity index 100% rename from api/config/v1alpha1/metric_types.go rename to api/v1alpha1/metric_types.go diff --git a/api/config/v1alpha1/shared_types.go b/api/v1alpha1/shared_types.go similarity index 100% rename from api/config/v1alpha1/shared_types.go rename to api/v1alpha1/shared_types.go diff --git a/api/config/v1alpha1/tracing_types.go b/api/v1alpha1/tracing_types.go similarity index 100% rename from api/config/v1alpha1/tracing_types.go rename to api/v1alpha1/tracing_types.go diff --git a/api/config/v1alpha1/validation/testdata/different-dynamic-resources-user-bootstrap.yaml b/api/v1alpha1/validation/testdata/different-dynamic-resources-user-bootstrap.yaml similarity index 100% rename from api/config/v1alpha1/validation/testdata/different-dynamic-resources-user-bootstrap.yaml rename to api/v1alpha1/validation/testdata/different-dynamic-resources-user-bootstrap.yaml diff --git a/api/config/v1alpha1/validation/testdata/different-xds-cluster-address-bootstrap.yaml b/api/v1alpha1/validation/testdata/different-xds-cluster-address-bootstrap.yaml similarity index 100% rename from api/config/v1alpha1/validation/testdata/different-xds-cluster-address-bootstrap.yaml rename to api/v1alpha1/validation/testdata/different-xds-cluster-address-bootstrap.yaml diff --git a/api/config/v1alpha1/validation/testdata/merge-user-bootstrap.yaml b/api/v1alpha1/validation/testdata/merge-user-bootstrap.yaml similarity index 100% rename from api/config/v1alpha1/validation/testdata/merge-user-bootstrap.yaml rename to api/v1alpha1/validation/testdata/merge-user-bootstrap.yaml diff --git a/api/config/v1alpha1/validation/testdata/missing-admin-address-user-bootstrap.yaml b/api/v1alpha1/validation/testdata/missing-admin-address-user-bootstrap.yaml similarity index 100% rename from api/config/v1alpha1/validation/testdata/missing-admin-address-user-bootstrap.yaml rename to api/v1alpha1/validation/testdata/missing-admin-address-user-bootstrap.yaml diff --git a/api/config/v1alpha1/validation/testdata/valid-user-bootstrap.yaml b/api/v1alpha1/validation/testdata/valid-user-bootstrap.yaml similarity index 100% rename from api/config/v1alpha1/validation/testdata/valid-user-bootstrap.yaml rename to api/v1alpha1/validation/testdata/valid-user-bootstrap.yaml diff --git a/api/config/v1alpha1/validation/validate.go b/api/v1alpha1/validation/validate.go similarity index 85% rename from api/config/v1alpha1/validation/validate.go rename to api/v1alpha1/validation/validate.go index 9fc73be1537..b4fe30afee5 100644 --- a/api/config/v1alpha1/validation/validate.go +++ b/api/v1alpha1/validation/validate.go @@ -18,13 +18,13 @@ import ( utilerrors "k8s.io/apimachinery/pkg/util/errors" "sigs.k8s.io/yaml" - egcfgv1a1 "github.com/envoyproxy/gateway/api/config/v1alpha1" + egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/xds/bootstrap" _ "github.com/envoyproxy/gateway/internal/xds/extensions" // register the generated types to support protojson unmarshalling ) // Validate validates the provided EnvoyProxy. -func ValidateEnvoyProxy(proxy *egcfgv1a1.EnvoyProxy) error { +func ValidateEnvoyProxy(proxy *egv1a1.EnvoyProxy) error { var errs []error if proxy == nil { return errors.New("envoyproxy is nil") @@ -37,7 +37,7 @@ func ValidateEnvoyProxy(proxy *egcfgv1a1.EnvoyProxy) error { } // validateEnvoyProxySpec validates the provided EnvoyProxy spec. -func validateEnvoyProxySpec(spec *egcfgv1a1.EnvoyProxySpec) error { +func validateEnvoyProxySpec(spec *egv1a1.EnvoyProxySpec) error { var errs []error if spec == nil { @@ -65,10 +65,10 @@ func validateEnvoyProxySpec(spec *egcfgv1a1.EnvoyProxySpec) error { return utilerrors.NewAggregate(errs) } -func validateProvider(spec *egcfgv1a1.EnvoyProxySpec) []error { +func validateProvider(spec *egv1a1.EnvoyProxySpec) []error { var errs []error if spec != nil && spec.Provider != nil { - if spec.Provider.Type != egcfgv1a1.ProviderTypeKubernetes { + if spec.Provider.Type != egv1a1.ProviderTypeKubernetes { errs = append(errs, fmt.Errorf("unsupported provider type %v", spec.Provider.Type)) } validateServiceErrs := validateService(spec) @@ -79,27 +79,27 @@ func validateProvider(spec *egcfgv1a1.EnvoyProxySpec) []error { return errs } -func validateService(spec *egcfgv1a1.EnvoyProxySpec) []error { +func validateService(spec *egv1a1.EnvoyProxySpec) []error { var errs []error if spec.Provider.Kubernetes != nil && spec.Provider.Kubernetes.EnvoyService != nil { if serviceType := spec.Provider.Kubernetes.EnvoyService.Type; serviceType != nil { - if *serviceType != egcfgv1a1.ServiceTypeLoadBalancer && - *serviceType != egcfgv1a1.ServiceTypeClusterIP && - *serviceType != egcfgv1a1.ServiceTypeNodePort { + if *serviceType != egv1a1.ServiceTypeLoadBalancer && + *serviceType != egv1a1.ServiceTypeClusterIP && + *serviceType != egv1a1.ServiceTypeNodePort { errs = append(errs, fmt.Errorf("unsupported envoy service type %v", serviceType)) } } if serviceType, serviceAllocateLoadBalancerNodePorts := spec.Provider.Kubernetes.EnvoyService.Type, spec.Provider.Kubernetes.EnvoyService.AllocateLoadBalancerNodePorts; serviceType != nil && serviceAllocateLoadBalancerNodePorts != nil { - if *serviceType != egcfgv1a1.ServiceTypeLoadBalancer { - errs = append(errs, fmt.Errorf("allocateLoadBalancerNodePorts can only be set for %v type", egcfgv1a1.ServiceTypeLoadBalancer)) + if *serviceType != egv1a1.ServiceTypeLoadBalancer { + errs = append(errs, fmt.Errorf("allocateLoadBalancerNodePorts can only be set for %v type", egv1a1.ServiceTypeLoadBalancer)) } } } return errs } -func validateBootstrap(boostrapConfig *egcfgv1a1.ProxyBootstrap) error { +func validateBootstrap(boostrapConfig *egv1a1.ProxyBootstrap) error { defaultBootstrap := &bootstrapv3.Bootstrap{} // TODO: need validate when enable prometheus? defaultBootstrapStr, err := bootstrap.GetRenderedBootstrapConfig(nil) @@ -169,7 +169,7 @@ func validateBootstrap(boostrapConfig *egcfgv1a1.ProxyBootstrap) error { return nil } -func validateProxyTelemetry(spec *egcfgv1a1.EnvoyProxySpec) []error { +func validateProxyTelemetry(spec *egv1a1.EnvoyProxySpec) []error { var errs []error if spec != nil && spec.Telemetry.AccessLog != nil { @@ -182,7 +182,7 @@ func validateProxyTelemetry(spec *egcfgv1a1.EnvoyProxySpec) []error { return errs } -func validateProxyAccessLog(accessLog *egcfgv1a1.ProxyAccessLog) []error { +func validateProxyAccessLog(accessLog *egv1a1.ProxyAccessLog) []error { if accessLog.Disable { return nil } @@ -191,12 +191,12 @@ func validateProxyAccessLog(accessLog *egcfgv1a1.ProxyAccessLog) []error { for _, setting := range accessLog.Settings { switch setting.Format.Type { - case egcfgv1a1.ProxyAccessLogFormatTypeText: + case egv1a1.ProxyAccessLogFormatTypeText: if setting.Format.Text == nil { err := fmt.Errorf("unable to configure access log when using Text format but \"text\" field being empty") errs = append(errs, err) } - case egcfgv1a1.ProxyAccessLogFormatTypeJSON: + case egv1a1.ProxyAccessLogFormatTypeJSON: if setting.Format.JSON == nil { err := fmt.Errorf("unable to configure access log when using JSON format but \"json\" field being empty") errs = append(errs, err) @@ -205,12 +205,12 @@ func validateProxyAccessLog(accessLog *egcfgv1a1.ProxyAccessLog) []error { for _, sink := range setting.Sinks { switch sink.Type { - case egcfgv1a1.ProxyAccessLogSinkTypeFile: + case egv1a1.ProxyAccessLogSinkTypeFile: if sink.File == nil { err := fmt.Errorf("unable to configure access log when using File sink type but \"file\" field being empty") errs = append(errs, err) } - case egcfgv1a1.ProxyAccessLogSinkTypeOpenTelemetry: + case egv1a1.ProxyAccessLogSinkTypeOpenTelemetry: if sink.OpenTelemetry == nil { err := fmt.Errorf("unable to configure access log when using OpenTelemetry sink type but \"openTelemetry\" field being empty") errs = append(errs, err) diff --git a/api/config/v1alpha1/validation/validate_test.go b/api/v1alpha1/validation/validate_test.go similarity index 55% rename from api/config/v1alpha1/validation/validate_test.go rename to api/v1alpha1/validation/validate_test.go index ccebf7d6357..1a12cd54e09 100644 --- a/api/config/v1alpha1/validation/validate_test.go +++ b/api/v1alpha1/validation/validate_test.go @@ -17,7 +17,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/pointer" - egcfgv1a1 "github.com/envoyproxy/gateway/api/config/v1alpha1" + egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/utils/ptr" ) @@ -37,22 +37,22 @@ var ( func TestValidateEnvoyProxy(t *testing.T) { testCases := []struct { name string - proxy *egcfgv1a1.EnvoyProxy + proxy *egv1a1.EnvoyProxy expected bool }{ { - name: "nil egcfgv1a1.EnvoyProxy", + name: "nil egv1a1.EnvoyProxy", proxy: nil, expected: false, }, { name: "nil provider", - proxy: &egcfgv1a1.EnvoyProxy{ + proxy: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: egcfgv1a1.EnvoyProxySpec{ + Spec: egv1a1.EnvoyProxySpec{ Provider: nil, }, }, @@ -60,14 +60,14 @@ func TestValidateEnvoyProxy(t *testing.T) { }, { name: "unsupported provider", - proxy: &egcfgv1a1.EnvoyProxy{ + proxy: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: egcfgv1a1.EnvoyProxySpec{ - Provider: &egcfgv1a1.EnvoyProxyProvider{ - Type: egcfgv1a1.ProviderTypeFile, + Spec: egv1a1.EnvoyProxySpec{ + Provider: &egv1a1.EnvoyProxyProvider{ + Type: egv1a1.ProviderTypeFile, }, }, }, @@ -75,15 +75,15 @@ func TestValidateEnvoyProxy(t *testing.T) { }, { name: "nil envoy service", - proxy: &egcfgv1a1.EnvoyProxy{ + proxy: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: egcfgv1a1.EnvoyProxySpec{ - Provider: &egcfgv1a1.EnvoyProxyProvider{ - Type: egcfgv1a1.ProviderTypeKubernetes, - Kubernetes: &egcfgv1a1.EnvoyProxyKubernetesProvider{ + Spec: egv1a1.EnvoyProxySpec{ + Provider: &egv1a1.EnvoyProxyProvider{ + Type: egv1a1.ProviderTypeKubernetes, + Kubernetes: &egv1a1.EnvoyProxyKubernetesProvider{ EnvoyService: nil, }, }, @@ -93,17 +93,17 @@ func TestValidateEnvoyProxy(t *testing.T) { }, { name: "unsupported envoy service type \"\" ", - proxy: &egcfgv1a1.EnvoyProxy{ + proxy: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: egcfgv1a1.EnvoyProxySpec{ - Provider: &egcfgv1a1.EnvoyProxyProvider{ - Type: egcfgv1a1.ProviderTypeKubernetes, - Kubernetes: &egcfgv1a1.EnvoyProxyKubernetesProvider{ - EnvoyService: &egcfgv1a1.KubernetesServiceSpec{ - Type: egcfgv1a1.GetKubernetesServiceType(""), + Spec: egv1a1.EnvoyProxySpec{ + Provider: &egv1a1.EnvoyProxyProvider{ + Type: egv1a1.ProviderTypeKubernetes, + Kubernetes: &egv1a1.EnvoyProxyKubernetesProvider{ + EnvoyService: &egv1a1.KubernetesServiceSpec{ + Type: egv1a1.GetKubernetesServiceType(""), }, }, }, @@ -113,17 +113,17 @@ func TestValidateEnvoyProxy(t *testing.T) { }, { name: "valid envoy service type 'NodePort'", - proxy: &egcfgv1a1.EnvoyProxy{ + proxy: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: egcfgv1a1.EnvoyProxySpec{ - Provider: &egcfgv1a1.EnvoyProxyProvider{ - Type: egcfgv1a1.ProviderTypeKubernetes, - Kubernetes: &egcfgv1a1.EnvoyProxyKubernetesProvider{ - EnvoyService: &egcfgv1a1.KubernetesServiceSpec{ - Type: egcfgv1a1.GetKubernetesServiceType(egcfgv1a1.ServiceType(corev1.ServiceTypeNodePort)), + Spec: egv1a1.EnvoyProxySpec{ + Provider: &egv1a1.EnvoyProxyProvider{ + Type: egv1a1.ProviderTypeKubernetes, + Kubernetes: &egv1a1.EnvoyProxyKubernetesProvider{ + EnvoyService: &egv1a1.KubernetesServiceSpec{ + Type: egv1a1.GetKubernetesServiceType(egv1a1.ServiceType(corev1.ServiceTypeNodePort)), }, }, }, @@ -133,17 +133,17 @@ func TestValidateEnvoyProxy(t *testing.T) { }, { name: "valid envoy service type 'LoadBalancer'", - proxy: &egcfgv1a1.EnvoyProxy{ + proxy: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: egcfgv1a1.EnvoyProxySpec{ - Provider: &egcfgv1a1.EnvoyProxyProvider{ - Type: egcfgv1a1.ProviderTypeKubernetes, - Kubernetes: &egcfgv1a1.EnvoyProxyKubernetesProvider{ - EnvoyService: &egcfgv1a1.KubernetesServiceSpec{ - Type: egcfgv1a1.GetKubernetesServiceType(egcfgv1a1.ServiceTypeLoadBalancer), + Spec: egv1a1.EnvoyProxySpec{ + Provider: &egv1a1.EnvoyProxyProvider{ + Type: egv1a1.ProviderTypeKubernetes, + Kubernetes: &egv1a1.EnvoyProxyKubernetesProvider{ + EnvoyService: &egv1a1.KubernetesServiceSpec{ + Type: egv1a1.GetKubernetesServiceType(egv1a1.ServiceTypeLoadBalancer), }, }, }, @@ -153,17 +153,17 @@ func TestValidateEnvoyProxy(t *testing.T) { }, { name: "valid envoy service type 'ClusterIP'", - proxy: &egcfgv1a1.EnvoyProxy{ + proxy: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: egcfgv1a1.EnvoyProxySpec{ - Provider: &egcfgv1a1.EnvoyProxyProvider{ - Type: egcfgv1a1.ProviderTypeKubernetes, - Kubernetes: &egcfgv1a1.EnvoyProxyKubernetesProvider{ - EnvoyService: &egcfgv1a1.KubernetesServiceSpec{ - Type: egcfgv1a1.GetKubernetesServiceType(egcfgv1a1.ServiceTypeClusterIP), + Spec: egv1a1.EnvoyProxySpec{ + Provider: &egv1a1.EnvoyProxyProvider{ + Type: egv1a1.ProviderTypeKubernetes, + Kubernetes: &egv1a1.EnvoyProxyKubernetesProvider{ + EnvoyService: &egv1a1.KubernetesServiceSpec{ + Type: egv1a1.GetKubernetesServiceType(egv1a1.ServiceTypeClusterIP), }, }, }, @@ -173,17 +173,17 @@ func TestValidateEnvoyProxy(t *testing.T) { }, { name: "envoy service type 'LoadBalancer' with allocateLoadBalancerNodePorts", - proxy: &egcfgv1a1.EnvoyProxy{ + proxy: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: egcfgv1a1.EnvoyProxySpec{ - Provider: &egcfgv1a1.EnvoyProxyProvider{ - Type: egcfgv1a1.ProviderTypeKubernetes, - Kubernetes: &egcfgv1a1.EnvoyProxyKubernetesProvider{ - EnvoyService: &egcfgv1a1.KubernetesServiceSpec{ - Type: egcfgv1a1.GetKubernetesServiceType(egcfgv1a1.ServiceTypeLoadBalancer), + Spec: egv1a1.EnvoyProxySpec{ + Provider: &egv1a1.EnvoyProxyProvider{ + Type: egv1a1.ProviderTypeKubernetes, + Kubernetes: &egv1a1.EnvoyProxyKubernetesProvider{ + EnvoyService: &egv1a1.KubernetesServiceSpec{ + Type: egv1a1.GetKubernetesServiceType(egv1a1.ServiceTypeLoadBalancer), AllocateLoadBalancerNodePorts: ptr.To[bool](false), }, }, @@ -194,17 +194,17 @@ func TestValidateEnvoyProxy(t *testing.T) { }, { name: "non envoy service type 'LoadBalancer' with allocateLoadBalancerNodePorts", - proxy: &egcfgv1a1.EnvoyProxy{ + proxy: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: egcfgv1a1.EnvoyProxySpec{ - Provider: &egcfgv1a1.EnvoyProxyProvider{ - Type: egcfgv1a1.ProviderTypeKubernetes, - Kubernetes: &egcfgv1a1.EnvoyProxyKubernetesProvider{ - EnvoyService: &egcfgv1a1.KubernetesServiceSpec{ - Type: egcfgv1a1.GetKubernetesServiceType(egcfgv1a1.ServiceTypeClusterIP), + Spec: egv1a1.EnvoyProxySpec{ + Provider: &egv1a1.EnvoyProxyProvider{ + Type: egv1a1.ProviderTypeKubernetes, + Kubernetes: &egv1a1.EnvoyProxyKubernetesProvider{ + EnvoyService: &egv1a1.KubernetesServiceSpec{ + Type: egv1a1.GetKubernetesServiceType(egv1a1.ServiceTypeClusterIP), AllocateLoadBalancerNodePorts: ptr.To[bool](false), }, }, @@ -215,13 +215,13 @@ func TestValidateEnvoyProxy(t *testing.T) { }, { name: "valid user bootstrap replace type", - proxy: &egcfgv1a1.EnvoyProxy{ + proxy: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: egcfgv1a1.EnvoyProxySpec{ - Bootstrap: &egcfgv1a1.ProxyBootstrap{ + Spec: egv1a1.EnvoyProxySpec{ + Bootstrap: &egv1a1.ProxyBootstrap{ Value: validUserBootstrap, }, }, @@ -230,14 +230,14 @@ func TestValidateEnvoyProxy(t *testing.T) { }, { name: "valid user bootstrap merge type", - proxy: &egcfgv1a1.EnvoyProxy{ + proxy: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: egcfgv1a1.EnvoyProxySpec{ - Bootstrap: &egcfgv1a1.ProxyBootstrap{ - Type: (*egcfgv1a1.BootstrapType)(pointer.String(string(egcfgv1a1.BootstrapTypeMerge))), + Spec: egv1a1.EnvoyProxySpec{ + Bootstrap: &egv1a1.ProxyBootstrap{ + Type: (*egv1a1.BootstrapType)(pointer.String(string(egv1a1.BootstrapTypeMerge))), Value: mergeUserBootstrap, }, }, @@ -246,13 +246,13 @@ func TestValidateEnvoyProxy(t *testing.T) { }, { name: "user bootstrap with missing admin address", - proxy: &egcfgv1a1.EnvoyProxy{ + proxy: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: egcfgv1a1.EnvoyProxySpec{ - Bootstrap: &egcfgv1a1.ProxyBootstrap{ + Spec: egv1a1.EnvoyProxySpec{ + Bootstrap: &egv1a1.ProxyBootstrap{ Value: missingAdminAddressUserBootstrap, }, }, @@ -261,13 +261,13 @@ func TestValidateEnvoyProxy(t *testing.T) { }, { name: "user bootstrap with different dynamic resources", - proxy: &egcfgv1a1.EnvoyProxy{ + proxy: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: egcfgv1a1.EnvoyProxySpec{ - Bootstrap: &egcfgv1a1.ProxyBootstrap{ + Spec: egv1a1.EnvoyProxySpec{ + Bootstrap: &egv1a1.ProxyBootstrap{ Value: differentDynamicResourcesUserBootstrap, }, }, @@ -276,13 +276,13 @@ func TestValidateEnvoyProxy(t *testing.T) { }, { name: "user bootstrap with different xds_cluster endpoint", - proxy: &egcfgv1a1.EnvoyProxy{ + proxy: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: egcfgv1a1.EnvoyProxySpec{ - Bootstrap: &egcfgv1a1.ProxyBootstrap{ + Spec: egv1a1.EnvoyProxySpec{ + Bootstrap: &egv1a1.ProxyBootstrap{ Value: differentXdsClusterAddressBootstrap, }, }, @@ -291,18 +291,18 @@ func TestValidateEnvoyProxy(t *testing.T) { }, { name: "should invalid when accesslog enabled using Text format, but `text` field being empty", - proxy: &egcfgv1a1.EnvoyProxy{ + proxy: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: egcfgv1a1.EnvoyProxySpec{ - Telemetry: egcfgv1a1.ProxyTelemetry{ - AccessLog: &egcfgv1a1.ProxyAccessLog{ - Settings: []egcfgv1a1.ProxyAccessLogSetting{ + Spec: egv1a1.EnvoyProxySpec{ + Telemetry: egv1a1.ProxyTelemetry{ + AccessLog: &egv1a1.ProxyAccessLog{ + Settings: []egv1a1.ProxyAccessLogSetting{ { - Format: egcfgv1a1.ProxyAccessLogFormat{ - Type: egcfgv1a1.ProxyAccessLogFormatTypeText, + Format: egv1a1.ProxyAccessLogFormat{ + Type: egv1a1.ProxyAccessLogFormatTypeText, }, }, }, @@ -314,23 +314,23 @@ func TestValidateEnvoyProxy(t *testing.T) { }, { name: "should invalid when accesslog enabled using File sink, but `file` field being empty", - proxy: &egcfgv1a1.EnvoyProxy{ + proxy: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: "test", Name: "test", }, - Spec: egcfgv1a1.EnvoyProxySpec{ - Telemetry: egcfgv1a1.ProxyTelemetry{ - AccessLog: &egcfgv1a1.ProxyAccessLog{ - Settings: []egcfgv1a1.ProxyAccessLogSetting{ + Spec: egv1a1.EnvoyProxySpec{ + Telemetry: egv1a1.ProxyTelemetry{ + AccessLog: &egv1a1.ProxyAccessLog{ + Settings: []egv1a1.ProxyAccessLogSetting{ { - Format: egcfgv1a1.ProxyAccessLogFormat{ - Type: egcfgv1a1.ProxyAccessLogFormatTypeText, + Format: egv1a1.ProxyAccessLogFormat{ + Type: egv1a1.ProxyAccessLogFormatTypeText, Text: pointer.String("[%START_TIME%]"), }, - Sinks: []egcfgv1a1.ProxyAccessLogSink{ + Sinks: []egv1a1.ProxyAccessLogSink{ { - Type: egcfgv1a1.ProxyAccessLogSinkTypeFile, + Type: egv1a1.ProxyAccessLogSinkTypeFile, }, }, }, @@ -357,74 +357,74 @@ func TestValidateEnvoyProxy(t *testing.T) { } func TestEnvoyGateway(t *testing.T) { - envoyGateway := egcfgv1a1.DefaultEnvoyGateway() + envoyGateway := egv1a1.DefaultEnvoyGateway() assert.True(t, envoyGateway.Provider != nil) assert.True(t, envoyGateway.Gateway != nil) assert.True(t, envoyGateway.Logging != nil) envoyGateway.SetEnvoyGatewayDefaults() - assert.Equal(t, envoyGateway.Logging, egcfgv1a1.DefaultEnvoyGatewayLogging()) + assert.Equal(t, envoyGateway.Logging, egv1a1.DefaultEnvoyGatewayLogging()) - logging := egcfgv1a1.DefaultEnvoyGatewayLogging() + logging := egv1a1.DefaultEnvoyGatewayLogging() assert.True(t, logging != nil) - assert.True(t, logging.Level[egcfgv1a1.LogComponentGatewayDefault] == egcfgv1a1.LogLevelInfo) + assert.True(t, logging.Level[egv1a1.LogComponentGatewayDefault] == egv1a1.LogLevelInfo) - gatewayLogging := &egcfgv1a1.EnvoyGatewayLogging{ + gatewayLogging := &egv1a1.EnvoyGatewayLogging{ Level: logging.Level, } gatewayLogging.SetEnvoyGatewayLoggingDefaults() assert.True(t, gatewayLogging != nil) - assert.True(t, gatewayLogging.Level[egcfgv1a1.LogComponentGatewayDefault] == egcfgv1a1.LogLevelInfo) + assert.True(t, gatewayLogging.Level[egv1a1.LogComponentGatewayDefault] == egv1a1.LogLevelInfo) } func TestDefaultEnvoyGatewayLoggingLevel(t *testing.T) { type args struct { component string - level egcfgv1a1.LogLevel + level egv1a1.LogLevel } tests := []struct { name string args args - want egcfgv1a1.LogLevel + want egv1a1.LogLevel }{ { name: "test default info level for empty level", args: args{component: "", level: ""}, - want: egcfgv1a1.LogLevelInfo, + want: egv1a1.LogLevelInfo, }, { name: "test default info level for empty level", - args: args{component: string(egcfgv1a1.LogComponentGatewayDefault), level: ""}, - want: egcfgv1a1.LogLevelInfo, + args: args{component: string(egv1a1.LogComponentGatewayDefault), level: ""}, + want: egv1a1.LogLevelInfo, }, { name: "test default info level for info level", - args: args{component: string(egcfgv1a1.LogComponentGatewayDefault), level: egcfgv1a1.LogLevelInfo}, - want: egcfgv1a1.LogLevelInfo, + args: args{component: string(egv1a1.LogComponentGatewayDefault), level: egv1a1.LogLevelInfo}, + want: egv1a1.LogLevelInfo, }, { name: "test default error level for error level", - args: args{component: string(egcfgv1a1.LogComponentGatewayDefault), level: egcfgv1a1.LogLevelError}, - want: egcfgv1a1.LogLevelError, + args: args{component: string(egv1a1.LogComponentGatewayDefault), level: egv1a1.LogLevelError}, + want: egv1a1.LogLevelError, }, { name: "test gateway-api error level for error level", - args: args{component: string(egcfgv1a1.LogComponentGatewayAPIRunner), level: egcfgv1a1.LogLevelError}, - want: egcfgv1a1.LogLevelError, + args: args{component: string(egv1a1.LogComponentGatewayAPIRunner), level: egv1a1.LogLevelError}, + want: egv1a1.LogLevelError, }, { name: "test gateway-api info level for info level", - args: args{component: string(egcfgv1a1.LogComponentGatewayAPIRunner), level: egcfgv1a1.LogLevelInfo}, - want: egcfgv1a1.LogLevelInfo, + args: args{component: string(egv1a1.LogComponentGatewayAPIRunner), level: egv1a1.LogLevelInfo}, + want: egv1a1.LogLevelInfo, }, { name: "test default gateway-api warn level for info level", - args: args{component: string(egcfgv1a1.LogComponentGatewayAPIRunner), level: ""}, - want: egcfgv1a1.LogLevelInfo, + args: args{component: string(egv1a1.LogComponentGatewayAPIRunner), level: ""}, + want: egv1a1.LogLevelInfo, }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - logging := &egcfgv1a1.EnvoyGatewayLogging{} + logging := &egv1a1.EnvoyGatewayLogging{} if got := logging.DefaultEnvoyGatewayLoggingLevel(tt.args.level); got != tt.want { t.Errorf("defaultLevel() = %v, want %v", got, tt.want) } @@ -433,9 +433,9 @@ func TestDefaultEnvoyGatewayLoggingLevel(t *testing.T) { } func TestEnvoyGatewayProvider(t *testing.T) { - envoyGateway := &egcfgv1a1.EnvoyGateway{ + envoyGateway := &egv1a1.EnvoyGateway{ TypeMeta: metav1.TypeMeta{}, - EnvoyGatewaySpec: egcfgv1a1.EnvoyGatewaySpec{Provider: egcfgv1a1.DefaultEnvoyGatewayProvider()}, + EnvoyGatewaySpec: egv1a1.EnvoyGatewaySpec{Provider: egv1a1.DefaultEnvoyGatewayProvider()}, } assert.True(t, envoyGateway.Provider != nil) @@ -443,14 +443,14 @@ func TestEnvoyGatewayProvider(t *testing.T) { assert.True(t, envoyGatewayProvider.Kubernetes == nil) assert.Equal(t, envoyGateway.Provider, envoyGatewayProvider) - envoyGatewayProvider.Kubernetes = egcfgv1a1.DefaultEnvoyGatewayKubeProvider() - assert.Equal(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment, egcfgv1a1.DefaultKubernetesDeployment(egcfgv1a1.DefaultRateLimitImage)) + envoyGatewayProvider.Kubernetes = egv1a1.DefaultEnvoyGatewayKubeProvider() + assert.Equal(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment, egv1a1.DefaultKubernetesDeployment(egv1a1.DefaultRateLimitImage)) - envoyGatewayProvider.Kubernetes = &egcfgv1a1.EnvoyGatewayKubernetesProvider{} + envoyGatewayProvider.Kubernetes = &egv1a1.EnvoyGatewayKubernetesProvider{} assert.True(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment == nil) - envoyGatewayProvider.Kubernetes = &egcfgv1a1.EnvoyGatewayKubernetesProvider{ - RateLimitDeployment: &egcfgv1a1.KubernetesDeploymentSpec{ + envoyGatewayProvider.Kubernetes = &egv1a1.EnvoyGatewayKubernetesProvider{ + RateLimitDeployment: &egv1a1.KubernetesDeploymentSpec{ Replicas: nil, Pod: nil, Container: nil, @@ -460,11 +460,11 @@ func TestEnvoyGatewayProvider(t *testing.T) { assert.True(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment.Container == nil) envoyGatewayKubeProvider := envoyGatewayProvider.GetEnvoyGatewayKubeProvider() - envoyGatewayProvider.Kubernetes = &egcfgv1a1.EnvoyGatewayKubernetesProvider{ - RateLimitDeployment: &egcfgv1a1.KubernetesDeploymentSpec{ + envoyGatewayProvider.Kubernetes = &egv1a1.EnvoyGatewayKubernetesProvider{ + RateLimitDeployment: &egv1a1.KubernetesDeploymentSpec{ Replicas: nil, Pod: nil, - Container: &egcfgv1a1.KubernetesContainerSpec{ + Container: &egv1a1.KubernetesContainerSpec{ Resources: nil, SecurityContext: nil, Image: nil, @@ -477,23 +477,23 @@ func TestEnvoyGatewayProvider(t *testing.T) { assert.Equal(t, envoyGatewayProvider.Kubernetes, envoyGatewayKubeProvider) assert.True(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment != nil) - assert.Equal(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment, egcfgv1a1.DefaultKubernetesDeployment(egcfgv1a1.DefaultRateLimitImage)) + assert.Equal(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment, egv1a1.DefaultKubernetesDeployment(egv1a1.DefaultRateLimitImage)) assert.True(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment.Replicas != nil) - assert.Equal(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment.Replicas, egcfgv1a1.DefaultKubernetesDeploymentReplicas()) + assert.Equal(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment.Replicas, egv1a1.DefaultKubernetesDeploymentReplicas()) assert.True(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment.Pod != nil) - assert.Equal(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment.Pod, egcfgv1a1.DefaultKubernetesPod()) + assert.Equal(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment.Pod, egv1a1.DefaultKubernetesPod()) assert.True(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment.Container != nil) - assert.Equal(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment.Container, egcfgv1a1.DefaultKubernetesContainer(egcfgv1a1.DefaultRateLimitImage)) + assert.Equal(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment.Container, egv1a1.DefaultKubernetesContainer(egv1a1.DefaultRateLimitImage)) assert.True(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment.Container.Resources != nil) - assert.Equal(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment.Container.Resources, egcfgv1a1.DefaultResourceRequirements()) + assert.Equal(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment.Container.Resources, egv1a1.DefaultResourceRequirements()) assert.True(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment.Container.Image != nil) - assert.Equal(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment.Container.Image, egcfgv1a1.DefaultKubernetesContainerImage(egcfgv1a1.DefaultRateLimitImage)) + assert.Equal(t, envoyGatewayProvider.Kubernetes.RateLimitDeployment.Container.Image, egv1a1.DefaultKubernetesContainerImage(egv1a1.DefaultRateLimitImage)) } func TestEnvoyProxyProvider(t *testing.T) { - envoyProxy := &egcfgv1a1.EnvoyProxy{ - Spec: egcfgv1a1.EnvoyProxySpec{ - Provider: egcfgv1a1.DefaultEnvoyProxyProvider(), + envoyProxy := &egv1a1.EnvoyProxy{ + Spec: egv1a1.EnvoyProxySpec{ + Provider: egv1a1.DefaultEnvoyProxyProvider(), }, } assert.True(t, envoyProxy.Spec.Provider != nil) @@ -510,25 +510,25 @@ func TestEnvoyProxyProvider(t *testing.T) { envoyProxyProvider.GetEnvoyProxyKubeProvider() assert.True(t, envoyProxyProvider.Kubernetes.EnvoyDeployment != nil) - assert.Equal(t, envoyProxyProvider.Kubernetes.EnvoyDeployment, egcfgv1a1.DefaultKubernetesDeployment(egcfgv1a1.DefaultEnvoyProxyImage)) + assert.Equal(t, envoyProxyProvider.Kubernetes.EnvoyDeployment, egv1a1.DefaultKubernetesDeployment(egv1a1.DefaultEnvoyProxyImage)) assert.True(t, envoyProxyProvider.Kubernetes.EnvoyDeployment.Replicas != nil) - assert.Equal(t, envoyProxyProvider.Kubernetes.EnvoyDeployment.Replicas, egcfgv1a1.DefaultKubernetesDeploymentReplicas()) + assert.Equal(t, envoyProxyProvider.Kubernetes.EnvoyDeployment.Replicas, egv1a1.DefaultKubernetesDeploymentReplicas()) assert.True(t, envoyProxyProvider.Kubernetes.EnvoyDeployment.Pod != nil) - assert.Equal(t, envoyProxyProvider.Kubernetes.EnvoyDeployment.Pod, egcfgv1a1.DefaultKubernetesPod()) + assert.Equal(t, envoyProxyProvider.Kubernetes.EnvoyDeployment.Pod, egv1a1.DefaultKubernetesPod()) assert.True(t, envoyProxyProvider.Kubernetes.EnvoyDeployment.Container != nil) - assert.Equal(t, envoyProxyProvider.Kubernetes.EnvoyDeployment.Container, egcfgv1a1.DefaultKubernetesContainer(egcfgv1a1.DefaultEnvoyProxyImage)) + assert.Equal(t, envoyProxyProvider.Kubernetes.EnvoyDeployment.Container, egv1a1.DefaultKubernetesContainer(egv1a1.DefaultEnvoyProxyImage)) assert.True(t, envoyProxyProvider.Kubernetes.EnvoyDeployment.Container.Resources != nil) - assert.Equal(t, envoyProxyProvider.Kubernetes.EnvoyDeployment.Container.Resources, egcfgv1a1.DefaultResourceRequirements()) + assert.Equal(t, envoyProxyProvider.Kubernetes.EnvoyDeployment.Container.Resources, egv1a1.DefaultResourceRequirements()) assert.True(t, envoyProxyProvider.Kubernetes.EnvoyDeployment.Container.Image != nil) - assert.Equal(t, envoyProxyProvider.Kubernetes.EnvoyDeployment.Container.Image, egcfgv1a1.DefaultKubernetesContainerImage(egcfgv1a1.DefaultEnvoyProxyImage)) + assert.Equal(t, envoyProxyProvider.Kubernetes.EnvoyDeployment.Container.Image, egv1a1.DefaultKubernetesContainerImage(egv1a1.DefaultEnvoyProxyImage)) assert.True(t, envoyProxyProvider.Kubernetes.EnvoyService != nil) - assert.True(t, reflect.DeepEqual(envoyProxyProvider.Kubernetes.EnvoyService.Type, egcfgv1a1.GetKubernetesServiceType(egcfgv1a1.ServiceTypeLoadBalancer))) + assert.True(t, reflect.DeepEqual(envoyProxyProvider.Kubernetes.EnvoyService.Type, egv1a1.GetKubernetesServiceType(egv1a1.ServiceTypeLoadBalancer))) } func TestEnvoyGatewayAdmin(t *testing.T) { // default envoygateway config admin should not be nil - eg := egcfgv1a1.DefaultEnvoyGateway() + eg := egv1a1.DefaultEnvoyGateway() assert.True(t, eg.Admin != nil) // get default admin config from envoygateway @@ -536,16 +536,16 @@ func TestEnvoyGatewayAdmin(t *testing.T) { egAdmin := eg.GetEnvoyGatewayAdmin() assert.True(t, egAdmin != nil) assert.True(t, egAdmin.Debug == false) - assert.True(t, egAdmin.Address.Port == egcfgv1a1.GatewayAdminPort) - assert.True(t, egAdmin.Address.Host == egcfgv1a1.GatewayAdminHost) + assert.True(t, egAdmin.Address.Port == egv1a1.GatewayAdminPort) + assert.True(t, egAdmin.Address.Host == egv1a1.GatewayAdminHost) // override the admin config // values should be updated eg.Admin.Debug = true eg.Admin.Address = nil assert.True(t, eg.Admin.Debug == true) - assert.True(t, eg.GetEnvoyGatewayAdmin().Address.Port == egcfgv1a1.GatewayAdminPort) - assert.True(t, eg.GetEnvoyGatewayAdmin().Address.Host == egcfgv1a1.GatewayAdminHost) + assert.True(t, eg.GetEnvoyGatewayAdmin().Address.Port == egv1a1.GatewayAdminPort) + assert.True(t, eg.GetEnvoyGatewayAdmin().Address.Host == egv1a1.GatewayAdminHost) // set eg defaults when admin is nil // the admin should not be nil @@ -553,31 +553,31 @@ func TestEnvoyGatewayAdmin(t *testing.T) { eg.SetEnvoyGatewayDefaults() assert.True(t, eg.Admin != nil) assert.True(t, eg.Admin.Debug == false) - assert.True(t, eg.Admin.Address.Port == egcfgv1a1.GatewayAdminPort) - assert.True(t, eg.Admin.Address.Host == egcfgv1a1.GatewayAdminHost) + assert.True(t, eg.Admin.Address.Port == egv1a1.GatewayAdminPort) + assert.True(t, eg.Admin.Address.Host == egv1a1.GatewayAdminHost) } func TestGetEnvoyProxyDefaultComponentLevel(t *testing.T) { cases := []struct { - logging egcfgv1a1.ProxyLogging - component egcfgv1a1.LogComponent - expected egcfgv1a1.LogLevel + logging egv1a1.ProxyLogging + component egv1a1.LogComponent + expected egv1a1.LogLevel }{ { - logging: egcfgv1a1.ProxyLogging{ - Level: map[egcfgv1a1.LogComponent]egcfgv1a1.LogLevel{ - egcfgv1a1.LogComponentDefault: egcfgv1a1.LogLevelInfo, + logging: egv1a1.ProxyLogging{ + Level: map[egv1a1.LogComponent]egv1a1.LogLevel{ + egv1a1.LogComponentDefault: egv1a1.LogLevelInfo, }, }, - expected: egcfgv1a1.LogLevelInfo, + expected: egv1a1.LogLevelInfo, }, { - logging: egcfgv1a1.ProxyLogging{ - Level: map[egcfgv1a1.LogComponent]egcfgv1a1.LogLevel{ - egcfgv1a1.LogComponentDefault: egcfgv1a1.LogLevelInfo, + logging: egv1a1.ProxyLogging{ + Level: map[egv1a1.LogComponent]egv1a1.LogLevel{ + egv1a1.LogComponentDefault: egv1a1.LogLevelInfo, }, }, - expected: egcfgv1a1.LogLevelInfo, + expected: egv1a1.LogLevelInfo, }, } @@ -591,47 +591,47 @@ func TestGetEnvoyProxyDefaultComponentLevel(t *testing.T) { func TestGetEnvoyProxyComponentLevelArgs(t *testing.T) { cases := []struct { - logging egcfgv1a1.ProxyLogging + logging egv1a1.ProxyLogging expected string }{ { - logging: egcfgv1a1.ProxyLogging{}, + logging: egv1a1.ProxyLogging{}, expected: "", }, { - logging: egcfgv1a1.ProxyLogging{ - Level: map[egcfgv1a1.LogComponent]egcfgv1a1.LogLevel{ - egcfgv1a1.LogComponentDefault: egcfgv1a1.LogLevelInfo, + logging: egv1a1.ProxyLogging{ + Level: map[egv1a1.LogComponent]egv1a1.LogLevel{ + egv1a1.LogComponentDefault: egv1a1.LogLevelInfo, }, }, expected: "", }, { - logging: egcfgv1a1.ProxyLogging{ - Level: map[egcfgv1a1.LogComponent]egcfgv1a1.LogLevel{ - egcfgv1a1.LogComponentDefault: egcfgv1a1.LogLevelInfo, - egcfgv1a1.LogComponentAdmin: egcfgv1a1.LogLevelWarn, + logging: egv1a1.ProxyLogging{ + Level: map[egv1a1.LogComponent]egv1a1.LogLevel{ + egv1a1.LogComponentDefault: egv1a1.LogLevelInfo, + egv1a1.LogComponentAdmin: egv1a1.LogLevelWarn, }, }, expected: "admin:warn", }, { - logging: egcfgv1a1.ProxyLogging{ - Level: map[egcfgv1a1.LogComponent]egcfgv1a1.LogLevel{ - egcfgv1a1.LogComponentDefault: egcfgv1a1.LogLevelInfo, - egcfgv1a1.LogComponentAdmin: egcfgv1a1.LogLevelWarn, - egcfgv1a1.LogComponentFilter: egcfgv1a1.LogLevelDebug, + logging: egv1a1.ProxyLogging{ + Level: map[egv1a1.LogComponent]egv1a1.LogLevel{ + egv1a1.LogComponentDefault: egv1a1.LogLevelInfo, + egv1a1.LogComponentAdmin: egv1a1.LogLevelWarn, + egv1a1.LogComponentFilter: egv1a1.LogLevelDebug, }, }, expected: "admin:warn,filter:debug", }, { - logging: egcfgv1a1.ProxyLogging{ - Level: map[egcfgv1a1.LogComponent]egcfgv1a1.LogLevel{ - egcfgv1a1.LogComponentDefault: egcfgv1a1.LogLevelInfo, - egcfgv1a1.LogComponentAdmin: egcfgv1a1.LogLevelWarn, - egcfgv1a1.LogComponentFilter: egcfgv1a1.LogLevelDebug, - egcfgv1a1.LogComponentClient: "", + logging: egv1a1.ProxyLogging{ + Level: map[egv1a1.LogComponent]egv1a1.LogLevel{ + egv1a1.LogComponentDefault: egv1a1.LogLevelInfo, + egv1a1.LogComponentAdmin: egv1a1.LogLevelWarn, + egv1a1.LogComponentFilter: egv1a1.LogLevelDebug, + egv1a1.LogComponentClient: "", }, }, expected: "admin:warn,filter:debug", diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index ac04882eb3a..8775f5b5ee7 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -11,8 +11,11 @@ package v1alpha1 import ( + appsv1 "k8s.io/api/apps/v1" + corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/apis/meta/v1" runtime "k8s.io/apimachinery/pkg/runtime" + "sigs.k8s.io/gateway-api/apis/v1beta1" ) // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. @@ -207,211 +210,1423 @@ func (in *ClientTrafficPolicyStatus) DeepCopy() *ClientTrafficPolicyStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CustomTag) DeepCopyInto(out *CustomTag) { + *out = *in + if in.Literal != nil { + in, out := &in.Literal, &out.Literal + *out = new(LiteralCustomTag) + **out = **in + } + if in.Environment != nil { + in, out := &in.Environment, &out.Environment + *out = new(EnvironmentCustomTag) + (*in).DeepCopyInto(*out) + } + if in.RequestHeader != nil { + in, out := &in.RequestHeader, &out.RequestHeader + *out = new(RequestHeaderCustomTag) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CustomTag. +func (in *CustomTag) DeepCopy() *CustomTag { + if in == nil { + return nil + } + out := new(CustomTag) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvironmentCustomTag) DeepCopyInto(out *EnvironmentCustomTag) { + *out = *in + if in.DefaultValue != nil { + in, out := &in.DefaultValue, &out.DefaultValue + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvironmentCustomTag. +func (in *EnvironmentCustomTag) DeepCopy() *EnvironmentCustomTag { + if in == nil { + return nil + } + out := new(EnvironmentCustomTag) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvoyGateway) DeepCopyInto(out *EnvoyGateway) { + *out = *in + out.TypeMeta = in.TypeMeta + in.EnvoyGatewaySpec.DeepCopyInto(&out.EnvoyGatewaySpec) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGateway. +func (in *EnvoyGateway) DeepCopy() *EnvoyGateway { + if in == nil { + return nil + } + out := new(EnvoyGateway) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *EnvoyGateway) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvoyGatewayAdmin) DeepCopyInto(out *EnvoyGatewayAdmin) { + *out = *in + if in.Address != nil { + in, out := &in.Address, &out.Address + *out = new(EnvoyGatewayAdminAddress) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayAdmin. +func (in *EnvoyGatewayAdmin) DeepCopy() *EnvoyGatewayAdmin { + if in == nil { + return nil + } + out := new(EnvoyGatewayAdmin) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvoyGatewayAdminAddress) DeepCopyInto(out *EnvoyGatewayAdminAddress) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayAdminAddress. +func (in *EnvoyGatewayAdminAddress) DeepCopy() *EnvoyGatewayAdminAddress { + if in == nil { + return nil + } + out := new(EnvoyGatewayAdminAddress) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvoyGatewayCustomProvider) DeepCopyInto(out *EnvoyGatewayCustomProvider) { + *out = *in + in.Resource.DeepCopyInto(&out.Resource) + in.Infrastructure.DeepCopyInto(&out.Infrastructure) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayCustomProvider. +func (in *EnvoyGatewayCustomProvider) DeepCopy() *EnvoyGatewayCustomProvider { + if in == nil { + return nil + } + out := new(EnvoyGatewayCustomProvider) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvoyGatewayFileResourceProvider) DeepCopyInto(out *EnvoyGatewayFileResourceProvider) { + *out = *in + if in.Paths != nil { + in, out := &in.Paths, &out.Paths + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayFileResourceProvider. +func (in *EnvoyGatewayFileResourceProvider) DeepCopy() *EnvoyGatewayFileResourceProvider { + if in == nil { + return nil + } + out := new(EnvoyGatewayFileResourceProvider) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvoyGatewayHostInfrastructureProvider) DeepCopyInto(out *EnvoyGatewayHostInfrastructureProvider) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayHostInfrastructureProvider. +func (in *EnvoyGatewayHostInfrastructureProvider) DeepCopy() *EnvoyGatewayHostInfrastructureProvider { + if in == nil { + return nil + } + out := new(EnvoyGatewayHostInfrastructureProvider) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvoyGatewayInfrastructureProvider) DeepCopyInto(out *EnvoyGatewayInfrastructureProvider) { + *out = *in + if in.Host != nil { + in, out := &in.Host, &out.Host + *out = new(EnvoyGatewayHostInfrastructureProvider) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayInfrastructureProvider. +func (in *EnvoyGatewayInfrastructureProvider) DeepCopy() *EnvoyGatewayInfrastructureProvider { + if in == nil { + return nil + } + out := new(EnvoyGatewayInfrastructureProvider) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvoyGatewayKubernetesProvider) DeepCopyInto(out *EnvoyGatewayKubernetesProvider) { + *out = *in + if in.RateLimitDeployment != nil { + in, out := &in.RateLimitDeployment, &out.RateLimitDeployment + *out = new(KubernetesDeploymentSpec) + (*in).DeepCopyInto(*out) + } + if in.Watch != nil { + in, out := &in.Watch, &out.Watch + *out = new(KubernetesWatchMode) + (*in).DeepCopyInto(*out) + } + if in.Deploy != nil { + in, out := &in.Deploy, &out.Deploy + *out = new(KubernetesDeployMode) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayKubernetesProvider. +func (in *EnvoyGatewayKubernetesProvider) DeepCopy() *EnvoyGatewayKubernetesProvider { + if in == nil { + return nil + } + out := new(EnvoyGatewayKubernetesProvider) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvoyGatewayLogging) DeepCopyInto(out *EnvoyGatewayLogging) { + *out = *in + if in.Level != nil { + in, out := &in.Level, &out.Level + *out = make(map[EnvoyGatewayLogComponent]LogLevel, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayLogging. +func (in *EnvoyGatewayLogging) DeepCopy() *EnvoyGatewayLogging { + if in == nil { + return nil + } + out := new(EnvoyGatewayLogging) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvoyGatewayProvider) DeepCopyInto(out *EnvoyGatewayProvider) { + *out = *in + if in.Kubernetes != nil { + in, out := &in.Kubernetes, &out.Kubernetes + *out = new(EnvoyGatewayKubernetesProvider) + (*in).DeepCopyInto(*out) + } + if in.Custom != nil { + in, out := &in.Custom, &out.Custom + *out = new(EnvoyGatewayCustomProvider) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayProvider. +func (in *EnvoyGatewayProvider) DeepCopy() *EnvoyGatewayProvider { + if in == nil { + return nil + } + out := new(EnvoyGatewayProvider) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvoyGatewayResourceProvider) DeepCopyInto(out *EnvoyGatewayResourceProvider) { + *out = *in + if in.File != nil { + in, out := &in.File, &out.File + *out = new(EnvoyGatewayFileResourceProvider) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewayResourceProvider. +func (in *EnvoyGatewayResourceProvider) DeepCopy() *EnvoyGatewayResourceProvider { + if in == nil { + return nil + } + out := new(EnvoyGatewayResourceProvider) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvoyGatewaySpec) DeepCopyInto(out *EnvoyGatewaySpec) { + *out = *in + if in.Gateway != nil { + in, out := &in.Gateway, &out.Gateway + *out = new(Gateway) + **out = **in + } + if in.Provider != nil { + in, out := &in.Provider, &out.Provider + *out = new(EnvoyGatewayProvider) + (*in).DeepCopyInto(*out) + } + if in.Logging != nil { + in, out := &in.Logging, &out.Logging + *out = new(EnvoyGatewayLogging) + (*in).DeepCopyInto(*out) + } + if in.Admin != nil { + in, out := &in.Admin, &out.Admin + *out = new(EnvoyGatewayAdmin) + (*in).DeepCopyInto(*out) + } + if in.RateLimit != nil { + in, out := &in.RateLimit, &out.RateLimit + *out = new(RateLimit) + (*in).DeepCopyInto(*out) + } + if in.ExtensionManager != nil { + in, out := &in.ExtensionManager, &out.ExtensionManager + *out = new(ExtensionManager) + (*in).DeepCopyInto(*out) + } + if in.ExtensionAPIs != nil { + in, out := &in.ExtensionAPIs, &out.ExtensionAPIs + *out = new(ExtensionAPISettings) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewaySpec. +func (in *EnvoyGatewaySpec) DeepCopy() *EnvoyGatewaySpec { + if in == nil { + return nil + } + out := new(EnvoyGatewaySpec) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *EnvoyJSONPatchConfig) DeepCopyInto(out *EnvoyJSONPatchConfig) { *out = *in - in.Operation.DeepCopyInto(&out.Operation) + in.Operation.DeepCopyInto(&out.Operation) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyJSONPatchConfig. +func (in *EnvoyJSONPatchConfig) DeepCopy() *EnvoyJSONPatchConfig { + if in == nil { + return nil + } + out := new(EnvoyJSONPatchConfig) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvoyPatchPolicy) DeepCopyInto(out *EnvoyPatchPolicy) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyPatchPolicy. +func (in *EnvoyPatchPolicy) DeepCopy() *EnvoyPatchPolicy { + if in == nil { + return nil + } + out := new(EnvoyPatchPolicy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *EnvoyPatchPolicy) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvoyPatchPolicyList) DeepCopyInto(out *EnvoyPatchPolicyList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]EnvoyPatchPolicy, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyPatchPolicyList. +func (in *EnvoyPatchPolicyList) DeepCopy() *EnvoyPatchPolicyList { + if in == nil { + return nil + } + out := new(EnvoyPatchPolicyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *EnvoyPatchPolicyList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvoyPatchPolicySpec) DeepCopyInto(out *EnvoyPatchPolicySpec) { + *out = *in + if in.JSONPatches != nil { + in, out := &in.JSONPatches, &out.JSONPatches + *out = make([]EnvoyJSONPatchConfig, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + in.TargetRef.DeepCopyInto(&out.TargetRef) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyPatchPolicySpec. +func (in *EnvoyPatchPolicySpec) DeepCopy() *EnvoyPatchPolicySpec { + if in == nil { + return nil + } + out := new(EnvoyPatchPolicySpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvoyPatchPolicyStatus) DeepCopyInto(out *EnvoyPatchPolicyStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]v1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyPatchPolicyStatus. +func (in *EnvoyPatchPolicyStatus) DeepCopy() *EnvoyPatchPolicyStatus { + if in == nil { + return nil + } + out := new(EnvoyPatchPolicyStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvoyProxy) DeepCopyInto(out *EnvoyProxy) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + out.Status = in.Status +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyProxy. +func (in *EnvoyProxy) DeepCopy() *EnvoyProxy { + if in == nil { + return nil + } + out := new(EnvoyProxy) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *EnvoyProxy) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvoyProxyKubernetesProvider) DeepCopyInto(out *EnvoyProxyKubernetesProvider) { + *out = *in + if in.EnvoyDeployment != nil { + in, out := &in.EnvoyDeployment, &out.EnvoyDeployment + *out = new(KubernetesDeploymentSpec) + (*in).DeepCopyInto(*out) + } + if in.EnvoyService != nil { + in, out := &in.EnvoyService, &out.EnvoyService + *out = new(KubernetesServiceSpec) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyProxyKubernetesProvider. +func (in *EnvoyProxyKubernetesProvider) DeepCopy() *EnvoyProxyKubernetesProvider { + if in == nil { + return nil + } + out := new(EnvoyProxyKubernetesProvider) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvoyProxyList) DeepCopyInto(out *EnvoyProxyList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]EnvoyProxy, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyProxyList. +func (in *EnvoyProxyList) DeepCopy() *EnvoyProxyList { + if in == nil { + return nil + } + out := new(EnvoyProxyList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *EnvoyProxyList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvoyProxyProvider) DeepCopyInto(out *EnvoyProxyProvider) { + *out = *in + if in.Kubernetes != nil { + in, out := &in.Kubernetes, &out.Kubernetes + *out = new(EnvoyProxyKubernetesProvider) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyProxyProvider. +func (in *EnvoyProxyProvider) DeepCopy() *EnvoyProxyProvider { + if in == nil { + return nil + } + out := new(EnvoyProxyProvider) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvoyProxySpec) DeepCopyInto(out *EnvoyProxySpec) { + *out = *in + if in.Provider != nil { + in, out := &in.Provider, &out.Provider + *out = new(EnvoyProxyProvider) + (*in).DeepCopyInto(*out) + } + in.Logging.DeepCopyInto(&out.Logging) + in.Telemetry.DeepCopyInto(&out.Telemetry) + if in.Bootstrap != nil { + in, out := &in.Bootstrap, &out.Bootstrap + *out = new(ProxyBootstrap) + (*in).DeepCopyInto(*out) + } + if in.Concurrency != nil { + in, out := &in.Concurrency, &out.Concurrency + *out = new(int32) + **out = **in + } + if in.MergeGateways != nil { + in, out := &in.MergeGateways, &out.MergeGateways + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyProxySpec. +func (in *EnvoyProxySpec) DeepCopy() *EnvoyProxySpec { + if in == nil { + return nil + } + out := new(EnvoyProxySpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvoyProxyStatus) DeepCopyInto(out *EnvoyProxyStatus) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyProxyStatus. +func (in *EnvoyProxyStatus) DeepCopy() *EnvoyProxyStatus { + if in == nil { + return nil + } + out := new(EnvoyProxyStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExtensionAPISettings) DeepCopyInto(out *ExtensionAPISettings) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionAPISettings. +func (in *ExtensionAPISettings) DeepCopy() *ExtensionAPISettings { + if in == nil { + return nil + } + out := new(ExtensionAPISettings) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExtensionHooks) DeepCopyInto(out *ExtensionHooks) { + *out = *in + if in.XDSTranslator != nil { + in, out := &in.XDSTranslator, &out.XDSTranslator + *out = new(XDSTranslatorHooks) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionHooks. +func (in *ExtensionHooks) DeepCopy() *ExtensionHooks { + if in == nil { + return nil + } + out := new(ExtensionHooks) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExtensionManager) DeepCopyInto(out *ExtensionManager) { + *out = *in + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make([]GroupVersionKind, len(*in)) + copy(*out, *in) + } + if in.Hooks != nil { + in, out := &in.Hooks, &out.Hooks + *out = new(ExtensionHooks) + (*in).DeepCopyInto(*out) + } + if in.Service != nil { + in, out := &in.Service, &out.Service + *out = new(ExtensionService) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionManager. +func (in *ExtensionManager) DeepCopy() *ExtensionManager { + if in == nil { + return nil + } + out := new(ExtensionManager) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExtensionService) DeepCopyInto(out *ExtensionService) { + *out = *in + if in.TLS != nil { + in, out := &in.TLS, &out.TLS + *out = new(ExtensionTLS) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionService. +func (in *ExtensionService) DeepCopy() *ExtensionService { + if in == nil { + return nil + } + out := new(ExtensionService) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExtensionTLS) DeepCopyInto(out *ExtensionTLS) { + *out = *in + in.CertificateRef.DeepCopyInto(&out.CertificateRef) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExtensionTLS. +func (in *ExtensionTLS) DeepCopy() *ExtensionTLS { + if in == nil { + return nil + } + out := new(ExtensionTLS) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *FileEnvoyProxyAccessLog) DeepCopyInto(out *FileEnvoyProxyAccessLog) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new FileEnvoyProxyAccessLog. +func (in *FileEnvoyProxyAccessLog) DeepCopy() *FileEnvoyProxyAccessLog { + if in == nil { + return nil + } + out := new(FileEnvoyProxyAccessLog) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Gateway) DeepCopyInto(out *Gateway) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Gateway. +func (in *Gateway) DeepCopy() *Gateway { + if in == nil { + return nil + } + out := new(Gateway) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalRateLimit) DeepCopyInto(out *GlobalRateLimit) { + *out = *in + if in.Rules != nil { + in, out := &in.Rules, &out.Rules + *out = make([]RateLimitRule, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRateLimit. +func (in *GlobalRateLimit) DeepCopy() *GlobalRateLimit { + if in == nil { + return nil + } + out := new(GlobalRateLimit) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GroupVersionKind) DeepCopyInto(out *GroupVersionKind) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GroupVersionKind. +func (in *GroupVersionKind) DeepCopy() *GroupVersionKind { + if in == nil { + return nil + } + out := new(GroupVersionKind) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *HeaderMatch) DeepCopyInto(out *HeaderMatch) { + *out = *in + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(HeaderMatchType) + **out = **in + } + if in.Value != nil { + in, out := &in.Value, &out.Value + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeaderMatch. +func (in *HeaderMatch) DeepCopy() *HeaderMatch { + if in == nil { + return nil + } + out := new(HeaderMatch) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *JSONPatchOperation) DeepCopyInto(out *JSONPatchOperation) { + *out = *in + in.Value.DeepCopyInto(&out.Value) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONPatchOperation. +func (in *JSONPatchOperation) DeepCopy() *JSONPatchOperation { + if in == nil { + return nil + } + out := new(JSONPatchOperation) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *JwtAuthenticationFilterProvider) DeepCopyInto(out *JwtAuthenticationFilterProvider) { + *out = *in + if in.Audiences != nil { + in, out := &in.Audiences, &out.Audiences + *out = make([]string, len(*in)) + copy(*out, *in) + } + out.RemoteJWKS = in.RemoteJWKS + if in.ClaimToHeaders != nil { + in, out := &in.ClaimToHeaders, &out.ClaimToHeaders + *out = make([]ClaimToHeader, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JwtAuthenticationFilterProvider. +func (in *JwtAuthenticationFilterProvider) DeepCopy() *JwtAuthenticationFilterProvider { + if in == nil { + return nil + } + out := new(JwtAuthenticationFilterProvider) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubernetesContainerSpec) DeepCopyInto(out *KubernetesContainerSpec) { + *out = *in + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]corev1.EnvVar, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = new(corev1.ResourceRequirements) + (*in).DeepCopyInto(*out) + } + if in.SecurityContext != nil { + in, out := &in.SecurityContext, &out.SecurityContext + *out = new(corev1.SecurityContext) + (*in).DeepCopyInto(*out) + } + if in.Image != nil { + in, out := &in.Image, &out.Image + *out = new(string) + **out = **in + } + if in.VolumeMounts != nil { + in, out := &in.VolumeMounts, &out.VolumeMounts + *out = make([]corev1.VolumeMount, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesContainerSpec. +func (in *KubernetesContainerSpec) DeepCopy() *KubernetesContainerSpec { + if in == nil { + return nil + } + out := new(KubernetesContainerSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubernetesDeployMode) DeepCopyInto(out *KubernetesDeployMode) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesDeployMode. +func (in *KubernetesDeployMode) DeepCopy() *KubernetesDeployMode { + if in == nil { + return nil + } + out := new(KubernetesDeployMode) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubernetesDeploymentSpec) DeepCopyInto(out *KubernetesDeploymentSpec) { + *out = *in + if in.Replicas != nil { + in, out := &in.Replicas, &out.Replicas + *out = new(int32) + **out = **in + } + if in.Strategy != nil { + in, out := &in.Strategy, &out.Strategy + *out = new(appsv1.DeploymentStrategy) + (*in).DeepCopyInto(*out) + } + if in.Pod != nil { + in, out := &in.Pod, &out.Pod + *out = new(KubernetesPodSpec) + (*in).DeepCopyInto(*out) + } + if in.Container != nil { + in, out := &in.Container, &out.Container + *out = new(KubernetesContainerSpec) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesDeploymentSpec. +func (in *KubernetesDeploymentSpec) DeepCopy() *KubernetesDeploymentSpec { + if in == nil { + return nil + } + out := new(KubernetesDeploymentSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubernetesPodSpec) DeepCopyInto(out *KubernetesPodSpec) { + *out = *in + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Labels != nil { + in, out := &in.Labels, &out.Labels + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.SecurityContext != nil { + in, out := &in.SecurityContext, &out.SecurityContext + *out = new(corev1.PodSecurityContext) + (*in).DeepCopyInto(*out) + } + if in.Affinity != nil { + in, out := &in.Affinity, &out.Affinity + *out = new(corev1.Affinity) + (*in).DeepCopyInto(*out) + } + if in.Tolerations != nil { + in, out := &in.Tolerations, &out.Tolerations + *out = make([]corev1.Toleration, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Volumes != nil { + in, out := &in.Volumes, &out.Volumes + *out = make([]corev1.Volume, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesPodSpec. +func (in *KubernetesPodSpec) DeepCopy() *KubernetesPodSpec { + if in == nil { + return nil + } + out := new(KubernetesPodSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubernetesServiceSpec) DeepCopyInto(out *KubernetesServiceSpec) { + *out = *in + if in.Annotations != nil { + in, out := &in.Annotations, &out.Annotations + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.Type != nil { + in, out := &in.Type, &out.Type + *out = new(ServiceType) + **out = **in + } + if in.LoadBalancerClass != nil { + in, out := &in.LoadBalancerClass, &out.LoadBalancerClass + *out = new(string) + **out = **in + } + if in.AllocateLoadBalancerNodePorts != nil { + in, out := &in.AllocateLoadBalancerNodePorts, &out.AllocateLoadBalancerNodePorts + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesServiceSpec. +func (in *KubernetesServiceSpec) DeepCopy() *KubernetesServiceSpec { + if in == nil { + return nil + } + out := new(KubernetesServiceSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *KubernetesWatchMode) DeepCopyInto(out *KubernetesWatchMode) { + *out = *in + if in.Namespaces != nil { + in, out := &in.Namespaces, &out.Namespaces + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.NamespaceSelectors != nil { + in, out := &in.NamespaceSelectors, &out.NamespaceSelectors + *out = make([]string, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new KubernetesWatchMode. +func (in *KubernetesWatchMode) DeepCopy() *KubernetesWatchMode { + if in == nil { + return nil + } + out := new(KubernetesWatchMode) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *LiteralCustomTag) DeepCopyInto(out *LiteralCustomTag) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LiteralCustomTag. +func (in *LiteralCustomTag) DeepCopy() *LiteralCustomTag { + if in == nil { + return nil + } + out := new(LiteralCustomTag) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Match) DeepCopyInto(out *Match) { + *out = *in } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyJSONPatchConfig. -func (in *EnvoyJSONPatchConfig) DeepCopy() *EnvoyJSONPatchConfig { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Match. +func (in *Match) DeepCopy() *Match { if in == nil { return nil } - out := new(EnvoyJSONPatchConfig) + out := new(Match) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyPatchPolicy) DeepCopyInto(out *EnvoyPatchPolicy) { +func (in *MetricSink) DeepCopyInto(out *MetricSink) { *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) + if in.OpenTelemetry != nil { + in, out := &in.OpenTelemetry, &out.OpenTelemetry + *out = new(OpenTelemetrySink) + **out = **in + } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyPatchPolicy. -func (in *EnvoyPatchPolicy) DeepCopy() *EnvoyPatchPolicy { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MetricSink. +func (in *MetricSink) DeepCopy() *MetricSink { if in == nil { return nil } - out := new(EnvoyPatchPolicy) + out := new(MetricSink) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EnvoyPatchPolicy) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *OpenTelemetryEnvoyProxyAccessLog) DeepCopyInto(out *OpenTelemetryEnvoyProxyAccessLog) { + *out = *in + if in.Resources != nil { + in, out := &in.Resources, &out.Resources + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } } - return nil +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetryEnvoyProxyAccessLog. +func (in *OpenTelemetryEnvoyProxyAccessLog) DeepCopy() *OpenTelemetryEnvoyProxyAccessLog { + if in == nil { + return nil + } + out := new(OpenTelemetryEnvoyProxyAccessLog) + in.DeepCopyInto(out) + return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyPatchPolicyList) DeepCopyInto(out *EnvoyPatchPolicyList) { +func (in *OpenTelemetrySink) DeepCopyInto(out *OpenTelemetrySink) { *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]EnvoyPatchPolicy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyPatchPolicyList. -func (in *EnvoyPatchPolicyList) DeepCopy() *EnvoyPatchPolicyList { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new OpenTelemetrySink. +func (in *OpenTelemetrySink) DeepCopy() *OpenTelemetrySink { if in == nil { return nil } - out := new(EnvoyPatchPolicyList) + out := new(OpenTelemetrySink) in.DeepCopyInto(out) return out } -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EnvoyPatchPolicyList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *PrometheusProvider) DeepCopyInto(out *PrometheusProvider) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusProvider. +func (in *PrometheusProvider) DeepCopy() *PrometheusProvider { + if in == nil { + return nil } - return nil + out := new(PrometheusProvider) + in.DeepCopyInto(out) + return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyPatchPolicySpec) DeepCopyInto(out *EnvoyPatchPolicySpec) { +func (in *ProxyAccessLog) DeepCopyInto(out *ProxyAccessLog) { *out = *in - if in.JSONPatches != nil { - in, out := &in.JSONPatches, &out.JSONPatches - *out = make([]EnvoyJSONPatchConfig, len(*in)) + if in.Settings != nil { + in, out := &in.Settings, &out.Settings + *out = make([]ProxyAccessLogSetting, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } - in.TargetRef.DeepCopyInto(&out.TargetRef) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyPatchPolicySpec. -func (in *EnvoyPatchPolicySpec) DeepCopy() *EnvoyPatchPolicySpec { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyAccessLog. +func (in *ProxyAccessLog) DeepCopy() *ProxyAccessLog { if in == nil { return nil } - out := new(EnvoyPatchPolicySpec) + out := new(ProxyAccessLog) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvoyPatchPolicyStatus) DeepCopyInto(out *EnvoyPatchPolicyStatus) { +func (in *ProxyAccessLogFormat) DeepCopyInto(out *ProxyAccessLogFormat) { *out = *in - if in.Conditions != nil { - in, out := &in.Conditions, &out.Conditions - *out = make([]v1.Condition, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) + if in.Text != nil { + in, out := &in.Text, &out.Text + *out = new(string) + **out = **in + } + if in.JSON != nil { + in, out := &in.JSON, &out.JSON + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val } } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyPatchPolicyStatus. -func (in *EnvoyPatchPolicyStatus) DeepCopy() *EnvoyPatchPolicyStatus { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyAccessLogFormat. +func (in *ProxyAccessLogFormat) DeepCopy() *ProxyAccessLogFormat { if in == nil { return nil } - out := new(EnvoyPatchPolicyStatus) + out := new(ProxyAccessLogFormat) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalRateLimit) DeepCopyInto(out *GlobalRateLimit) { +func (in *ProxyAccessLogSetting) DeepCopyInto(out *ProxyAccessLogSetting) { *out = *in - if in.Rules != nil { - in, out := &in.Rules, &out.Rules - *out = make([]RateLimitRule, len(*in)) + in.Format.DeepCopyInto(&out.Format) + if in.Sinks != nil { + in, out := &in.Sinks, &out.Sinks + *out = make([]ProxyAccessLogSink, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalRateLimit. -func (in *GlobalRateLimit) DeepCopy() *GlobalRateLimit { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyAccessLogSetting. +func (in *ProxyAccessLogSetting) DeepCopy() *ProxyAccessLogSetting { if in == nil { return nil } - out := new(GlobalRateLimit) + out := new(ProxyAccessLogSetting) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HeaderMatch) DeepCopyInto(out *HeaderMatch) { +func (in *ProxyAccessLogSink) DeepCopyInto(out *ProxyAccessLogSink) { + *out = *in + if in.File != nil { + in, out := &in.File, &out.File + *out = new(FileEnvoyProxyAccessLog) + **out = **in + } + if in.OpenTelemetry != nil { + in, out := &in.OpenTelemetry, &out.OpenTelemetry + *out = new(OpenTelemetryEnvoyProxyAccessLog) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyAccessLogSink. +func (in *ProxyAccessLogSink) DeepCopy() *ProxyAccessLogSink { + if in == nil { + return nil + } + out := new(ProxyAccessLogSink) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProxyBootstrap) DeepCopyInto(out *ProxyBootstrap) { *out = *in if in.Type != nil { in, out := &in.Type, &out.Type - *out = new(HeaderMatchType) + *out = new(BootstrapType) **out = **in } - if in.Value != nil { - in, out := &in.Value, &out.Value - *out = new(string) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyBootstrap. +func (in *ProxyBootstrap) DeepCopy() *ProxyBootstrap { + if in == nil { + return nil + } + out := new(ProxyBootstrap) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProxyLogging) DeepCopyInto(out *ProxyLogging) { + *out = *in + if in.Level != nil { + in, out := &in.Level, &out.Level + *out = make(map[LogComponent]LogLevel, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyLogging. +func (in *ProxyLogging) DeepCopy() *ProxyLogging { + if in == nil { + return nil + } + out := new(ProxyLogging) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProxyMetrics) DeepCopyInto(out *ProxyMetrics) { + *out = *in + if in.Prometheus != nil { + in, out := &in.Prometheus, &out.Prometheus + *out = new(PrometheusProvider) **out = **in } + if in.Sinks != nil { + in, out := &in.Sinks, &out.Sinks + *out = make([]MetricSink, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Matches != nil { + in, out := &in.Matches, &out.Matches + *out = make([]Match, len(*in)) + copy(*out, *in) + } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HeaderMatch. -func (in *HeaderMatch) DeepCopy() *HeaderMatch { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyMetrics. +func (in *ProxyMetrics) DeepCopy() *ProxyMetrics { if in == nil { return nil } - out := new(HeaderMatch) + out := new(ProxyMetrics) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JSONPatchOperation) DeepCopyInto(out *JSONPatchOperation) { +func (in *ProxyTelemetry) DeepCopyInto(out *ProxyTelemetry) { *out = *in - in.Value.DeepCopyInto(&out.Value) + if in.AccessLog != nil { + in, out := &in.AccessLog, &out.AccessLog + *out = new(ProxyAccessLog) + (*in).DeepCopyInto(*out) + } + if in.Tracing != nil { + in, out := &in.Tracing, &out.Tracing + *out = new(ProxyTracing) + (*in).DeepCopyInto(*out) + } + if in.Metrics != nil { + in, out := &in.Metrics, &out.Metrics + *out = new(ProxyMetrics) + (*in).DeepCopyInto(*out) + } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JSONPatchOperation. -func (in *JSONPatchOperation) DeepCopy() *JSONPatchOperation { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyTelemetry. +func (in *ProxyTelemetry) DeepCopy() *ProxyTelemetry { if in == nil { return nil } - out := new(JSONPatchOperation) + out := new(ProxyTelemetry) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JwtAuthenticationFilterProvider) DeepCopyInto(out *JwtAuthenticationFilterProvider) { +func (in *ProxyTracing) DeepCopyInto(out *ProxyTracing) { *out = *in - if in.Audiences != nil { - in, out := &in.Audiences, &out.Audiences - *out = make([]string, len(*in)) - copy(*out, *in) + if in.SamplingRate != nil { + in, out := &in.SamplingRate, &out.SamplingRate + *out = new(uint32) + **out = **in } - out.RemoteJWKS = in.RemoteJWKS - if in.ClaimToHeaders != nil { - in, out := &in.ClaimToHeaders, &out.ClaimToHeaders - *out = make([]ClaimToHeader, len(*in)) - copy(*out, *in) + if in.CustomTags != nil { + in, out := &in.CustomTags, &out.CustomTags + *out = make(map[string]CustomTag, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } } + out.Provider = in.Provider } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JwtAuthenticationFilterProvider. -func (in *JwtAuthenticationFilterProvider) DeepCopy() *JwtAuthenticationFilterProvider { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyTracing. +func (in *ProxyTracing) DeepCopy() *ProxyTracing { if in == nil { return nil } - out := new(JwtAuthenticationFilterProvider) + out := new(ProxyTracing) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RateLimit) DeepCopyInto(out *RateLimit) { + *out = *in + in.Backend.DeepCopyInto(&out.Backend) + if in.Timeout != nil { + in, out := &in.Timeout, &out.Timeout + *out = new(v1.Duration) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimit. +func (in *RateLimit) DeepCopy() *RateLimit { + if in == nil { + return nil + } + out := new(RateLimit) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RateLimitDatabaseBackend) DeepCopyInto(out *RateLimitDatabaseBackend) { + *out = *in + if in.Redis != nil { + in, out := &in.Redis, &out.Redis + *out = new(RateLimitRedisSettings) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimitDatabaseBackend. +func (in *RateLimitDatabaseBackend) DeepCopy() *RateLimitDatabaseBackend { + if in == nil { + return nil + } + out := new(RateLimitDatabaseBackend) in.DeepCopyInto(out) return out } @@ -494,6 +1709,26 @@ func (in *RateLimitFilterSpec) DeepCopy() *RateLimitFilterSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RateLimitRedisSettings) DeepCopyInto(out *RateLimitRedisSettings) { + *out = *in + if in.TLS != nil { + in, out := &in.TLS, &out.TLS + *out = new(RedisTLSSettings) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RateLimitRedisSettings. +func (in *RateLimitRedisSettings) DeepCopy() *RateLimitRedisSettings { + if in == nil { + return nil + } + out := new(RateLimitRedisSettings) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RateLimitRule) DeepCopyInto(out *RateLimitRule) { *out = *in @@ -559,6 +1794,26 @@ func (in *RateLimitValue) DeepCopy() *RateLimitValue { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RedisTLSSettings) DeepCopyInto(out *RedisTLSSettings) { + *out = *in + if in.CertificateRef != nil { + in, out := &in.CertificateRef, &out.CertificateRef + *out = new(v1beta1.SecretObjectReference) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RedisTLSSettings. +func (in *RedisTLSSettings) DeepCopy() *RedisTLSSettings { + if in == nil { + return nil + } + out := new(RedisTLSSettings) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RemoteJWKS) DeepCopyInto(out *RemoteJWKS) { *out = *in @@ -574,6 +1829,26 @@ func (in *RemoteJWKS) DeepCopy() *RemoteJWKS { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RequestHeaderCustomTag) DeepCopyInto(out *RequestHeaderCustomTag) { + *out = *in + if in.DefaultValue != nil { + in, out := &in.DefaultValue, &out.DefaultValue + *out = new(string) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RequestHeaderCustomTag. +func (in *RequestHeaderCustomTag) DeepCopy() *RequestHeaderCustomTag { + if in == nil { + return nil + } + out := new(RequestHeaderCustomTag) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SourceMatch) DeepCopyInto(out *SourceMatch) { *out = *in @@ -593,3 +1868,43 @@ func (in *SourceMatch) DeepCopy() *SourceMatch { in.DeepCopyInto(out) return out } + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *TracingProvider) DeepCopyInto(out *TracingProvider) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TracingProvider. +func (in *TracingProvider) DeepCopy() *TracingProvider { + if in == nil { + return nil + } + out := new(TracingProvider) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *XDSTranslatorHooks) DeepCopyInto(out *XDSTranslatorHooks) { + *out = *in + if in.Pre != nil { + in, out := &in.Pre, &out.Pre + *out = make([]XDSTranslatorHook, len(*in)) + copy(*out, *in) + } + if in.Post != nil { + in, out := &in.Post, &out.Post + *out = make([]XDSTranslatorHook, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new XDSTranslatorHooks. +func (in *XDSTranslatorHooks) DeepCopy() *XDSTranslatorHooks { + if in == nil { + return nil + } + out := new(XDSTranslatorHooks) + in.DeepCopyInto(out) + return out +} diff --git a/charts/gateway-helm/crds/generated/config.gateway.envoyproxy.io_envoyproxies.yaml b/charts/gateway-helm/crds/generated/gateway.envoyproxy.io_envoyproxies.yaml similarity index 99% rename from charts/gateway-helm/crds/generated/config.gateway.envoyproxy.io_envoyproxies.yaml rename to charts/gateway-helm/crds/generated/gateway.envoyproxy.io_envoyproxies.yaml index 9351f934044..d1553ef5f84 100644 --- a/charts/gateway-helm/crds/generated/config.gateway.envoyproxy.io_envoyproxies.yaml +++ b/charts/gateway-helm/crds/generated/gateway.envoyproxy.io_envoyproxies.yaml @@ -5,9 +5,9 @@ metadata: annotations: controller-gen.kubebuilder.io/version: v0.10.0 creationTimestamp: null - name: envoyproxies.config.gateway.envoyproxy.io + name: envoyproxies.gateway.envoyproxy.io spec: - group: config.gateway.envoyproxy.io + group: gateway.envoyproxy.io names: kind: EnvoyProxy listKind: EnvoyProxyList diff --git a/charts/gateway-helm/templates/_rbac.tpl b/charts/gateway-helm/templates/_rbac.tpl index a005ff5b75c..e71c103cc06 100644 --- a/charts/gateway-helm/templates/_rbac.tpl +++ b/charts/gateway-helm/templates/_rbac.tpl @@ -5,7 +5,6 @@ All namespaced resources for Envoy Gateway RBAC. - {{ include "eg.rbac.namespaced.basic" . | nindent 2 | trim }} - {{ include "eg.rbac.namespaced.apps" . | nindent 2 | trim }} - {{ include "eg.rbac.namespaced.discovery" . | nindent 2 | trim }} -- {{ include "eg.rbac.namespaced.config.envoyproxy" . | nindent 2 | trim }} - {{ include "eg.rbac.namespaced.gateway.envoyproxy" . | nindent 2 | trim }} - {{ include "eg.rbac.namespaced.gateway.envoyproxy.status" . | nindent 2 | trim }} - {{ include "eg.rbac.namespaced.gateway.networking" . | nindent 2 | trim }} @@ -60,23 +59,11 @@ verbs: - watch {{- end }} -{{- define "eg.rbac.namespaced.config.envoyproxy" -}} -apiGroups: -- config.gateway.envoyproxy.io -resources: -- envoyproxies -verbs: -- get -- list -- update -- watch -- patch -{{- end }} - {{- define "eg.rbac.namespaced.gateway.envoyproxy" -}} apiGroups: - gateway.envoyproxy.io resources: +- envoyproxies - authenticationfilters - envoypatchpolicies - clienttrafficpolicies diff --git a/charts/gateway-helm/templates/envoy-gateway-config.yaml b/charts/gateway-helm/templates/envoy-gateway-config.yaml index 518354f5900..b57b6729c2e 100644 --- a/charts/gateway-helm/templates/envoy-gateway-config.yaml +++ b/charts/gateway-helm/templates/envoy-gateway-config.yaml @@ -7,6 +7,6 @@ metadata: {{- include "eg.labels" . | nindent 4 }} data: envoy-gateway.yaml: | - apiVersion: config.gateway.envoyproxy.io/v1alpha1 + apiVersion: gateway.envoyproxy.io/v1alpha1 kind: EnvoyGateway {{- toYaml .Values.config.envoyGateway | nindent 4 }} diff --git a/docs/latest/api/config_types.md b/docs/latest/api/config_types.md deleted file mode 100644 index 5ef796047c6..00000000000 --- a/docs/latest/api/config_types.md +++ /dev/null @@ -1,1051 +0,0 @@ -# API Reference - -## Packages -- [config.gateway.envoyproxy.io/v1alpha1](#configgatewayenvoyproxyiov1alpha1) - - -## config.gateway.envoyproxy.io/v1alpha1 - -Package v1alpha1 contains API schema definitions for the config.gateway.envoyproxy.io -API group. - - -### Resource Types -- [EnvoyGateway](#envoygateway) -- [EnvoyProxy](#envoyproxy) - - - -## BootstrapType - -_Underlying type:_ `string` - -BootstrapType defines the types of bootstrap supported by Envoy Gateway. - -_Appears in:_ -- [ProxyBootstrap](#proxybootstrap) - - - -## CustomTag - - - - - -_Appears in:_ -- [ProxyTracing](#proxytracing) - -| Field | Description | -| --- | --- | -| `type` _[CustomTagType](#customtagtype)_ | Type defines the type of custom tag. | -| `literal` _[LiteralCustomTag](#literalcustomtag)_ | Literal adds hard-coded value to each span. It's required when the type is "Literal". | -| `environment` _[EnvironmentCustomTag](#environmentcustomtag)_ | Environment adds value from environment variable to each span. It's required when the type is "Environment". | -| `requestHeader` _[RequestHeaderCustomTag](#requestheadercustomtag)_ | RequestHeader adds value from request header to each span. It's required when the type is "RequestHeader". | - - -## CustomTagType - -_Underlying type:_ `string` - - - -_Appears in:_ -- [CustomTag](#customtag) - - - -## EnvironmentCustomTag - - - -EnvironmentCustomTag adds value from environment variable to each span. - -_Appears in:_ -- [CustomTag](#customtag) - -| Field | Description | -| --- | --- | -| `name` _string_ | Name defines the name of the environment variable which to extract the value from. | -| `defaultValue` _string_ | DefaultValue defines the default value to use if the environment variable is not set. | - - -## EnvoyGateway - - - -EnvoyGateway is the schema for the envoygateways API. - - - -| Field | Description | -| --- | --- | -| `apiVersion` _string_ | `config.gateway.envoyproxy.io/v1alpha1` -| `kind` _string_ | `EnvoyGateway` -| `gateway` _[Gateway](#gateway)_ | Gateway defines desired Gateway API specific configuration. If unset, default configuration parameters will apply. | -| `provider` _[EnvoyGatewayProvider](#envoygatewayprovider)_ | Provider defines the desired provider and provider-specific configuration. If unspecified, the Kubernetes provider is used with default configuration parameters. | -| `logging` _[EnvoyGatewayLogging](#envoygatewaylogging)_ | Logging defines logging parameters for Envoy Gateway. | -| `admin` _[EnvoyGatewayAdmin](#envoygatewayadmin)_ | Admin defines the desired admin related abilities. If unspecified, the Admin is used with default configuration parameters. | -| `rateLimit` _[RateLimit](#ratelimit)_ | RateLimit defines the configuration associated with the Rate Limit service deployed by Envoy Gateway required to implement the Global Rate limiting functionality. The specific rate limit service used here is the reference implementation in Envoy. For more details visit https://github.com/envoyproxy/ratelimit. This configuration is unneeded for "Local" rate limiting. | -| `extensionManager` _[ExtensionManager](#extensionmanager)_ | ExtensionManager defines an extension manager to register for the Envoy Gateway Control Plane. | -| `extensionApis` _[ExtensionAPISettings](#extensionapisettings)_ | ExtensionAPIs defines the settings related to specific Gateway API Extensions implemented by Envoy Gateway | - - -## EnvoyGatewayAdmin - - - -EnvoyGatewayAdmin defines the Envoy Gateway Admin configuration. - -_Appears in:_ -- [EnvoyGateway](#envoygateway) -- [EnvoyGatewaySpec](#envoygatewayspec) - -| Field | Description | -| --- | --- | -| `address` _[EnvoyGatewayAdminAddress](#envoygatewayadminaddress)_ | Address defines the address of Envoy Gateway Admin Server. | -| `debug` _boolean_ | Debug defines if enable the /debug endpoint of Envoy Gateway. | - - -## EnvoyGatewayAdminAddress - - - -EnvoyGatewayAdminAddress defines the Envoy Gateway Admin Address configuration. - -_Appears in:_ -- [EnvoyGatewayAdmin](#envoygatewayadmin) - -| Field | Description | -| --- | --- | -| `port` _integer_ | Port defines the port the admin server is exposed on. | -| `host` _string_ | Host defines the admin server hostname. | - - -## EnvoyGatewayCustomProvider - - - -EnvoyGatewayCustomProvider defines configuration for the Custom provider. - -_Appears in:_ -- [EnvoyGatewayProvider](#envoygatewayprovider) - -| Field | Description | -| --- | --- | -| `resource` _[EnvoyGatewayResourceProvider](#envoygatewayresourceprovider)_ | Resource defines the desired resource provider. This provider is used to specify the provider to be used to retrieve the resource configurations such as Gateway API resources | -| `infrastructure` _[EnvoyGatewayInfrastructureProvider](#envoygatewayinfrastructureprovider)_ | Infrastructure defines the desired infrastructure provider. This provider is used to specify the provider to be used to provide an environment to deploy the out resources like the Envoy Proxy data plane. | - - -## EnvoyGatewayFileResourceProvider - - - -EnvoyGatewayFileResourceProvider defines configuration for the File Resource provider. - -_Appears in:_ -- [EnvoyGatewayResourceProvider](#envoygatewayresourceprovider) - -| Field | Description | -| --- | --- | -| `paths` _string array_ | Paths are the paths to a directory or file containing the resource configuration. Recursive sub directories are not currently supported. | - - -## EnvoyGatewayHostInfrastructureProvider - - - -EnvoyGatewayHostInfrastructureProvider defines configuration for the Host Infrastructure provider. - -_Appears in:_ -- [EnvoyGatewayInfrastructureProvider](#envoygatewayinfrastructureprovider) - - - -## EnvoyGatewayInfrastructureProvider - - - -EnvoyGatewayInfrastructureProvider defines configuration for the Custom Infrastructure provider. - -_Appears in:_ -- [EnvoyGatewayCustomProvider](#envoygatewaycustomprovider) - -| Field | Description | -| --- | --- | -| `type` _[InfrastructureProviderType](#infrastructureprovidertype)_ | Type is the type of infrastructure providers to use. Supported types are "Host". | -| `host` _[EnvoyGatewayHostInfrastructureProvider](#envoygatewayhostinfrastructureprovider)_ | Host defines the configuration of the Host provider. Host provides runtime deployment of the data plane as a child process on the host environment. | - - -## EnvoyGatewayKubernetesProvider - - - -EnvoyGatewayKubernetesProvider defines configuration for the Kubernetes provider. - -_Appears in:_ -- [EnvoyGatewayProvider](#envoygatewayprovider) - -| Field | Description | -| --- | --- | -| `rateLimitDeployment` _[KubernetesDeploymentSpec](#kubernetesdeploymentspec)_ | RateLimitDeployment defines the desired state of the Envoy ratelimit deployment resource. If unspecified, default settings for the manged Envoy ratelimit deployment resource are applied. | -| `watch` _[KubernetesWatchMode](#kuberneteswatchmode)_ | Watch holds configuration of which input resources should be watched and reconciled. | -| `deploy` _[KubernetesDeployMode](#kubernetesdeploymode)_ | Deploy holds configuration of how output managed resources such as the Envoy Proxy data plane should be deployed | -| `overwrite_control_plane_certs` _boolean_ | OverwriteControlPlaneCerts updates the secrets containing the control plane certs, when set. | - - -## EnvoyGatewayLogComponent - -_Underlying type:_ `string` - -EnvoyGatewayLogComponent defines a component that supports a configured logging level. - -_Appears in:_ -- [EnvoyGatewayLogging](#envoygatewaylogging) - - - -## EnvoyGatewayLogging - - - -EnvoyGatewayLogging defines logging for Envoy Gateway. - -_Appears in:_ -- [EnvoyGateway](#envoygateway) -- [EnvoyGatewaySpec](#envoygatewayspec) - -| Field | Description | -| --- | --- | -| `level` _object (keys:[EnvoyGatewayLogComponent](#envoygatewaylogcomponent), values:[LogLevel](#loglevel))_ | Level is the logging level. If unspecified, defaults to "info". EnvoyGatewayLogComponent options: default/provider/gateway-api/xds-translator/xds-server/infrastructure/global-ratelimit. LogLevel options: debug/info/error/warn. | - - -## EnvoyGatewayProvider - - - -EnvoyGatewayProvider defines the desired configuration of a provider. - -_Appears in:_ -- [EnvoyGateway](#envoygateway) -- [EnvoyGatewaySpec](#envoygatewayspec) - -| Field | Description | -| --- | --- | -| `type` _[ProviderType](#providertype)_ | Type is the type of provider to use. Supported types are "Kubernetes". | -| `kubernetes` _[EnvoyGatewayKubernetesProvider](#envoygatewaykubernetesprovider)_ | Kubernetes defines the configuration of the Kubernetes provider. Kubernetes provides runtime configuration via the Kubernetes API. | -| `custom` _[EnvoyGatewayCustomProvider](#envoygatewaycustomprovider)_ | Custom defines the configuration for the Custom provider. This provider allows you to define a specific resource provider and a infrastructure provider. | - - -## EnvoyGatewayResourceProvider - - - -EnvoyGatewayResourceProvider defines configuration for the Custom Resource provider. - -_Appears in:_ -- [EnvoyGatewayCustomProvider](#envoygatewaycustomprovider) - -| Field | Description | -| --- | --- | -| `type` _[ResourceProviderType](#resourceprovidertype)_ | Type is the type of resource provider to use. Supported types are "File". | -| `file` _[EnvoyGatewayFileResourceProvider](#envoygatewayfileresourceprovider)_ | File defines the configuration of the File provider. File provides runtime configuration defined by one or more files. | - - -## EnvoyGatewaySpec - - - -EnvoyGatewaySpec defines the desired state of Envoy Gateway. - -_Appears in:_ -- [EnvoyGateway](#envoygateway) - -| Field | Description | -| --- | --- | -| `gateway` _[Gateway](#gateway)_ | Gateway defines desired Gateway API specific configuration. If unset, default configuration parameters will apply. | -| `provider` _[EnvoyGatewayProvider](#envoygatewayprovider)_ | Provider defines the desired provider and provider-specific configuration. If unspecified, the Kubernetes provider is used with default configuration parameters. | -| `logging` _[EnvoyGatewayLogging](#envoygatewaylogging)_ | Logging defines logging parameters for Envoy Gateway. | -| `admin` _[EnvoyGatewayAdmin](#envoygatewayadmin)_ | Admin defines the desired admin related abilities. If unspecified, the Admin is used with default configuration parameters. | -| `rateLimit` _[RateLimit](#ratelimit)_ | RateLimit defines the configuration associated with the Rate Limit service deployed by Envoy Gateway required to implement the Global Rate limiting functionality. The specific rate limit service used here is the reference implementation in Envoy. For more details visit https://github.com/envoyproxy/ratelimit. This configuration is unneeded for "Local" rate limiting. | -| `extensionManager` _[ExtensionManager](#extensionmanager)_ | ExtensionManager defines an extension manager to register for the Envoy Gateway Control Plane. | -| `extensionApis` _[ExtensionAPISettings](#extensionapisettings)_ | ExtensionAPIs defines the settings related to specific Gateway API Extensions implemented by Envoy Gateway | - - -## EnvoyProxy - - - -EnvoyProxy is the schema for the envoyproxies API. - - - -| Field | Description | -| --- | --- | -| `apiVersion` _string_ | `config.gateway.envoyproxy.io/v1alpha1` -| `kind` _string_ | `EnvoyProxy` -| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | -| `spec` _[EnvoyProxySpec](#envoyproxyspec)_ | EnvoyProxySpec defines the desired state of EnvoyProxy. | - - -## EnvoyProxyKubernetesProvider - - - -EnvoyProxyKubernetesProvider defines configuration for the Kubernetes resource provider. - -_Appears in:_ -- [EnvoyProxyProvider](#envoyproxyprovider) - -| Field | Description | -| --- | --- | -| `envoyDeployment` _[KubernetesDeploymentSpec](#kubernetesdeploymentspec)_ | EnvoyDeployment defines the desired state of the Envoy deployment resource. If unspecified, default settings for the manged Envoy deployment resource are applied. | -| `envoyService` _[KubernetesServiceSpec](#kubernetesservicespec)_ | EnvoyService defines the desired state of the Envoy service resource. If unspecified, default settings for the manged Envoy service resource are applied. | - - -## EnvoyProxyProvider - - - -EnvoyProxyProvider defines the desired state of a resource provider. - -_Appears in:_ -- [EnvoyProxySpec](#envoyproxyspec) - -| Field | Description | -| --- | --- | -| `type` _[ProviderType](#providertype)_ | Type is the type of resource provider to use. A resource provider provides infrastructure resources for running the data plane, e.g. Envoy proxy, and optional auxiliary control planes. Supported types are "Kubernetes". | -| `kubernetes` _[EnvoyProxyKubernetesProvider](#envoyproxykubernetesprovider)_ | Kubernetes defines the desired state of the Kubernetes resource provider. Kubernetes provides infrastructure resources for running the data plane, e.g. Envoy proxy. If unspecified and type is "Kubernetes", default settings for managed Kubernetes resources are applied. | - - -## EnvoyProxySpec - - - -EnvoyProxySpec defines the desired state of EnvoyProxy. - -_Appears in:_ -- [EnvoyProxy](#envoyproxy) - -| Field | Description | -| --- | --- | -| `provider` _[EnvoyProxyProvider](#envoyproxyprovider)_ | Provider defines the desired resource provider and provider-specific configuration. If unspecified, the "Kubernetes" resource provider is used with default configuration parameters. | -| `logging` _[ProxyLogging](#proxylogging)_ | Logging defines logging parameters for managed proxies. | -| `telemetry` _[ProxyTelemetry](#proxytelemetry)_ | Telemetry defines telemetry parameters for managed proxies. | -| `bootstrap` _[ProxyBootstrap](#proxybootstrap)_ | Bootstrap defines the Envoy Bootstrap as a YAML string. Visit https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/bootstrap/v3/bootstrap.proto#envoy-v3-api-msg-config-bootstrap-v3-bootstrap to learn more about the syntax. If set, this is the Bootstrap configuration used for the managed Envoy Proxy fleet instead of the default Bootstrap configuration set by Envoy Gateway. Some fields within the Bootstrap that are required to communicate with the xDS Server (Envoy Gateway) and receive xDS resources from it are not configurable and will result in the `EnvoyProxy` resource being rejected. Backward compatibility across minor versions is not guaranteed. We strongly recommend using `egctl x translate` to generate a `EnvoyProxy` resource with the `Bootstrap` field set to the default Bootstrap configuration used. You can edit this configuration, and rerun `egctl x translate` to ensure there are no validation errors. | -| `concurrency` _integer_ | Concurrency defines the number of worker threads to run. If unset, it defaults to the number of cpuset threads on the platform. | -| `mergeGateways` _boolean_ | MergeGateways defines if Gateway resources should be merged onto the same Envoy Proxy Infrastructure. Setting this field to true would merge all Gateway Listeners under the parent Gateway Class. This means that the port, protocol and hostname tuple must be unique for every listener. If a duplicate listener is detected, the newer listener (based on timestamp) will be rejected and its status will be updated with a "Accepted=False" condition. | - - - - -## ExtensionAPISettings - - - -ExtensionAPISettings defines the settings specific to Gateway API Extensions. - -_Appears in:_ -- [EnvoyGateway](#envoygateway) -- [EnvoyGatewaySpec](#envoygatewayspec) - -| Field | Description | -| --- | --- | -| `enableEnvoyPatchPolicy` _boolean_ | EnableEnvoyPatchPolicy enables Envoy Gateway to reconcile and implement the EnvoyPatchPolicy resources. | - - -## ExtensionHooks - - - -ExtensionHooks defines extension hooks across all supported runners - -_Appears in:_ -- [ExtensionManager](#extensionmanager) - -| Field | Description | -| --- | --- | -| `xdsTranslator` _[XDSTranslatorHooks](#xdstranslatorhooks)_ | XDSTranslator defines all the supported extension hooks for the xds-translator runner | - - -## ExtensionManager - - - -ExtensionManager defines the configuration for registering an extension manager to the Envoy Gateway control plane. - -_Appears in:_ -- [EnvoyGateway](#envoygateway) -- [EnvoyGatewaySpec](#envoygatewayspec) - -| Field | Description | -| --- | --- | -| `resources` _[GroupVersionKind](#groupversionkind) array_ | Resources defines the set of K8s resources the extension will handle. | -| `hooks` _[ExtensionHooks](#extensionhooks)_ | Hooks defines the set of hooks the extension supports | -| `service` _[ExtensionService](#extensionservice)_ | Service defines the configuration of the extension service that the Envoy Gateway Control Plane will call through extension hooks. | - - -## ExtensionService - - - -ExtensionService defines the configuration for connecting to a registered extension service. - -_Appears in:_ -- [ExtensionManager](#extensionmanager) - -| Field | Description | -| --- | --- | -| `host` _string_ | Host define the extension service hostname. | -| `port` _integer_ | Port defines the port the extension service is exposed on. | -| `tls` _[ExtensionTLS](#extensiontls)_ | TLS defines TLS configuration for communication between Envoy Gateway and the extension service. | - - -## ExtensionTLS - - - -ExtensionTLS defines the TLS configuration when connecting to an extension service - -_Appears in:_ -- [ExtensionService](#extensionservice) - -| Field | Description | -| --- | --- | -| `certificateRef` _[SecretObjectReference](https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1beta1.SecretObjectReference)_ | CertificateRef contains a references to objects (Kubernetes objects or otherwise) that contains a TLS certificate and private keys. These certificates are used to establish a TLS handshake to the extension server. - CertificateRef can only reference a Kubernetes Secret at this time. | - - -## FileEnvoyProxyAccessLog - - - - - -_Appears in:_ -- [ProxyAccessLogSink](#proxyaccesslogsink) - -| Field | Description | -| --- | --- | -| `path` _string_ | Path defines the file path used to expose envoy access log(e.g. /dev/stdout). | - - -## Gateway - - - -Gateway defines the desired Gateway API configuration of Envoy Gateway. - -_Appears in:_ -- [EnvoyGateway](#envoygateway) -- [EnvoyGatewaySpec](#envoygatewayspec) - -| Field | Description | -| --- | --- | -| `controllerName` _string_ | ControllerName defines the name of the Gateway API controller. If unspecified, defaults to "gateway.envoyproxy.io/gatewayclass-controller". See the following for additional details: https://gateway-api.sigs.k8s.io/v1alpha2/references/spec/#gateway.networking.k8s.io/v1alpha2.GatewayClass | - - -## GroupVersionKind - - - -GroupVersionKind unambiguously identifies a Kind. It can be converted to k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind - -_Appears in:_ -- [ExtensionManager](#extensionmanager) - -| Field | Description | -| --- | --- | -| `group` _string_ | | -| `version` _string_ | | -| `kind` _string_ | | - - -## InfrastructureProviderType - -_Underlying type:_ `string` - -InfrastructureProviderType defines the types of custom infrastructure providers supported by Envoy Gateway. - -_Appears in:_ -- [EnvoyGatewayInfrastructureProvider](#envoygatewayinfrastructureprovider) - - - -## KubernetesContainerSpec - - - -KubernetesContainerSpec defines the desired state of the Kubernetes container resource. - -_Appears in:_ -- [KubernetesDeploymentSpec](#kubernetesdeploymentspec) - -| Field | Description | -| --- | --- | -| `env` _[EnvVar](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#envvar-v1-core) array_ | List of environment variables to set in the container. | -| `resources` _[ResourceRequirements](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#resourcerequirements-v1-core)_ | Resources required by this container. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ | -| `securityContext` _[SecurityContext](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#securitycontext-v1-core)_ | SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ | -| `image` _string_ | Image specifies the EnvoyProxy container image to be used, instead of the default image. | -| `volumeMounts` _[VolumeMount](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#volumemount-v1-core) array_ | VolumeMounts are volumes to mount into the container's filesystem. Cannot be updated. | - - -## KubernetesDeployMode - - - -KubernetesDeployMode holds configuration for how to deploy managed resources such as the Envoy Proxy data plane fleet. - -_Appears in:_ -- [EnvoyGatewayKubernetesProvider](#envoygatewaykubernetesprovider) - - - -## KubernetesDeploymentSpec - - - -KubernetesDeploymentSpec defines the desired state of the Kubernetes deployment resource. - -_Appears in:_ -- [EnvoyGatewayKubernetesProvider](#envoygatewaykubernetesprovider) -- [EnvoyProxyKubernetesProvider](#envoyproxykubernetesprovider) - -| Field | Description | -| --- | --- | -| `replicas` _integer_ | Replicas is the number of desired pods. Defaults to 1. | -| `strategy` _[DeploymentStrategy](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#deploymentstrategy-v1-apps)_ | The deployment strategy to use to replace existing pods with new ones. | -| `pod` _[KubernetesPodSpec](#kubernetespodspec)_ | Pod defines the desired annotations and securityContext of container. | -| `container` _[KubernetesContainerSpec](#kubernetescontainerspec)_ | Container defines the resources and securityContext of container. | - - -## KubernetesPodSpec - - - -KubernetesPodSpec defines the desired state of the Kubernetes pod resource. - -_Appears in:_ -- [KubernetesDeploymentSpec](#kubernetesdeploymentspec) - -| Field | Description | -| --- | --- | -| `annotations` _object (keys:string, values:string)_ | Annotations are the annotations that should be appended to the pods. By default, no pod annotations are appended. | -| `labels` _object (keys:string, values:string)_ | Labels are the additional labels that should be tagged to the pods. By default, no additional pod labels are tagged. | -| `securityContext` _[PodSecurityContext](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#podsecuritycontext-v1-core)_ | SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. | -| `affinity` _[Affinity](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#affinity-v1-core)_ | If specified, the pod's scheduling constraints. | -| `tolerations` _[Toleration](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#toleration-v1-core) array_ | If specified, the pod's tolerations. | -| `volumes` _[Volume](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#volume-v1-core) array_ | Volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes | - - -## KubernetesServiceSpec - - - -KubernetesServiceSpec defines the desired state of the Kubernetes service resource. - -_Appears in:_ -- [EnvoyProxyKubernetesProvider](#envoyproxykubernetesprovider) - -| Field | Description | -| --- | --- | -| `annotations` _object (keys:string, values:string)_ | Annotations that should be appended to the service. By default, no annotations are appended. | -| `type` _[ServiceType](#servicetype)_ | Type determines how the Service is exposed. Defaults to LoadBalancer. Valid options are ClusterIP, LoadBalancer and NodePort. "LoadBalancer" means a service will be exposed via an external load balancer (if the cloud provider supports it). "ClusterIP" means a service will only be accessible inside the cluster, via the cluster IP. "NodePort" means a service will be exposed on a static Port on all Nodes of the cluster. | -| `loadBalancerClass` _string_ | LoadBalancerClass, when specified, allows for choosing the LoadBalancer provider implementation if more than one are available or is otherwise expected to be specified | -| `allocateLoadBalancerNodePorts` _boolean_ | AllocateLoadBalancerNodePorts defines if NodePorts will be automatically allocated for services with type LoadBalancer. Default is "true". It may be set to "false" if the cluster load-balancer does not rely on NodePorts. If the caller requests specific NodePorts (by specifying a value), those requests will be respected, regardless of this field. This field may only be set for services with type LoadBalancer and will be cleared if the type is changed to any other type. | - - -## KubernetesWatchMode - - - -KubernetesWatchMode holds the configuration for which input resources to watch and reconcile. - -_Appears in:_ -- [EnvoyGatewayKubernetesProvider](#envoygatewaykubernetesprovider) - -| Field | Description | -| --- | --- | -| `Type` _[KubernetesWatchModeType](#kuberneteswatchmodetype)_ | Type indicates what watch mode to use. KubernetesWatchModeTypeNamespaces and KubernetesWatchModeTypeNamespaceSelectors are currently supported By default, when this field is unset or empty, Envoy Gateway will watch for input namespaced resources from all namespaces. | -| `Namespaces` _string array_ | Namespaces holds the list of namespaces that Envoy Gateway will watch for namespaced scoped resources such as Gateway, HTTPRoute and Service. Note that Envoy Gateway will continue to reconcile relevant cluster scoped resources such as GatewayClass that it is linked to. Precisely one of Namespaces and NamespaceSelectors must be set | -| `namespaces` _string array_ | NamespaceSelectors holds a list of labels that namespaces have to have in order to be watched. Note this doesn't set the informer to watch the namespaces with the given labels. Informer still watches all namespaces. But the events for objects whois namespce have no given labels will be filtered out. Precisely one of Namespaces and NamespaceSelectors must be set | - - -## KubernetesWatchModeType - -_Underlying type:_ `string` - -KubernetesWatchModeType defines the type of KubernetesWatchMode - -_Appears in:_ -- [KubernetesWatchMode](#kuberneteswatchmode) - - - -## LiteralCustomTag - - - -LiteralCustomTag adds hard-coded value to each span. - -_Appears in:_ -- [CustomTag](#customtag) - -| Field | Description | -| --- | --- | -| `value` _string_ | Value defines the hard-coded value to add to each span. | - - -## LogComponent - -_Underlying type:_ `string` - -LogComponent defines a component that supports a configured logging level. - -_Appears in:_ -- [ProxyLogging](#proxylogging) - - - -## LogLevel - -_Underlying type:_ `string` - -LogLevel defines a log level for Envoy Gateway and EnvoyProxy system logs. This type is not implemented for EnvoyProxy until https://github.com/envoyproxy/gateway/issues/280 is fixed. - -_Appears in:_ -- [EnvoyGatewayLogging](#envoygatewaylogging) -- [ProxyLogging](#proxylogging) - - - -## Match - - - -Match defines the stats match configuration. - -_Appears in:_ -- [ProxyMetrics](#proxymetrics) - -| Field | Description | -| --- | --- | -| `type` _[MatcherType](#matchertype)_ | MatcherType defines the stats matcher type | -| `value` _string_ | | - - -## MatcherType - -_Underlying type:_ `string` - - - -_Appears in:_ -- [Match](#match) - - - -## MetricSink - - - - - -_Appears in:_ -- [ProxyMetrics](#proxymetrics) - -| Field | Description | -| --- | --- | -| `type` _[MetricSinkType](#metricsinktype)_ | Type defines the metric sink type. EG currently only supports OpenTelemetry. | -| `openTelemetry` _[OpenTelemetrySink](#opentelemetrysink)_ | OpenTelemetry defines the configuration for OpenTelemetry sink. It's required if the sink type is OpenTelemetry. | - - -## MetricSinkType - -_Underlying type:_ `string` - - - -_Appears in:_ -- [MetricSink](#metricsink) - - - -## OpenTelemetryEnvoyProxyAccessLog - - - -TODO: consider reuse ExtensionService? - -_Appears in:_ -- [ProxyAccessLogSink](#proxyaccesslogsink) - -| Field | Description | -| --- | --- | -| `host` _string_ | Host define the extension service hostname. | -| `port` _integer_ | Port defines the port the extension service is exposed on. | -| `resources` _object (keys:string, values:string)_ | Resources is a set of labels that describe the source of a log entry, including envoy node info. It's recommended to follow [semantic conventions](https://opentelemetry.io/docs/reference/specification/resource/semantic_conventions/). | - - -## OpenTelemetrySink - - - - - -_Appears in:_ -- [MetricSink](#metricsink) - -| Field | Description | -| --- | --- | -| `host` _string_ | Host define the service hostname. | -| `port` _integer_ | Port defines the port the service is exposed on. | - - -## PrometheusProvider - - - - - -_Appears in:_ -- [ProxyMetrics](#proxymetrics) - - - -## ProviderType - -_Underlying type:_ `string` - -ProviderType defines the types of providers supported by Envoy Gateway. - -_Appears in:_ -- [EnvoyGatewayProvider](#envoygatewayprovider) -- [EnvoyProxyProvider](#envoyproxyprovider) - - - -## ProxyAccessLog - - - - - -_Appears in:_ -- [ProxyTelemetry](#proxytelemetry) - -| Field | Description | -| --- | --- | -| `disable` _boolean_ | Disable disables access logging for managed proxies if set to true. | -| `settings` _[ProxyAccessLogSetting](#proxyaccesslogsetting) array_ | Settings defines accesslog settings for managed proxies. If unspecified, will send default format to stdout. | - - -## ProxyAccessLogFormat - - - -ProxyAccessLogFormat defines the format of accesslog. By default accesslogs are written to standard output. - -_Appears in:_ -- [ProxyAccessLogSetting](#proxyaccesslogsetting) - -| Field | Description | -| --- | --- | -| `type` _[ProxyAccessLogFormatType](#proxyaccesslogformattype)_ | Type defines the type of accesslog format. | -| `text` _string_ | Text defines the text accesslog format, following Envoy accesslog formatting, It's required when the format type is "Text". Envoy [command operators](https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#command-operators) may be used in the format. The [format string documentation](https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#config-access-log-format-strings) provides more information. | -| `json` _object (keys:string, values:string)_ | JSON is additional attributes that describe the specific event occurrence. Structured format for the envoy access logs. Envoy [command operators](https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#command-operators) can be used as values for fields within the Struct. It's required when the format type is "JSON". | - - -## ProxyAccessLogFormatType - -_Underlying type:_ `string` - - - -_Appears in:_ -- [ProxyAccessLogFormat](#proxyaccesslogformat) - - - -## ProxyAccessLogSetting - - - - - -_Appears in:_ -- [ProxyAccessLog](#proxyaccesslog) - -| Field | Description | -| --- | --- | -| `format` _[ProxyAccessLogFormat](#proxyaccesslogformat)_ | Format defines the format of accesslog. | -| `sinks` _[ProxyAccessLogSink](#proxyaccesslogsink) array_ | Sinks defines the sinks of accesslog. | - - -## ProxyAccessLogSink - - - - - -_Appears in:_ -- [ProxyAccessLogSetting](#proxyaccesslogsetting) - -| Field | Description | -| --- | --- | -| `type` _[ProxyAccessLogSinkType](#proxyaccesslogsinktype)_ | Type defines the type of accesslog sink. | -| `file` _[FileEnvoyProxyAccessLog](#fileenvoyproxyaccesslog)_ | File defines the file accesslog sink. | -| `openTelemetry` _[OpenTelemetryEnvoyProxyAccessLog](#opentelemetryenvoyproxyaccesslog)_ | OpenTelemetry defines the OpenTelemetry accesslog sink. | - - -## ProxyAccessLogSinkType - -_Underlying type:_ `string` - - - -_Appears in:_ -- [ProxyAccessLogSink](#proxyaccesslogsink) - - - -## ProxyBootstrap - - - -ProxyBootstrap defines Envoy Bootstrap configuration. - -_Appears in:_ -- [EnvoyProxySpec](#envoyproxyspec) - -| Field | Description | -| --- | --- | -| `type` _[BootstrapType](#bootstraptype)_ | Type is the type of the bootstrap configuration, it should be either Replace or Merge. If unspecified, it defaults to Replace. | -| `value` _string_ | Value is a YAML string of the bootstrap. | - - -## ProxyLogging - - - -ProxyLogging defines logging parameters for managed proxies. - -_Appears in:_ -- [EnvoyProxySpec](#envoyproxyspec) - -| Field | Description | -| --- | --- | -| `level` _object (keys:[LogComponent](#logcomponent), values:[LogLevel](#loglevel))_ | Level is a map of logging level per component, where the component is the key and the log level is the value. If unspecified, defaults to "default: warn". | - - -## ProxyMetrics - - - - - -_Appears in:_ -- [ProxyTelemetry](#proxytelemetry) - -| Field | Description | -| --- | --- | -| `prometheus` _[PrometheusProvider](#prometheusprovider)_ | Prometheus defines the configuration for Admin endpoint `/stats/prometheus`. | -| `sinks` _[MetricSink](#metricsink) array_ | Sinks defines the metric sinks where metrics are sent to. | -| `matches` _[Match](#match) array_ | Matches defines configuration for selecting specific metrics instead of generating all metrics stats that are enabled by default. This helps reduce CPU and memory overhead in Envoy, but eliminating some stats may after critical functionality. Here are the stats that we strongly recommend not disabling: `cluster_manager.warming_clusters`, `cluster..membership_total`,`cluster..membership_healthy`, `cluster..membership_degraded`,reference https://github.com/envoyproxy/envoy/issues/9856, https://github.com/envoyproxy/envoy/issues/14610 | -| `enableVirtualHostStats` _boolean_ | EnableVirtualHostStats enables envoy stat metrics for virtual hosts. | - - -## ProxyTelemetry - - - - - -_Appears in:_ -- [EnvoyProxySpec](#envoyproxyspec) - -| Field | Description | -| --- | --- | -| `accessLog` _[ProxyAccessLog](#proxyaccesslog)_ | AccessLogs defines accesslog parameters for managed proxies. If unspecified, will send default format to stdout. | -| `tracing` _[ProxyTracing](#proxytracing)_ | Tracing defines tracing configuration for managed proxies. If unspecified, will not send tracing data. | -| `metrics` _[ProxyMetrics](#proxymetrics)_ | Metrics defines metrics configuration for managed proxies. | - - -## ProxyTracing - - - - - -_Appears in:_ -- [ProxyTelemetry](#proxytelemetry) - -| Field | Description | -| --- | --- | -| `samplingRate` _integer_ | SamplingRate controls the rate at which traffic will be selected for tracing if no prior sampling decision has been made. Defaults to 100, valid values [0-100]. 100 indicates 100% sampling. | -| `customTags` _object (keys:string, values:[CustomTag](#customtag))_ | CustomTags defines the custom tags to add to each span. If provider is kubernetes, pod name and namespace are added by default. | -| `provider` _[TracingProvider](#tracingprovider)_ | Provider defines the tracing provider. Only OpenTelemetry is supported currently. | - - -## RateLimit - - - -RateLimit defines the configuration associated with the Rate Limit Service used for Global Rate Limiting. - -_Appears in:_ -- [EnvoyGateway](#envoygateway) -- [EnvoyGatewaySpec](#envoygatewayspec) - -| Field | Description | -| --- | --- | -| `backend` _[RateLimitDatabaseBackend](#ratelimitdatabasebackend)_ | Backend holds the configuration associated with the database backend used by the rate limit service to store state associated with global ratelimiting. | -| `timeout` _[Duration](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#duration-v1-meta)_ | Timeout specifies the timeout period for the proxy to access the ratelimit server If not set, timeout is 20ms. | -| `failClosed` _boolean_ | FailClosed is a switch used to control the flow of traffic when the response from the ratelimit server cannot be obtained. If FailClosed is false, let the traffic pass, otherwise, don't let the traffic pass and return 500. If not set, FailClosed is False. | - - -## RateLimitDatabaseBackend - - - -RateLimitDatabaseBackend defines the configuration associated with the database backend used by the rate limit service. - -_Appears in:_ -- [RateLimit](#ratelimit) - -| Field | Description | -| --- | --- | -| `type` _[RateLimitDatabaseBackendType](#ratelimitdatabasebackendtype)_ | Type is the type of database backend to use. Supported types are: * Redis: Connects to a Redis database. | -| `redis` _[RateLimitRedisSettings](#ratelimitredissettings)_ | Redis defines the settings needed to connect to a Redis database. | - - -## RateLimitDatabaseBackendType - -_Underlying type:_ `string` - -RateLimitDatabaseBackendType specifies the types of database backend to be used by the rate limit service. - -_Appears in:_ -- [RateLimitDatabaseBackend](#ratelimitdatabasebackend) - - - -## RateLimitRedisSettings - - - -RateLimitRedisSettings defines the configuration for connecting to redis database. - -_Appears in:_ -- [RateLimitDatabaseBackend](#ratelimitdatabasebackend) - -| Field | Description | -| --- | --- | -| `url` _string_ | URL of the Redis Database. | -| `tls` _[RedisTLSSettings](#redistlssettings)_ | TLS defines TLS configuration for connecting to redis database. | - - -## RedisTLSSettings - - - -RedisTLSSettings defines the TLS configuration for connecting to redis database. - -_Appears in:_ -- [RateLimitRedisSettings](#ratelimitredissettings) - -| Field | Description | -| --- | --- | -| `certificateRef` _[SecretObjectReference](https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1beta1.SecretObjectReference)_ | CertificateRef defines the client certificate reference for TLS connections. Currently only a Kubernetes Secret of type TLS is supported. | - - -## RequestHeaderCustomTag - - - -RequestHeaderCustomTag adds value from request header to each span. - -_Appears in:_ -- [CustomTag](#customtag) - -| Field | Description | -| --- | --- | -| `name` _string_ | Name defines the name of the request header which to extract the value from. | -| `defaultValue` _string_ | DefaultValue defines the default value to use if the request header is not set. | - - -## ResourceProviderType - -_Underlying type:_ `string` - -ResourceProviderType defines the types of custom resource providers supported by Envoy Gateway. - -_Appears in:_ -- [EnvoyGatewayResourceProvider](#envoygatewayresourceprovider) - - - -## ServiceType - -_Underlying type:_ `string` - -ServiceType string describes ingress methods for a service - -_Appears in:_ -- [KubernetesServiceSpec](#kubernetesservicespec) - - - -## TracingProvider - - - - - -_Appears in:_ -- [ProxyTracing](#proxytracing) - -| Field | Description | -| --- | --- | -| `type` _[TracingProviderType](#tracingprovidertype)_ | Type defines the tracing provider type. EG currently only supports OpenTelemetry. | -| `host` _string_ | Host define the provider service hostname. | -| `port` _integer_ | Port defines the port the provider service is exposed on. | - - -## TracingProviderType - -_Underlying type:_ `string` - - - -_Appears in:_ -- [TracingProvider](#tracingprovider) - - - -## XDSTranslatorHook - -_Underlying type:_ `string` - -XDSTranslatorHook defines the types of hooks that an Envoy Gateway extension may support for the xds-translator - -_Appears in:_ -- [XDSTranslatorHooks](#xdstranslatorhooks) - - - -## XDSTranslatorHooks - - - -XDSTranslatorHooks contains all the pre and post hooks for the xds-translator runner. - -_Appears in:_ -- [ExtensionHooks](#extensionhooks) - -| Field | Description | -| --- | --- | -| `pre` _[XDSTranslatorHook](#xdstranslatorhook) array_ | | -| `post` _[XDSTranslatorHook](#xdstranslatorhook) array_ | | - - diff --git a/docs/latest/api/extension_types.md b/docs/latest/api/extension_types.md index 6cc8d4269cd..c9f64e8af4a 100644 --- a/docs/latest/api/extension_types.md +++ b/docs/latest/api/extension_types.md @@ -6,15 +6,18 @@ ## gateway.envoyproxy.io/v1alpha1 -Package v1alpha1 contains API schema definitions for the gateway.envoyproxy.io API group. +Package v1alpha1 contains API schema definitions for the gateway.envoyproxy.io +API group. ### Resource Types - [AuthenticationFilter](#authenticationfilter) - [ClientTrafficPolicy](#clienttrafficpolicy) - [ClientTrafficPolicyList](#clienttrafficpolicylist) +- [EnvoyGateway](#envoygateway) - [EnvoyPatchPolicy](#envoypatchpolicy) - [EnvoyPatchPolicyList](#envoypatchpolicylist) +- [EnvoyProxy](#envoyproxy) - [RateLimitFilter](#ratelimitfilter) @@ -61,244 +64,1158 @@ _Appears in:_ +## BootstrapType + +_Underlying type:_ `string` + +BootstrapType defines the types of bootstrap supported by Envoy Gateway. + +_Appears in:_ +- [ProxyBootstrap](#proxybootstrap) + + + ## ClaimToHeader -ClaimToHeader defines a configuration to convert JWT claims into HTTP headers +ClaimToHeader defines a configuration to convert JWT claims into HTTP headers + +_Appears in:_ +- [JwtAuthenticationFilterProvider](#jwtauthenticationfilterprovider) + +| Field | Description | +| --- | --- | +| `header` _string_ | Header defines the name of the HTTP request header that the JWT Claim will be saved into. | +| `claim` _string_ | Claim is the JWT Claim that should be saved into the header : it can be a nested claim of type (eg. "claim.nested.key", "sub"). The nested claim name must use dot "." to separate the JSON name path. | + + +## ClientTrafficPolicy + + + +ClientTrafficPolicy allows the user to configure the behavior of the connection between the downstream client and Envoy Proxy listener. + +_Appears in:_ +- [ClientTrafficPolicyList](#clienttrafficpolicylist) + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `gateway.envoyproxy.io/v1alpha1` +| `kind` _string_ | `ClientTrafficPolicy` +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `spec` _[ClientTrafficPolicySpec](#clienttrafficpolicyspec)_ | Spec defines the desired state of ClientTrafficPolicy. | + + +## ClientTrafficPolicyList + + + +ClientTrafficPolicyList contains a list of ClientTrafficPolicy resources. + + + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `gateway.envoyproxy.io/v1alpha1` +| `kind` _string_ | `ClientTrafficPolicyList` +| `metadata` _[ListMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#listmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `items` _[ClientTrafficPolicy](#clienttrafficpolicy) array_ | | + + +## ClientTrafficPolicySpec + + + +ClientTrafficPolicySpec defines the desired state of ClientTrafficPolicy. + +_Appears in:_ +- [ClientTrafficPolicy](#clienttrafficpolicy) + +| Field | Description | +| --- | --- | +| `targetRef` _[PolicyTargetReferenceWithSectionName](#policytargetreferencewithsectionname)_ | TargetRef is the name of the Gateway resource this policy is being attached to. This Policy and the TargetRef MUST be in the same namespace for this Policy to have effect and be applied to the Gateway. TargetRef | + + + + +## CustomTag + + + + + +_Appears in:_ +- [ProxyTracing](#proxytracing) + +| Field | Description | +| --- | --- | +| `type` _[CustomTagType](#customtagtype)_ | Type defines the type of custom tag. | +| `literal` _[LiteralCustomTag](#literalcustomtag)_ | Literal adds hard-coded value to each span. It's required when the type is "Literal". | +| `environment` _[EnvironmentCustomTag](#environmentcustomtag)_ | Environment adds value from environment variable to each span. It's required when the type is "Environment". | +| `requestHeader` _[RequestHeaderCustomTag](#requestheadercustomtag)_ | RequestHeader adds value from request header to each span. It's required when the type is "RequestHeader". | + + +## CustomTagType + +_Underlying type:_ `string` + + + +_Appears in:_ +- [CustomTag](#customtag) + + + +## EnvironmentCustomTag + + + +EnvironmentCustomTag adds value from environment variable to each span. + +_Appears in:_ +- [CustomTag](#customtag) + +| Field | Description | +| --- | --- | +| `name` _string_ | Name defines the name of the environment variable which to extract the value from. | +| `defaultValue` _string_ | DefaultValue defines the default value to use if the environment variable is not set. | + + +## EnvoyGateway + + + +EnvoyGateway is the schema for the envoygateways API. + + + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `gateway.envoyproxy.io/v1alpha1` +| `kind` _string_ | `EnvoyGateway` +| `gateway` _[Gateway](#gateway)_ | Gateway defines desired Gateway API specific configuration. If unset, default configuration parameters will apply. | +| `provider` _[EnvoyGatewayProvider](#envoygatewayprovider)_ | Provider defines the desired provider and provider-specific configuration. If unspecified, the Kubernetes provider is used with default configuration parameters. | +| `logging` _[EnvoyGatewayLogging](#envoygatewaylogging)_ | Logging defines logging parameters for Envoy Gateway. | +| `admin` _[EnvoyGatewayAdmin](#envoygatewayadmin)_ | Admin defines the desired admin related abilities. If unspecified, the Admin is used with default configuration parameters. | +| `rateLimit` _[RateLimit](#ratelimit)_ | RateLimit defines the configuration associated with the Rate Limit service deployed by Envoy Gateway required to implement the Global Rate limiting functionality. The specific rate limit service used here is the reference implementation in Envoy. For more details visit https://github.com/envoyproxy/ratelimit. This configuration is unneeded for "Local" rate limiting. | +| `extensionManager` _[ExtensionManager](#extensionmanager)_ | ExtensionManager defines an extension manager to register for the Envoy Gateway Control Plane. | +| `extensionApis` _[ExtensionAPISettings](#extensionapisettings)_ | ExtensionAPIs defines the settings related to specific Gateway API Extensions implemented by Envoy Gateway | + + +## EnvoyGatewayAdmin + + + +EnvoyGatewayAdmin defines the Envoy Gateway Admin configuration. + +_Appears in:_ +- [EnvoyGateway](#envoygateway) +- [EnvoyGatewaySpec](#envoygatewayspec) + +| Field | Description | +| --- | --- | +| `address` _[EnvoyGatewayAdminAddress](#envoygatewayadminaddress)_ | Address defines the address of Envoy Gateway Admin Server. | +| `debug` _boolean_ | Debug defines if enable the /debug endpoint of Envoy Gateway. | + + +## EnvoyGatewayAdminAddress + + + +EnvoyGatewayAdminAddress defines the Envoy Gateway Admin Address configuration. + +_Appears in:_ +- [EnvoyGatewayAdmin](#envoygatewayadmin) + +| Field | Description | +| --- | --- | +| `port` _integer_ | Port defines the port the admin server is exposed on. | +| `host` _string_ | Host defines the admin server hostname. | + + +## EnvoyGatewayCustomProvider + + + +EnvoyGatewayCustomProvider defines configuration for the Custom provider. + +_Appears in:_ +- [EnvoyGatewayProvider](#envoygatewayprovider) + +| Field | Description | +| --- | --- | +| `resource` _[EnvoyGatewayResourceProvider](#envoygatewayresourceprovider)_ | Resource defines the desired resource provider. This provider is used to specify the provider to be used to retrieve the resource configurations such as Gateway API resources | +| `infrastructure` _[EnvoyGatewayInfrastructureProvider](#envoygatewayinfrastructureprovider)_ | Infrastructure defines the desired infrastructure provider. This provider is used to specify the provider to be used to provide an environment to deploy the out resources like the Envoy Proxy data plane. | + + +## EnvoyGatewayFileResourceProvider + + + +EnvoyGatewayFileResourceProvider defines configuration for the File Resource provider. + +_Appears in:_ +- [EnvoyGatewayResourceProvider](#envoygatewayresourceprovider) + +| Field | Description | +| --- | --- | +| `paths` _string array_ | Paths are the paths to a directory or file containing the resource configuration. Recursive sub directories are not currently supported. | + + +## EnvoyGatewayHostInfrastructureProvider + + + +EnvoyGatewayHostInfrastructureProvider defines configuration for the Host Infrastructure provider. + +_Appears in:_ +- [EnvoyGatewayInfrastructureProvider](#envoygatewayinfrastructureprovider) + + + +## EnvoyGatewayInfrastructureProvider + + + +EnvoyGatewayInfrastructureProvider defines configuration for the Custom Infrastructure provider. + +_Appears in:_ +- [EnvoyGatewayCustomProvider](#envoygatewaycustomprovider) + +| Field | Description | +| --- | --- | +| `type` _[InfrastructureProviderType](#infrastructureprovidertype)_ | Type is the type of infrastructure providers to use. Supported types are "Host". | +| `host` _[EnvoyGatewayHostInfrastructureProvider](#envoygatewayhostinfrastructureprovider)_ | Host defines the configuration of the Host provider. Host provides runtime deployment of the data plane as a child process on the host environment. | + + +## EnvoyGatewayKubernetesProvider + + + +EnvoyGatewayKubernetesProvider defines configuration for the Kubernetes provider. + +_Appears in:_ +- [EnvoyGatewayProvider](#envoygatewayprovider) + +| Field | Description | +| --- | --- | +| `rateLimitDeployment` _[KubernetesDeploymentSpec](#kubernetesdeploymentspec)_ | RateLimitDeployment defines the desired state of the Envoy ratelimit deployment resource. If unspecified, default settings for the manged Envoy ratelimit deployment resource are applied. | +| `watch` _[KubernetesWatchMode](#kuberneteswatchmode)_ | Watch holds configuration of which input resources should be watched and reconciled. | +| `deploy` _[KubernetesDeployMode](#kubernetesdeploymode)_ | Deploy holds configuration of how output managed resources such as the Envoy Proxy data plane should be deployed | +| `overwrite_control_plane_certs` _boolean_ | OverwriteControlPlaneCerts updates the secrets containing the control plane certs, when set. | + + +## EnvoyGatewayLogComponent + +_Underlying type:_ `string` + +EnvoyGatewayLogComponent defines a component that supports a configured logging level. + +_Appears in:_ +- [EnvoyGatewayLogging](#envoygatewaylogging) + + + +## EnvoyGatewayLogging + + + +EnvoyGatewayLogging defines logging for Envoy Gateway. + +_Appears in:_ +- [EnvoyGateway](#envoygateway) +- [EnvoyGatewaySpec](#envoygatewayspec) + +| Field | Description | +| --- | --- | +| `level` _object (keys:[EnvoyGatewayLogComponent](#envoygatewaylogcomponent), values:[LogLevel](#loglevel))_ | Level is the logging level. If unspecified, defaults to "info". EnvoyGatewayLogComponent options: default/provider/gateway-api/xds-translator/xds-server/infrastructure/global-ratelimit. LogLevel options: debug/info/error/warn. | + + +## EnvoyGatewayProvider + + + +EnvoyGatewayProvider defines the desired configuration of a provider. + +_Appears in:_ +- [EnvoyGateway](#envoygateway) +- [EnvoyGatewaySpec](#envoygatewayspec) + +| Field | Description | +| --- | --- | +| `type` _[ProviderType](#providertype)_ | Type is the type of provider to use. Supported types are "Kubernetes". | +| `kubernetes` _[EnvoyGatewayKubernetesProvider](#envoygatewaykubernetesprovider)_ | Kubernetes defines the configuration of the Kubernetes provider. Kubernetes provides runtime configuration via the Kubernetes API. | +| `custom` _[EnvoyGatewayCustomProvider](#envoygatewaycustomprovider)_ | Custom defines the configuration for the Custom provider. This provider allows you to define a specific resource provider and a infrastructure provider. | + + +## EnvoyGatewayResourceProvider + + + +EnvoyGatewayResourceProvider defines configuration for the Custom Resource provider. + +_Appears in:_ +- [EnvoyGatewayCustomProvider](#envoygatewaycustomprovider) + +| Field | Description | +| --- | --- | +| `type` _[ResourceProviderType](#resourceprovidertype)_ | Type is the type of resource provider to use. Supported types are "File". | +| `file` _[EnvoyGatewayFileResourceProvider](#envoygatewayfileresourceprovider)_ | File defines the configuration of the File provider. File provides runtime configuration defined by one or more files. | + + +## EnvoyGatewaySpec + + + +EnvoyGatewaySpec defines the desired state of Envoy Gateway. + +_Appears in:_ +- [EnvoyGateway](#envoygateway) + +| Field | Description | +| --- | --- | +| `gateway` _[Gateway](#gateway)_ | Gateway defines desired Gateway API specific configuration. If unset, default configuration parameters will apply. | +| `provider` _[EnvoyGatewayProvider](#envoygatewayprovider)_ | Provider defines the desired provider and provider-specific configuration. If unspecified, the Kubernetes provider is used with default configuration parameters. | +| `logging` _[EnvoyGatewayLogging](#envoygatewaylogging)_ | Logging defines logging parameters for Envoy Gateway. | +| `admin` _[EnvoyGatewayAdmin](#envoygatewayadmin)_ | Admin defines the desired admin related abilities. If unspecified, the Admin is used with default configuration parameters. | +| `rateLimit` _[RateLimit](#ratelimit)_ | RateLimit defines the configuration associated with the Rate Limit service deployed by Envoy Gateway required to implement the Global Rate limiting functionality. The specific rate limit service used here is the reference implementation in Envoy. For more details visit https://github.com/envoyproxy/ratelimit. This configuration is unneeded for "Local" rate limiting. | +| `extensionManager` _[ExtensionManager](#extensionmanager)_ | ExtensionManager defines an extension manager to register for the Envoy Gateway Control Plane. | +| `extensionApis` _[ExtensionAPISettings](#extensionapisettings)_ | ExtensionAPIs defines the settings related to specific Gateway API Extensions implemented by Envoy Gateway | + + +## EnvoyJSONPatchConfig + + + +EnvoyJSONPatchConfig defines the configuration for patching a Envoy xDS Resource using JSONPatch semantic + +_Appears in:_ +- [EnvoyPatchPolicySpec](#envoypatchpolicyspec) + +| Field | Description | +| --- | --- | +| `type` _[EnvoyResourceType](#envoyresourcetype)_ | Type is the typed URL of the Envoy xDS Resource | +| `name` _string_ | Name is the name of the resource | +| `operation` _[JSONPatchOperation](#jsonpatchoperation)_ | Patch defines the JSON Patch Operation | + + +## EnvoyPatchPolicy + + + +EnvoyPatchPolicy allows the user to modify the generated Envoy xDS resources by Envoy Gateway using this patch API + +_Appears in:_ +- [EnvoyPatchPolicyList](#envoypatchpolicylist) + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `gateway.envoyproxy.io/v1alpha1` +| `kind` _string_ | `EnvoyPatchPolicy` +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `spec` _[EnvoyPatchPolicySpec](#envoypatchpolicyspec)_ | Spec defines the desired state of EnvoyPatchPolicy. | + + +## EnvoyPatchPolicyList + + + +EnvoyPatchPolicyList contains a list of EnvoyPatchPolicy resources. + + + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `gateway.envoyproxy.io/v1alpha1` +| `kind` _string_ | `EnvoyPatchPolicyList` +| `metadata` _[ListMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#listmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `items` _[EnvoyPatchPolicy](#envoypatchpolicy) array_ | | + + +## EnvoyPatchPolicySpec + + + +EnvoyPatchPolicySpec defines the desired state of EnvoyPatchPolicy. + +_Appears in:_ +- [EnvoyPatchPolicy](#envoypatchpolicy) + +| Field | Description | +| --- | --- | +| `type` _[EnvoyPatchType](#envoypatchtype)_ | Type decides the type of patch. Valid EnvoyPatchType values are "JSONPatch". | +| `jsonPatches` _[EnvoyJSONPatchConfig](#envoyjsonpatchconfig) array_ | JSONPatch defines the JSONPatch configuration. | +| `targetRef` _[PolicyTargetReference](#policytargetreference)_ | TargetRef is the name of the Gateway API resource this policy is being attached to. Currently only attaching to Gateway is supported This Policy and the TargetRef MUST be in the same namespace for this Policy to have effect and be applied to the Gateway TargetRef | +| `priority` _integer_ | Priority of the EnvoyPatchPolicy. If multiple EnvoyPatchPolicies are applied to the same TargetRef, they will be applied in the ascending order of the priority i.e. int32.min has the highest priority and int32.max has the lowest priority. Defaults to 0. | + + + + +## EnvoyPatchType + +_Underlying type:_ `string` + +EnvoyPatchType specifies the types of Envoy patching mechanisms. + +_Appears in:_ +- [EnvoyPatchPolicySpec](#envoypatchpolicyspec) + + + +## EnvoyProxy + + + +EnvoyProxy is the schema for the envoyproxies API. + + + +| Field | Description | +| --- | --- | +| `apiVersion` _string_ | `gateway.envoyproxy.io/v1alpha1` +| `kind` _string_ | `EnvoyProxy` +| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | +| `spec` _[EnvoyProxySpec](#envoyproxyspec)_ | EnvoyProxySpec defines the desired state of EnvoyProxy. | + + +## EnvoyProxyKubernetesProvider + + + +EnvoyProxyKubernetesProvider defines configuration for the Kubernetes resource provider. + +_Appears in:_ +- [EnvoyProxyProvider](#envoyproxyprovider) + +| Field | Description | +| --- | --- | +| `envoyDeployment` _[KubernetesDeploymentSpec](#kubernetesdeploymentspec)_ | EnvoyDeployment defines the desired state of the Envoy deployment resource. If unspecified, default settings for the manged Envoy deployment resource are applied. | +| `envoyService` _[KubernetesServiceSpec](#kubernetesservicespec)_ | EnvoyService defines the desired state of the Envoy service resource. If unspecified, default settings for the manged Envoy service resource are applied. | + + +## EnvoyProxyProvider + + + +EnvoyProxyProvider defines the desired state of a resource provider. + +_Appears in:_ +- [EnvoyProxySpec](#envoyproxyspec) + +| Field | Description | +| --- | --- | +| `type` _[ProviderType](#providertype)_ | Type is the type of resource provider to use. A resource provider provides infrastructure resources for running the data plane, e.g. Envoy proxy, and optional auxiliary control planes. Supported types are "Kubernetes". | +| `kubernetes` _[EnvoyProxyKubernetesProvider](#envoyproxykubernetesprovider)_ | Kubernetes defines the desired state of the Kubernetes resource provider. Kubernetes provides infrastructure resources for running the data plane, e.g. Envoy proxy. If unspecified and type is "Kubernetes", default settings for managed Kubernetes resources are applied. | + + +## EnvoyProxySpec + + + +EnvoyProxySpec defines the desired state of EnvoyProxy. + +_Appears in:_ +- [EnvoyProxy](#envoyproxy) + +| Field | Description | +| --- | --- | +| `provider` _[EnvoyProxyProvider](#envoyproxyprovider)_ | Provider defines the desired resource provider and provider-specific configuration. If unspecified, the "Kubernetes" resource provider is used with default configuration parameters. | +| `logging` _[ProxyLogging](#proxylogging)_ | Logging defines logging parameters for managed proxies. | +| `telemetry` _[ProxyTelemetry](#proxytelemetry)_ | Telemetry defines telemetry parameters for managed proxies. | +| `bootstrap` _[ProxyBootstrap](#proxybootstrap)_ | Bootstrap defines the Envoy Bootstrap as a YAML string. Visit https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/bootstrap/v3/bootstrap.proto#envoy-v3-api-msg-config-bootstrap-v3-bootstrap to learn more about the syntax. If set, this is the Bootstrap configuration used for the managed Envoy Proxy fleet instead of the default Bootstrap configuration set by Envoy Gateway. Some fields within the Bootstrap that are required to communicate with the xDS Server (Envoy Gateway) and receive xDS resources from it are not configurable and will result in the `EnvoyProxy` resource being rejected. Backward compatibility across minor versions is not guaranteed. We strongly recommend using `egctl x translate` to generate a `EnvoyProxy` resource with the `Bootstrap` field set to the default Bootstrap configuration used. You can edit this configuration, and rerun `egctl x translate` to ensure there are no validation errors. | +| `concurrency` _integer_ | Concurrency defines the number of worker threads to run. If unset, it defaults to the number of cpuset threads on the platform. | +| `mergeGateways` _boolean_ | MergeGateways defines if Gateway resources should be merged onto the same Envoy Proxy Infrastructure. Setting this field to true would merge all Gateway Listeners under the parent Gateway Class. This means that the port, protocol and hostname tuple must be unique for every listener. If a duplicate listener is detected, the newer listener (based on timestamp) will be rejected and its status will be updated with a "Accepted=False" condition. | + + + + +## EnvoyResourceType + +_Underlying type:_ `string` + +EnvoyResourceType specifies the type URL of the Envoy resource. + +_Appears in:_ +- [EnvoyJSONPatchConfig](#envoyjsonpatchconfig) + + + +## ExtensionAPISettings + + + +ExtensionAPISettings defines the settings specific to Gateway API Extensions. + +_Appears in:_ +- [EnvoyGateway](#envoygateway) +- [EnvoyGatewaySpec](#envoygatewayspec) + +| Field | Description | +| --- | --- | +| `enableEnvoyPatchPolicy` _boolean_ | EnableEnvoyPatchPolicy enables Envoy Gateway to reconcile and implement the EnvoyPatchPolicy resources. | + + +## ExtensionHooks + + + +ExtensionHooks defines extension hooks across all supported runners + +_Appears in:_ +- [ExtensionManager](#extensionmanager) + +| Field | Description | +| --- | --- | +| `xdsTranslator` _[XDSTranslatorHooks](#xdstranslatorhooks)_ | XDSTranslator defines all the supported extension hooks for the xds-translator runner | + + +## ExtensionManager + + + +ExtensionManager defines the configuration for registering an extension manager to the Envoy Gateway control plane. + +_Appears in:_ +- [EnvoyGateway](#envoygateway) +- [EnvoyGatewaySpec](#envoygatewayspec) + +| Field | Description | +| --- | --- | +| `resources` _[GroupVersionKind](#groupversionkind) array_ | Resources defines the set of K8s resources the extension will handle. | +| `hooks` _[ExtensionHooks](#extensionhooks)_ | Hooks defines the set of hooks the extension supports | +| `service` _[ExtensionService](#extensionservice)_ | Service defines the configuration of the extension service that the Envoy Gateway Control Plane will call through extension hooks. | + + +## ExtensionService + + + +ExtensionService defines the configuration for connecting to a registered extension service. + +_Appears in:_ +- [ExtensionManager](#extensionmanager) + +| Field | Description | +| --- | --- | +| `host` _string_ | Host define the extension service hostname. | +| `port` _integer_ | Port defines the port the extension service is exposed on. | +| `tls` _[ExtensionTLS](#extensiontls)_ | TLS defines TLS configuration for communication between Envoy Gateway and the extension service. | + + +## ExtensionTLS + + + +ExtensionTLS defines the TLS configuration when connecting to an extension service + +_Appears in:_ +- [ExtensionService](#extensionservice) + +| Field | Description | +| --- | --- | +| `certificateRef` _[SecretObjectReference](https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1beta1.SecretObjectReference)_ | CertificateRef contains a references to objects (Kubernetes objects or otherwise) that contains a TLS certificate and private keys. These certificates are used to establish a TLS handshake to the extension server. + CertificateRef can only reference a Kubernetes Secret at this time. | + + +## FileEnvoyProxyAccessLog + + + + + +_Appears in:_ +- [ProxyAccessLogSink](#proxyaccesslogsink) + +| Field | Description | +| --- | --- | +| `path` _string_ | Path defines the file path used to expose envoy access log(e.g. /dev/stdout). | + + +## Gateway + + + +Gateway defines the desired Gateway API configuration of Envoy Gateway. + +_Appears in:_ +- [EnvoyGateway](#envoygateway) +- [EnvoyGatewaySpec](#envoygatewayspec) + +| Field | Description | +| --- | --- | +| `controllerName` _string_ | ControllerName defines the name of the Gateway API controller. If unspecified, defaults to "gateway.envoyproxy.io/gatewayclass-controller". See the following for additional details: https://gateway-api.sigs.k8s.io/v1alpha2/references/spec/#gateway.networking.k8s.io/v1alpha2.GatewayClass | + + +## GlobalRateLimit + + + +GlobalRateLimit defines global rate limit configuration. + +_Appears in:_ +- [RateLimitFilterSpec](#ratelimitfilterspec) + +| Field | Description | +| --- | --- | +| `rules` _[RateLimitRule](#ratelimitrule) array_ | Rules are a list of RateLimit selectors and limits. Each rule and its associated limit is applied in a mutually exclusive way i.e. if multiple rules get selected, each of their associated limits get applied, so a single traffic request might increase the rate limit counters for multiple rules if selected. | + + +## GroupVersionKind + + + +GroupVersionKind unambiguously identifies a Kind. It can be converted to k8s.io/apimachinery/pkg/runtime/schema.GroupVersionKind + +_Appears in:_ +- [ExtensionManager](#extensionmanager) + +| Field | Description | +| --- | --- | +| `group` _string_ | | +| `version` _string_ | | +| `kind` _string_ | | + + +## HeaderMatch + + + +HeaderMatch defines the match attributes within the HTTP Headers of the request. + +_Appears in:_ +- [RateLimitSelectCondition](#ratelimitselectcondition) + +| Field | Description | +| --- | --- | +| `type` _[HeaderMatchType](#headermatchtype)_ | Type specifies how to match against the value of the header. | +| `name` _string_ | Name of the HTTP header. | +| `value` _string_ | Value within the HTTP header. Due to the case-insensitivity of header names, "foo" and "Foo" are considered equivalent. Do not set this field when Type="Distinct", implying matching on any/all unique values within the header. | + + +## HeaderMatchType + +_Underlying type:_ `string` + +HeaderMatchType specifies the semantics of how HTTP header values should be compared. Valid HeaderMatchType values are "Exact", "RegularExpression", and "Distinct". + +_Appears in:_ +- [HeaderMatch](#headermatch) + + + +## InfrastructureProviderType + +_Underlying type:_ `string` + +InfrastructureProviderType defines the types of custom infrastructure providers supported by Envoy Gateway. + +_Appears in:_ +- [EnvoyGatewayInfrastructureProvider](#envoygatewayinfrastructureprovider) + + + +## JSONPatchOperation + + + +JSONPatchOperation defines the JSON Patch Operation as defined in https://datatracker.ietf.org/doc/html/rfc6902 + +_Appears in:_ +- [EnvoyJSONPatchConfig](#envoyjsonpatchconfig) + +| Field | Description | +| --- | --- | +| `op` _[JSONPatchOperationType](#jsonpatchoperationtype)_ | Op is the type of operation to perform | +| `path` _string_ | Path is the location of the target document/field where the operation will be performed Refer to https://datatracker.ietf.org/doc/html/rfc6901 for more details. | +| `value` _[JSON](#json)_ | Value is the new value of the path location. | + + +## JSONPatchOperationType + +_Underlying type:_ `string` + +JSONPatchOperationType specifies the JSON Patch operations that can be performed. + +_Appears in:_ +- [JSONPatchOperation](#jsonpatchoperation) + + + +## JwtAuthenticationFilterProvider + + + +JwtAuthenticationFilterProvider defines the JSON Web Token (JWT) authentication provider type and how JWTs should be verified: + +_Appears in:_ +- [AuthenticationFilterSpec](#authenticationfilterspec) + +| Field | Description | +| --- | --- | +| `name` _string_ | Name defines a unique name for the JWT provider. A name can have a variety of forms, including RFC1123 subdomains, RFC 1123 labels, or RFC 1035 labels. | +| `issuer` _string_ | Issuer is the principal that issued the JWT and takes the form of a URL or email address. For additional details, see https://tools.ietf.org/html/rfc7519#section-4.1.1 for URL format and https://rfc-editor.org/rfc/rfc5322.html for email format. If not provided, the JWT issuer is not checked. | +| `audiences` _string array_ | Audiences is a list of JWT audiences allowed access. For additional details, see https://tools.ietf.org/html/rfc7519#section-4.1.3. If not provided, JWT audiences are not checked. | +| `remoteJWKS` _[RemoteJWKS](#remotejwks)_ | RemoteJWKS defines how to fetch and cache JSON Web Key Sets (JWKS) from a remote HTTP/HTTPS endpoint. | +| `claimToHeaders` _[ClaimToHeader](#claimtoheader) array_ | ClaimToHeaders is a list of JWT claims that must be extracted into HTTP request headers For examples, following config: The claim must be of type; string, int, double, bool. Array type claims are not supported | + + +## KubernetesContainerSpec + + + +KubernetesContainerSpec defines the desired state of the Kubernetes container resource. + +_Appears in:_ +- [KubernetesDeploymentSpec](#kubernetesdeploymentspec) + +| Field | Description | +| --- | --- | +| `env` _[EnvVar](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#envvar-v1-core) array_ | List of environment variables to set in the container. | +| `resources` _[ResourceRequirements](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#resourcerequirements-v1-core)_ | Resources required by this container. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/ | +| `securityContext` _[SecurityContext](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#securitycontext-v1-core)_ | SecurityContext defines the security options the container should be run with. If set, the fields of SecurityContext override the equivalent fields of PodSecurityContext. More info: https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ | +| `image` _string_ | Image specifies the EnvoyProxy container image to be used, instead of the default image. | +| `volumeMounts` _[VolumeMount](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#volumemount-v1-core) array_ | VolumeMounts are volumes to mount into the container's filesystem. Cannot be updated. | + + +## KubernetesDeployMode + + + +KubernetesDeployMode holds configuration for how to deploy managed resources such as the Envoy Proxy data plane fleet. + +_Appears in:_ +- [EnvoyGatewayKubernetesProvider](#envoygatewaykubernetesprovider) + + + +## KubernetesDeploymentSpec + + + +KubernetesDeploymentSpec defines the desired state of the Kubernetes deployment resource. + +_Appears in:_ +- [EnvoyGatewayKubernetesProvider](#envoygatewaykubernetesprovider) +- [EnvoyProxyKubernetesProvider](#envoyproxykubernetesprovider) + +| Field | Description | +| --- | --- | +| `replicas` _integer_ | Replicas is the number of desired pods. Defaults to 1. | +| `strategy` _[DeploymentStrategy](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#deploymentstrategy-v1-apps)_ | The deployment strategy to use to replace existing pods with new ones. | +| `pod` _[KubernetesPodSpec](#kubernetespodspec)_ | Pod defines the desired annotations and securityContext of container. | +| `container` _[KubernetesContainerSpec](#kubernetescontainerspec)_ | Container defines the resources and securityContext of container. | + + +## KubernetesPodSpec + + + +KubernetesPodSpec defines the desired state of the Kubernetes pod resource. + +_Appears in:_ +- [KubernetesDeploymentSpec](#kubernetesdeploymentspec) + +| Field | Description | +| --- | --- | +| `annotations` _object (keys:string, values:string)_ | Annotations are the annotations that should be appended to the pods. By default, no pod annotations are appended. | +| `labels` _object (keys:string, values:string)_ | Labels are the additional labels that should be tagged to the pods. By default, no additional pod labels are tagged. | +| `securityContext` _[PodSecurityContext](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#podsecuritycontext-v1-core)_ | SecurityContext holds pod-level security attributes and common container settings. Optional: Defaults to empty. See type description for default values of each field. | +| `affinity` _[Affinity](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#affinity-v1-core)_ | If specified, the pod's scheduling constraints. | +| `tolerations` _[Toleration](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#toleration-v1-core) array_ | If specified, the pod's tolerations. | +| `volumes` _[Volume](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#volume-v1-core) array_ | Volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes | + + +## KubernetesServiceSpec + + + +KubernetesServiceSpec defines the desired state of the Kubernetes service resource. + +_Appears in:_ +- [EnvoyProxyKubernetesProvider](#envoyproxykubernetesprovider) + +| Field | Description | +| --- | --- | +| `annotations` _object (keys:string, values:string)_ | Annotations that should be appended to the service. By default, no annotations are appended. | +| `type` _[ServiceType](#servicetype)_ | Type determines how the Service is exposed. Defaults to LoadBalancer. Valid options are ClusterIP, LoadBalancer and NodePort. "LoadBalancer" means a service will be exposed via an external load balancer (if the cloud provider supports it). "ClusterIP" means a service will only be accessible inside the cluster, via the cluster IP. "NodePort" means a service will be exposed on a static Port on all Nodes of the cluster. | +| `loadBalancerClass` _string_ | LoadBalancerClass, when specified, allows for choosing the LoadBalancer provider implementation if more than one are available or is otherwise expected to be specified | +| `allocateLoadBalancerNodePorts` _boolean_ | AllocateLoadBalancerNodePorts defines if NodePorts will be automatically allocated for services with type LoadBalancer. Default is "true". It may be set to "false" if the cluster load-balancer does not rely on NodePorts. If the caller requests specific NodePorts (by specifying a value), those requests will be respected, regardless of this field. This field may only be set for services with type LoadBalancer and will be cleared if the type is changed to any other type. | + + +## KubernetesWatchMode + + + +KubernetesWatchMode holds the configuration for which input resources to watch and reconcile. + +_Appears in:_ +- [EnvoyGatewayKubernetesProvider](#envoygatewaykubernetesprovider) + +| Field | Description | +| --- | --- | +| `Type` _[KubernetesWatchModeType](#kuberneteswatchmodetype)_ | Type indicates what watch mode to use. KubernetesWatchModeTypeNamespaces and KubernetesWatchModeTypeNamespaceSelectors are currently supported By default, when this field is unset or empty, Envoy Gateway will watch for input namespaced resources from all namespaces. | +| `Namespaces` _string array_ | Namespaces holds the list of namespaces that Envoy Gateway will watch for namespaced scoped resources such as Gateway, HTTPRoute and Service. Note that Envoy Gateway will continue to reconcile relevant cluster scoped resources such as GatewayClass that it is linked to. Precisely one of Namespaces and NamespaceSelectors must be set | +| `namespaces` _string array_ | NamespaceSelectors holds a list of labels that namespaces have to have in order to be watched. Note this doesn't set the informer to watch the namespaces with the given labels. Informer still watches all namespaces. But the events for objects whois namespce have no given labels will be filtered out. Precisely one of Namespaces and NamespaceSelectors must be set | + + +## KubernetesWatchModeType + +_Underlying type:_ `string` + +KubernetesWatchModeType defines the type of KubernetesWatchMode + +_Appears in:_ +- [KubernetesWatchMode](#kuberneteswatchmode) + + + +## LiteralCustomTag + + + +LiteralCustomTag adds hard-coded value to each span. + +_Appears in:_ +- [CustomTag](#customtag) + +| Field | Description | +| --- | --- | +| `value` _string_ | Value defines the hard-coded value to add to each span. | + + +## LogComponent + +_Underlying type:_ `string` + +LogComponent defines a component that supports a configured logging level. + +_Appears in:_ +- [ProxyLogging](#proxylogging) + + + +## LogLevel + +_Underlying type:_ `string` + +LogLevel defines a log level for Envoy Gateway and EnvoyProxy system logs. This type is not implemented for EnvoyProxy until https://github.com/envoyproxy/gateway/issues/280 is fixed. _Appears in:_ -- [JwtAuthenticationFilterProvider](#jwtauthenticationfilterprovider) +- [EnvoyGatewayLogging](#envoygatewaylogging) +- [ProxyLogging](#proxylogging) + + + +## Match + + + +Match defines the stats match configuration. + +_Appears in:_ +- [ProxyMetrics](#proxymetrics) | Field | Description | | --- | --- | -| `header` _string_ | Header defines the name of the HTTP request header that the JWT Claim will be saved into. | -| `claim` _string_ | Claim is the JWT Claim that should be saved into the header : it can be a nested claim of type (eg. "claim.nested.key", "sub"). The nested claim name must use dot "." to separate the JSON name path. | +| `type` _[MatcherType](#matchertype)_ | MatcherType defines the stats matcher type | +| `value` _string_ | | -## ClientTrafficPolicy +## MatcherType +_Underlying type:_ `string` -ClientTrafficPolicy allows the user to configure the behavior of the connection between the downstream client and Envoy Proxy listener. _Appears in:_ -- [ClientTrafficPolicyList](#clienttrafficpolicylist) +- [Match](#match) + + + +## MetricSink + + + + + +_Appears in:_ +- [ProxyMetrics](#proxymetrics) | Field | Description | | --- | --- | -| `apiVersion` _string_ | `gateway.envoyproxy.io/v1alpha1` -| `kind` _string_ | `ClientTrafficPolicy` -| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | -| `spec` _[ClientTrafficPolicySpec](#clienttrafficpolicyspec)_ | Spec defines the desired state of ClientTrafficPolicy. | +| `type` _[MetricSinkType](#metricsinktype)_ | Type defines the metric sink type. EG currently only supports OpenTelemetry. | +| `openTelemetry` _[OpenTelemetrySink](#opentelemetrysink)_ | OpenTelemetry defines the configuration for OpenTelemetry sink. It's required if the sink type is OpenTelemetry. | -## ClientTrafficPolicyList +## MetricSinkType +_Underlying type:_ `string` -ClientTrafficPolicyList contains a list of ClientTrafficPolicy resources. +_Appears in:_ +- [MetricSink](#metricsink) + + + +## OpenTelemetryEnvoyProxyAccessLog + +TODO: consider reuse ExtensionService? + +_Appears in:_ +- [ProxyAccessLogSink](#proxyaccesslogsink) + | Field | Description | | --- | --- | -| `apiVersion` _string_ | `gateway.envoyproxy.io/v1alpha1` -| `kind` _string_ | `ClientTrafficPolicyList` -| `metadata` _[ListMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#listmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | -| `items` _[ClientTrafficPolicy](#clienttrafficpolicy) array_ | | +| `host` _string_ | Host define the extension service hostname. | +| `port` _integer_ | Port defines the port the extension service is exposed on. | +| `resources` _object (keys:string, values:string)_ | Resources is a set of labels that describe the source of a log entry, including envoy node info. It's recommended to follow [semantic conventions](https://opentelemetry.io/docs/reference/specification/resource/semantic_conventions/). | -## ClientTrafficPolicySpec +## OpenTelemetrySink + -ClientTrafficPolicySpec defines the desired state of ClientTrafficPolicy. _Appears in:_ -- [ClientTrafficPolicy](#clienttrafficpolicy) +- [MetricSink](#metricsink) | Field | Description | | --- | --- | -| `targetRef` _[PolicyTargetReferenceWithSectionName](#policytargetreferencewithsectionname)_ | TargetRef is the name of the Gateway resource this policy is being attached to. This Policy and the TargetRef MUST be in the same namespace for this Policy to have effect and be applied to the Gateway. TargetRef | +| `host` _string_ | Host define the service hostname. | +| `port` _integer_ | Port defines the port the service is exposed on. | +## PrometheusProvider -## EnvoyJSONPatchConfig -EnvoyJSONPatchConfig defines the configuration for patching a Envoy xDS Resource using JSONPatch semantic +_Appears in:_ +- [ProxyMetrics](#proxymetrics) + + + +## ProviderType + +_Underlying type:_ `string` + +ProviderType defines the types of providers supported by Envoy Gateway. _Appears in:_ -- [EnvoyPatchPolicySpec](#envoypatchpolicyspec) +- [EnvoyGatewayProvider](#envoygatewayprovider) +- [EnvoyProxyProvider](#envoyproxyprovider) + + + +## ProxyAccessLog + + + + + +_Appears in:_ +- [ProxyTelemetry](#proxytelemetry) | Field | Description | | --- | --- | -| `type` _[EnvoyResourceType](#envoyresourcetype)_ | Type is the typed URL of the Envoy xDS Resource | -| `name` _string_ | Name is the name of the resource | -| `operation` _[JSONPatchOperation](#jsonpatchoperation)_ | Patch defines the JSON Patch Operation | +| `disable` _boolean_ | Disable disables access logging for managed proxies if set to true. | +| `settings` _[ProxyAccessLogSetting](#proxyaccesslogsetting) array_ | Settings defines accesslog settings for managed proxies. If unspecified, will send default format to stdout. | -## EnvoyPatchPolicy +## ProxyAccessLogFormat -EnvoyPatchPolicy allows the user to modify the generated Envoy xDS resources by Envoy Gateway using this patch API +ProxyAccessLogFormat defines the format of accesslog. By default accesslogs are written to standard output. _Appears in:_ -- [EnvoyPatchPolicyList](#envoypatchpolicylist) +- [ProxyAccessLogSetting](#proxyaccesslogsetting) | Field | Description | | --- | --- | -| `apiVersion` _string_ | `gateway.envoyproxy.io/v1alpha1` -| `kind` _string_ | `EnvoyPatchPolicy` -| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | -| `spec` _[EnvoyPatchPolicySpec](#envoypatchpolicyspec)_ | Spec defines the desired state of EnvoyPatchPolicy. | +| `type` _[ProxyAccessLogFormatType](#proxyaccesslogformattype)_ | Type defines the type of accesslog format. | +| `text` _string_ | Text defines the text accesslog format, following Envoy accesslog formatting, It's required when the format type is "Text". Envoy [command operators](https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#command-operators) may be used in the format. The [format string documentation](https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#config-access-log-format-strings) provides more information. | +| `json` _object (keys:string, values:string)_ | JSON is additional attributes that describe the specific event occurrence. Structured format for the envoy access logs. Envoy [command operators](https://www.envoyproxy.io/docs/envoy/latest/configuration/observability/access_log/usage#command-operators) can be used as values for fields within the Struct. It's required when the format type is "JSON". | -## EnvoyPatchPolicyList +## ProxyAccessLogFormatType +_Underlying type:_ `string` -EnvoyPatchPolicyList contains a list of EnvoyPatchPolicy resources. +_Appears in:_ +- [ProxyAccessLogFormat](#proxyaccesslogformat) -| Field | Description | -| --- | --- | -| `apiVersion` _string_ | `gateway.envoyproxy.io/v1alpha1` -| `kind` _string_ | `EnvoyPatchPolicyList` -| `metadata` _[ListMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#listmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. | -| `items` _[EnvoyPatchPolicy](#envoypatchpolicy) array_ | | +## ProxyAccessLogSetting -## EnvoyPatchPolicySpec -EnvoyPatchPolicySpec defines the desired state of EnvoyPatchPolicy. _Appears in:_ -- [EnvoyPatchPolicy](#envoypatchpolicy) +- [ProxyAccessLog](#proxyaccesslog) | Field | Description | | --- | --- | -| `type` _[EnvoyPatchType](#envoypatchtype)_ | Type decides the type of patch. Valid EnvoyPatchType values are "JSONPatch". | -| `jsonPatches` _[EnvoyJSONPatchConfig](#envoyjsonpatchconfig) array_ | JSONPatch defines the JSONPatch configuration. | -| `targetRef` _[PolicyTargetReference](#policytargetreference)_ | TargetRef is the name of the Gateway API resource this policy is being attached to. Currently only attaching to Gateway is supported This Policy and the TargetRef MUST be in the same namespace for this Policy to have effect and be applied to the Gateway TargetRef | -| `priority` _integer_ | Priority of the EnvoyPatchPolicy. If multiple EnvoyPatchPolicies are applied to the same TargetRef, they will be applied in the ascending order of the priority i.e. int32.min has the highest priority and int32.max has the lowest priority. Defaults to 0. | +| `format` _[ProxyAccessLogFormat](#proxyaccesslogformat)_ | Format defines the format of accesslog. | +| `sinks` _[ProxyAccessLogSink](#proxyaccesslogsink) array_ | Sinks defines the sinks of accesslog. | +## ProxyAccessLogSink -## EnvoyPatchType -_Underlying type:_ `string` -EnvoyPatchType specifies the types of Envoy patching mechanisms. _Appears in:_ -- [EnvoyPatchPolicySpec](#envoypatchpolicyspec) +- [ProxyAccessLogSetting](#proxyaccesslogsetting) +| Field | Description | +| --- | --- | +| `type` _[ProxyAccessLogSinkType](#proxyaccesslogsinktype)_ | Type defines the type of accesslog sink. | +| `file` _[FileEnvoyProxyAccessLog](#fileenvoyproxyaccesslog)_ | File defines the file accesslog sink. | +| `openTelemetry` _[OpenTelemetryEnvoyProxyAccessLog](#opentelemetryenvoyproxyaccesslog)_ | OpenTelemetry defines the OpenTelemetry accesslog sink. | -## EnvoyResourceType +## ProxyAccessLogSinkType _Underlying type:_ `string` -EnvoyResourceType specifies the type URL of the Envoy resource. + _Appears in:_ -- [EnvoyJSONPatchConfig](#envoyjsonpatchconfig) +- [ProxyAccessLogSink](#proxyaccesslogsink) -## GlobalRateLimit +## ProxyBootstrap -GlobalRateLimit defines global rate limit configuration. +ProxyBootstrap defines Envoy Bootstrap configuration. _Appears in:_ -- [RateLimitFilterSpec](#ratelimitfilterspec) +- [EnvoyProxySpec](#envoyproxyspec) | Field | Description | | --- | --- | -| `rules` _[RateLimitRule](#ratelimitrule) array_ | Rules are a list of RateLimit selectors and limits. Each rule and its associated limit is applied in a mutually exclusive way i.e. if multiple rules get selected, each of their associated limits get applied, so a single traffic request might increase the rate limit counters for multiple rules if selected. | +| `type` _[BootstrapType](#bootstraptype)_ | Type is the type of the bootstrap configuration, it should be either Replace or Merge. If unspecified, it defaults to Replace. | +| `value` _string_ | Value is a YAML string of the bootstrap. | -## HeaderMatch +## ProxyLogging -HeaderMatch defines the match attributes within the HTTP Headers of the request. +ProxyLogging defines logging parameters for managed proxies. _Appears in:_ -- [RateLimitSelectCondition](#ratelimitselectcondition) +- [EnvoyProxySpec](#envoyproxyspec) | Field | Description | | --- | --- | -| `type` _[HeaderMatchType](#headermatchtype)_ | Type specifies how to match against the value of the header. | -| `name` _string_ | Name of the HTTP header. | -| `value` _string_ | Value within the HTTP header. Due to the case-insensitivity of header names, "foo" and "Foo" are considered equivalent. Do not set this field when Type="Distinct", implying matching on any/all unique values within the header. | +| `level` _object (keys:[LogComponent](#logcomponent), values:[LogLevel](#loglevel))_ | Level is a map of logging level per component, where the component is the key and the log level is the value. If unspecified, defaults to "default: warn". | + + +## ProxyMetrics -## HeaderMatchType -_Underlying type:_ `string` -HeaderMatchType specifies the semantics of how HTTP header values should be compared. Valid HeaderMatchType values are "Exact", "RegularExpression", and "Distinct". _Appears in:_ -- [HeaderMatch](#headermatch) +- [ProxyTelemetry](#proxytelemetry) +| Field | Description | +| --- | --- | +| `prometheus` _[PrometheusProvider](#prometheusprovider)_ | Prometheus defines the configuration for Admin endpoint `/stats/prometheus`. | +| `sinks` _[MetricSink](#metricsink) array_ | Sinks defines the metric sinks where metrics are sent to. | +| `matches` _[Match](#match) array_ | Matches defines configuration for selecting specific metrics instead of generating all metrics stats that are enabled by default. This helps reduce CPU and memory overhead in Envoy, but eliminating some stats may after critical functionality. Here are the stats that we strongly recommend not disabling: `cluster_manager.warming_clusters`, `cluster..membership_total`,`cluster..membership_healthy`, `cluster..membership_degraded`,reference https://github.com/envoyproxy/envoy/issues/9856, https://github.com/envoyproxy/envoy/issues/14610 | +| `enableVirtualHostStats` _boolean_ | EnableVirtualHostStats enables envoy stat metrics for virtual hosts. | -## JSONPatchOperation +## ProxyTelemetry + -JSONPatchOperation defines the JSON Patch Operation as defined in https://datatracker.ietf.org/doc/html/rfc6902 _Appears in:_ -- [EnvoyJSONPatchConfig](#envoyjsonpatchconfig) +- [EnvoyProxySpec](#envoyproxyspec) | Field | Description | | --- | --- | -| `op` _[JSONPatchOperationType](#jsonpatchoperationtype)_ | Op is the type of operation to perform | -| `path` _string_ | Path is the location of the target document/field where the operation will be performed Refer to https://datatracker.ietf.org/doc/html/rfc6901 for more details. | -| `value` _[JSON](#json)_ | Value is the new value of the path location. | +| `accessLog` _[ProxyAccessLog](#proxyaccesslog)_ | AccessLogs defines accesslog parameters for managed proxies. If unspecified, will send default format to stdout. | +| `tracing` _[ProxyTracing](#proxytracing)_ | Tracing defines tracing configuration for managed proxies. If unspecified, will not send tracing data. | +| `metrics` _[ProxyMetrics](#proxymetrics)_ | Metrics defines metrics configuration for managed proxies. | + + +## ProxyTracing -## JSONPatchOperationType -_Underlying type:_ `string` -JSONPatchOperationType specifies the JSON Patch operations that can be performed. _Appears in:_ -- [JSONPatchOperation](#jsonpatchoperation) +- [ProxyTelemetry](#proxytelemetry) +| Field | Description | +| --- | --- | +| `samplingRate` _integer_ | SamplingRate controls the rate at which traffic will be selected for tracing if no prior sampling decision has been made. Defaults to 100, valid values [0-100]. 100 indicates 100% sampling. | +| `customTags` _object (keys:string, values:[CustomTag](#customtag))_ | CustomTags defines the custom tags to add to each span. If provider is kubernetes, pod name and namespace are added by default. | +| `provider` _[TracingProvider](#tracingprovider)_ | Provider defines the tracing provider. Only OpenTelemetry is supported currently. | -## JwtAuthenticationFilterProvider +## RateLimit -JwtAuthenticationFilterProvider defines the JSON Web Token (JWT) authentication provider type and how JWTs should be verified: +RateLimit defines the configuration associated with the Rate Limit Service used for Global Rate Limiting. _Appears in:_ -- [AuthenticationFilterSpec](#authenticationfilterspec) +- [EnvoyGateway](#envoygateway) +- [EnvoyGatewaySpec](#envoygatewayspec) | Field | Description | | --- | --- | -| `name` _string_ | Name defines a unique name for the JWT provider. A name can have a variety of forms, including RFC1123 subdomains, RFC 1123 labels, or RFC 1035 labels. | -| `issuer` _string_ | Issuer is the principal that issued the JWT and takes the form of a URL or email address. For additional details, see https://tools.ietf.org/html/rfc7519#section-4.1.1 for URL format and https://rfc-editor.org/rfc/rfc5322.html for email format. If not provided, the JWT issuer is not checked. | -| `audiences` _string array_ | Audiences is a list of JWT audiences allowed access. For additional details, see https://tools.ietf.org/html/rfc7519#section-4.1.3. If not provided, JWT audiences are not checked. | -| `remoteJWKS` _[RemoteJWKS](#remotejwks)_ | RemoteJWKS defines how to fetch and cache JSON Web Key Sets (JWKS) from a remote HTTP/HTTPS endpoint. | -| `claimToHeaders` _[ClaimToHeader](#claimtoheader) array_ | ClaimToHeaders is a list of JWT claims that must be extracted into HTTP request headers For examples, following config: The claim must be of type; string, int, double, bool. Array type claims are not supported | +| `backend` _[RateLimitDatabaseBackend](#ratelimitdatabasebackend)_ | Backend holds the configuration associated with the database backend used by the rate limit service to store state associated with global ratelimiting. | +| `timeout` _[Duration](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#duration-v1-meta)_ | Timeout specifies the timeout period for the proxy to access the ratelimit server If not set, timeout is 20ms. | +| `failClosed` _boolean_ | FailClosed is a switch used to control the flow of traffic when the response from the ratelimit server cannot be obtained. If FailClosed is false, let the traffic pass, otherwise, don't let the traffic pass and return 500. If not set, FailClosed is False. | + + +## RateLimitDatabaseBackend + + + +RateLimitDatabaseBackend defines the configuration associated with the database backend used by the rate limit service. + +_Appears in:_ +- [RateLimit](#ratelimit) + +| Field | Description | +| --- | --- | +| `type` _[RateLimitDatabaseBackendType](#ratelimitdatabasebackendtype)_ | Type is the type of database backend to use. Supported types are: * Redis: Connects to a Redis database. | +| `redis` _[RateLimitRedisSettings](#ratelimitredissettings)_ | Redis defines the settings needed to connect to a Redis database. | + + +## RateLimitDatabaseBackendType + +_Underlying type:_ `string` + +RateLimitDatabaseBackendType specifies the types of database backend to be used by the rate limit service. + +_Appears in:_ +- [RateLimitDatabaseBackend](#ratelimitdatabasebackend) + ## RateLimitFilter @@ -332,6 +1249,21 @@ _Appears in:_ | `global` _[GlobalRateLimit](#globalratelimit)_ | Global defines global rate limit configuration. | +## RateLimitRedisSettings + + + +RateLimitRedisSettings defines the configuration for connecting to redis database. + +_Appears in:_ +- [RateLimitDatabaseBackend](#ratelimitdatabasebackend) + +| Field | Description | +| --- | --- | +| `url` _string_ | URL of the Redis Database. | +| `tls` _[RedisTLSSettings](#redistlssettings)_ | TLS defines TLS configuration for connecting to redis database. | + + ## RateLimitRule @@ -399,6 +1331,20 @@ _Appears in:_ | `unit` _[RateLimitUnit](#ratelimitunit)_ | | +## RedisTLSSettings + + + +RedisTLSSettings defines the TLS configuration for connecting to redis database. + +_Appears in:_ +- [RateLimitRedisSettings](#ratelimitredissettings) + +| Field | Description | +| --- | --- | +| `certificateRef` _[SecretObjectReference](https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1beta1.SecretObjectReference)_ | CertificateRef defines the client certificate reference for TLS connections. Currently only a Kubernetes Secret of type TLS is supported. | + + ## RemoteJWKS @@ -413,6 +1359,43 @@ _Appears in:_ | `uri` _string_ | URI is the HTTPS URI to fetch the JWKS. Envoy's system trust bundle is used to validate the server certificate. | +## RequestHeaderCustomTag + + + +RequestHeaderCustomTag adds value from request header to each span. + +_Appears in:_ +- [CustomTag](#customtag) + +| Field | Description | +| --- | --- | +| `name` _string_ | Name defines the name of the request header which to extract the value from. | +| `defaultValue` _string_ | DefaultValue defines the default value to use if the request header is not set. | + + +## ResourceProviderType + +_Underlying type:_ `string` + +ResourceProviderType defines the types of custom resource providers supported by Envoy Gateway. + +_Appears in:_ +- [EnvoyGatewayResourceProvider](#envoygatewayresourceprovider) + + + +## ServiceType + +_Underlying type:_ `string` + +ServiceType string describes ingress methods for a service + +_Appears in:_ +- [KubernetesServiceSpec](#kubernetesservicespec) + + + ## SourceMatch @@ -439,3 +1422,56 @@ _Appears in:_ +## TracingProvider + + + + + +_Appears in:_ +- [ProxyTracing](#proxytracing) + +| Field | Description | +| --- | --- | +| `type` _[TracingProviderType](#tracingprovidertype)_ | Type defines the tracing provider type. EG currently only supports OpenTelemetry. | +| `host` _string_ | Host define the provider service hostname. | +| `port` _integer_ | Port defines the port the provider service is exposed on. | + + +## TracingProviderType + +_Underlying type:_ `string` + + + +_Appears in:_ +- [TracingProvider](#tracingprovider) + + + +## XDSTranslatorHook + +_Underlying type:_ `string` + +XDSTranslatorHook defines the types of hooks that an Envoy Gateway extension may support for the xds-translator + +_Appears in:_ +- [XDSTranslatorHooks](#xdstranslatorhooks) + + + +## XDSTranslatorHooks + + + +XDSTranslatorHooks contains all the pre and post hooks for the xds-translator runner. + +_Appears in:_ +- [ExtensionHooks](#extensionhooks) + +| Field | Description | +| --- | --- | +| `pre` _[XDSTranslatorHook](#xdstranslatorhook) array_ | | +| `post` _[XDSTranslatorHook](#xdstranslatorhook) array_ | | + + diff --git a/docs/latest/design/accesslog.md b/docs/latest/design/accesslog.md index 38eef27ea96..89aeec39153 100644 --- a/docs/latest/design/accesslog.md +++ b/docs/latest/design/accesslog.md @@ -125,7 +125,7 @@ type OpenTelemetryEnvoyProxyAccessLog struct { - The following is an example to disable access log. ```yaml mdox-exec="sed '1,12d' examples/kubernetes/accesslog/disable-accesslog.yaml" -apiVersion: config.gateway.envoyproxy.io/v1alpha1 +apiVersion: gateway.envoyproxy.io/v1alpha1 kind: EnvoyProxy metadata: name: disable-accesslog @@ -139,7 +139,7 @@ spec: - The following is an example with text format access log. ```yaml mdox-exec="sed '1,12d' examples/kubernetes/accesslog/text-accesslog.yaml" -apiVersion: config.gateway.envoyproxy.io/v1alpha1 +apiVersion: gateway.envoyproxy.io/v1alpha1 kind: EnvoyProxy metadata: name: text-access-logging @@ -161,7 +161,7 @@ spec: - The following is an example with json format access log. ```yaml mdox-exec="sed '1,12d' examples/kubernetes/accesslog/json-accesslog.yaml" -apiVersion: config.gateway.envoyproxy.io/v1alpha1 +apiVersion: gateway.envoyproxy.io/v1alpha1 kind: EnvoyProxy metadata: name: json-access-logging @@ -184,7 +184,7 @@ spec: - The following is an example with OpenTelemetry format access log. ```yaml mdox-exec="sed '1,12d' examples/kubernetes/accesslog/otel-accesslog.yaml" -apiVersion: config.gateway.envoyproxy.io/v1alpha1 +apiVersion: gateway.envoyproxy.io/v1alpha1 kind: EnvoyProxy metadata: name: otel-access-logging @@ -209,7 +209,7 @@ spec: - The following is an example of sending same format to different sinks. ```yaml mdox-exec="sed '1,12d' examples/kubernetes/accesslog/multi-sinks.yaml" -apiVersion: config.gateway.envoyproxy.io/v1alpha1 +apiVersion: gateway.envoyproxy.io/v1alpha1 kind: EnvoyProxy metadata: name: multi-sinks diff --git a/docs/latest/design/bootstrap.md b/docs/latest/design/bootstrap.md index 30f1b52116f..74340aac7a0 100644 --- a/docs/latest/design/bootstrap.md +++ b/docs/latest/design/bootstrap.md @@ -70,11 +70,11 @@ metadata: spec: controllerName: gateway.envoyproxy.io/gatewayclass-controller parametersRef: - group: config.gateway.envoyproxy.io/v1alpha1 + group: gateway.envoyproxy.io/v1alpha1 kind: EnvoyProxy name: with-bootstrap-config --- -apiVersion: config.gateway.envoyproxy.io/v1alpha1 +apiVersion: gateway.envoyproxy.io/v1alpha1 kind: EnvoyProxy metadata: name: with-bootstrap-config @@ -178,11 +178,11 @@ metadata: spec: controllerName: gateway.envoyproxy.io/gatewayclass-controller parametersRef: - group: config.gateway.envoyproxy.io/v1alpha1 + group: gateway.envoyproxy.io/v1alpha1 kind: EnvoyProxy name: with-bootstrap-config --- -apiVersion: config.gateway.envoyproxy.io/v1alpha1 +apiVersion: gateway.envoyproxy.io/v1alpha1 kind: EnvoyProxy metadata: name: with-bootstrap-config @@ -280,11 +280,11 @@ metadata: spec: controllerName: gateway.envoyproxy.io/gatewayclass-controller parametersRef: - group: config.gateway.envoyproxy.io/v1alpha1 + group: gateway.envoyproxy.io/v1alpha1 kind: EnvoyProxy name: with-bootstrap-config --- -apiVersion: config.gateway.envoyproxy.io/v1alpha1 +apiVersion: gateway.envoyproxy.io/v1alpha1 kind: EnvoyProxy metadata: name: with-bootstrap-config diff --git a/docs/latest/design/config-api.md b/docs/latest/design/config-api.md index 4caaefe3e43..5af6150346c 100644 --- a/docs/latest/design/config-api.md +++ b/docs/latest/design/config-api.md @@ -35,14 +35,14 @@ The `EnvoyGateway` API defines the control plane configuration, e.g. Envoy Gatew * Since EnvoyGateway does not surface status, EnvoyGatewaySpec is inlined. * If data plane static configuration is required in the future, Envoy Gateway will use a separate file for this purpose. -The `v1alpha1` version and `config.gateway.envoyproxy.io` API group get generated: +The `v1alpha1` version and `gateway.envoyproxy.io` API group get generated: ```go // gateway/api/config/v1alpha1/doc.go -// Package v1alpha1 contains API Schema definitions for the config.gateway.envoyproxy.io API group. +// Package v1alpha1 contains API Schema definitions for the gateway.envoyproxy.io API group. // -// +groupName=config.gateway.envoyproxy.io +// +groupName=gateway.envoyproxy.io package v1alpha1 ``` @@ -166,7 +166,7 @@ The Kubernetes provider can be configured explicitly using `provider.kubernetes` ```yaml $ cat << EOF > /etc/envoy-gateway/config.yaml -apiVersion: config.gateway.envoyproxy.io/v1alpha1 +apiVersion: gateway.envoyproxy.io/v1alpha1 kind: EnvoyGateway provider: type: Kubernetes @@ -180,7 +180,7 @@ The Kubernetes provider can be configured using the `provider` field. For exampl ```yaml $ cat << EOF > /etc/envoy-gateway/config.yaml -apiVersion: config.gateway.envoyproxy.io/v1alpha1 +apiVersion: gateway.envoyproxy.io/v1alpha1 kind: EnvoyGateway provider: type: Kubernetes @@ -197,7 +197,7 @@ File provider: ```yaml $ cat << EOF > /etc/envoy-gateway/config.yaml -apiVersion: config.gateway.envoyproxy.io/v1alpha1 +apiVersion: gateway.envoyproxy.io/v1alpha1 kind: EnvoyGateway provider: type: File @@ -215,7 +215,7 @@ manage GatewayClasses with controllerName `foo` instead of the default `gateway. ```yaml $ cat << EOF > /etc/envoy-gateway/config.yaml -apiVersion: config.gateway.envoyproxy.io/v1alpha1 +apiVersion: gateway.envoyproxy.io/v1alpha1 kind: EnvoyGateway gateway: controllerName: foo @@ -317,7 +317,7 @@ spec: controllerName: gateway.envoyproxy.io/gatewayclass-controller parametersRef: name: example-config - group: config.gateway.envoyproxy.io + group: gateway.envoyproxy.io kind: EnvoyProxy --- apiVersion: gateway.networking.k8s.io/v1beta1 @@ -331,7 +331,7 @@ spec: protocol: HTTP port: 80 --- -apiVersion: config.gateway.envoyproxy.io/v1alpha1 +apiVersion: gateway.envoyproxy.io/v1alpha1 kind: EnvoyProxy metadata: name: example-config diff --git a/docs/latest/design/extending-envoy-gateway.md b/docs/latest/design/extending-envoy-gateway.md index df56964a573..e29f8ff2aa3 100644 --- a/docs/latest/design/extending-envoy-gateway.md +++ b/docs/latest/design/extending-envoy-gateway.md @@ -48,7 +48,7 @@ Information about the extension that Envoy Gateway needs to load is configured i An example configuration: ```yaml -apiVersion: config.gateway.envoyproxy.io/v1alpha1 +apiVersion: gateway.envoyproxy.io/v1alpha1 kind: EnvoyGateway extensionManager: resources: diff --git a/docs/latest/design/metrics.md b/docs/latest/design/metrics.md index e01260bcd19..d4ce03c4d8a 100644 --- a/docs/latest/design/metrics.md +++ b/docs/latest/design/metrics.md @@ -76,7 +76,7 @@ type PrometheusProvider struct { 1. The following is an example to enable prometheus metric. ```yaml mdox-exec="sed '1,12d' examples/kubernetes/metric/prometheus.yaml" -apiVersion: config.gateway.envoyproxy.io/v1alpha1 +apiVersion: gateway.envoyproxy.io/v1alpha1 kind: EnvoyProxy metadata: name: prometheus @@ -90,7 +90,7 @@ spec: 1. The following is an example to send metric via Open Telemetry sink. ```yaml mdox-exec="sed '1,12d' examples/kubernetes/metric/otel-sink.yaml" -apiVersion: config.gateway.envoyproxy.io/v1alpha1 +apiVersion: gateway.envoyproxy.io/v1alpha1 kind: EnvoyProxy metadata: name: otel-sink diff --git a/docs/latest/design/pprof.md b/docs/latest/design/pprof.md index 0e0f3bdb64a..552986e3bc8 100644 --- a/docs/latest/design/pprof.md +++ b/docs/latest/design/pprof.md @@ -35,7 +35,7 @@ PROFILE | FUNCTION Here is an example configuration ``` yaml -apiVersion: config.gateway.envoyproxy.io/v1alpha1 +apiVersion: gateway.envoyproxy.io/v1alpha1 gateway: controllerName: "gateway.envoyproxy.io/gatewayclass-controller" kind: EnvoyGateway diff --git a/docs/latest/design/tracing.md b/docs/latest/design/tracing.md index 4b85cff2287..46a6995d336 100644 --- a/docs/latest/design/tracing.md +++ b/docs/latest/design/tracing.md @@ -125,7 +125,7 @@ type RequestHeaderCustomTag struct { 1. The following is an example to config tracing. ```yaml mdox-exec="sed '1,12d' examples/kubernetes/tracing/default.yaml" -apiVersion: config.gateway.envoyproxy.io/v1alpha1 +apiVersion: gateway.envoyproxy.io/v1alpha1 kind: EnvoyProxy metadata: name: tracing diff --git a/docs/latest/user/customize-envoyproxy.md b/docs/latest/user/customize-envoyproxy.md index c45a46411de..ae1eb42f9f3 100644 --- a/docs/latest/user/customize-envoyproxy.md +++ b/docs/latest/user/customize-envoyproxy.md @@ -22,7 +22,7 @@ metadata: spec: controllerName: gateway.envoyproxy.io/gatewayclass-controller parametersRef: - group: config.gateway.envoyproxy.io + group: gateway.envoyproxy.io kind: EnvoyProxy name: custom-proxy-config namespace: envoy-gateway-system @@ -35,7 +35,7 @@ You can customize the EnvoyProxy Deployment Replicas via EnvoyProxy Config like: ```shell cat < 0 { - tc.infra.Proxy.Config.Spec.Logging = egcfgv1a1.ProxyLogging{ + tc.infra.Proxy.Config.Spec.Logging = egv1a1.ProxyLogging{ Level: tc.proxyLogging, } } @@ -333,11 +333,11 @@ func TestService(t *testing.T) { cfg, err := config.New() require.NoError(t, err) - svcType := egcfgv1a1.ServiceTypeClusterIP + svcType := egv1a1.ServiceTypeClusterIP cases := []struct { caseName string infra *ir.Infra - service *egcfgv1a1.KubernetesServiceSpec + service *egv1a1.KubernetesServiceSpec }{ { caseName: "default", @@ -347,7 +347,7 @@ func TestService(t *testing.T) { { caseName: "custom", infra: newTestInfra(), - service: &egcfgv1a1.KubernetesServiceSpec{ + service: &egv1a1.KubernetesServiceSpec{ Annotations: map[string]string{ "key1": "value1", }, diff --git a/internal/infrastructure/kubernetes/proxy_deployment_test.go b/internal/infrastructure/kubernetes/proxy_deployment_test.go index b4f89cc9418..8af9e2e97e3 100644 --- a/internal/infrastructure/kubernetes/proxy_deployment_test.go +++ b/internal/infrastructure/kubernetes/proxy_deployment_test.go @@ -16,7 +16,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" fakeclient "sigs.k8s.io/controller-runtime/pkg/client/fake" - egcfgv1a1 "github.com/envoyproxy/gateway/api/config/v1alpha1" + egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/envoygateway" "github.com/envoyproxy/gateway/internal/envoygateway/config" "github.com/envoyproxy/gateway/internal/gatewayapi" @@ -78,13 +78,13 @@ func TestCreateOrUpdateProxyDeployment(t *testing.T) { gatewayapi.OwningGatewayNameLabel: infra.Proxy.Name, }, }, - Config: &egcfgv1a1.EnvoyProxy{ - Spec: egcfgv1a1.EnvoyProxySpec{ - Provider: &egcfgv1a1.EnvoyProxyProvider{ - Type: egcfgv1a1.ProviderTypeKubernetes, - Kubernetes: &egcfgv1a1.EnvoyProxyKubernetesProvider{ - EnvoyDeployment: &egcfgv1a1.KubernetesDeploymentSpec{ - Container: &egcfgv1a1.KubernetesContainerSpec{ + Config: &egv1a1.EnvoyProxy{ + Spec: egv1a1.EnvoyProxySpec{ + Provider: &egv1a1.EnvoyProxyProvider{ + Type: egv1a1.ProviderTypeKubernetes, + Kubernetes: &egv1a1.EnvoyProxyKubernetesProvider{ + EnvoyDeployment: &egv1a1.KubernetesDeploymentSpec{ + Container: &egv1a1.KubernetesContainerSpec{ Image: pointer.String("envoyproxy/envoy-dev:v1.2.3"), }, }, diff --git a/internal/infrastructure/kubernetes/proxy_infra_test.go b/internal/infrastructure/kubernetes/proxy_infra_test.go index d3180439d69..d73d313a46f 100644 --- a/internal/infrastructure/kubernetes/proxy_infra_test.go +++ b/internal/infrastructure/kubernetes/proxy_infra_test.go @@ -19,7 +19,7 @@ import ( fakeclient "sigs.k8s.io/controller-runtime/pkg/client/fake" gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" - egcfgv1a1 "github.com/envoyproxy/gateway/api/config/v1alpha1" + egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/envoygateway" "github.com/envoyproxy/gateway/internal/envoygateway/config" "github.com/envoyproxy/gateway/internal/gatewayapi" @@ -47,15 +47,15 @@ func newTestInfraWithClient(t *testing.T, cli client.Client) *Infra { cfg, err := config.New() require.NoError(t, err) - cfg.EnvoyGateway = &egcfgv1a1.EnvoyGateway{ + cfg.EnvoyGateway = &egv1a1.EnvoyGateway{ TypeMeta: metav1.TypeMeta{}, - EnvoyGatewaySpec: egcfgv1a1.EnvoyGatewaySpec{ - RateLimit: &egcfgv1a1.RateLimit{ - Backend: egcfgv1a1.RateLimitDatabaseBackend{ - Type: egcfgv1a1.RedisBackendType, - Redis: &egcfgv1a1.RateLimitRedisSettings{ + EnvoyGatewaySpec: egv1a1.EnvoyGatewaySpec{ + RateLimit: &egv1a1.RateLimit{ + Backend: egv1a1.RateLimitDatabaseBackend{ + Type: egv1a1.RedisBackendType, + Redis: &egv1a1.RateLimitRedisSettings{ URL: "", - TLS: &egcfgv1a1.RedisTLSSettings{ + TLS: &egv1a1.RedisTLSSettings{ CertificateRef: &gwapiv1b1.SecretObjectReference{ Name: "ratelimit-cert", }, diff --git a/internal/infrastructure/kubernetes/ratelimit/resource.go b/internal/infrastructure/kubernetes/ratelimit/resource.go index b66544c80e9..13ab8f053cf 100644 --- a/internal/infrastructure/kubernetes/ratelimit/resource.go +++ b/internal/infrastructure/kubernetes/ratelimit/resource.go @@ -16,7 +16,7 @@ import ( "k8s.io/utils/pointer" "sigs.k8s.io/controller-runtime/pkg/client" - egcfgv1a1 "github.com/envoyproxy/gateway/api/config/v1alpha1" + egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/infrastructure/kubernetes/resource" "github.com/envoyproxy/gateway/internal/kubernetes" ) @@ -108,7 +108,7 @@ func rateLimitLabels() map[string]string { } // expectedRateLimitContainers returns expected rateLimit containers. -func expectedRateLimitContainers(rateLimit *egcfgv1a1.RateLimit, rateLimitDeployment *egcfgv1a1.KubernetesDeploymentSpec) []corev1.Container { +func expectedRateLimitContainers(rateLimit *egv1a1.RateLimit, rateLimitDeployment *egv1a1.KubernetesDeploymentSpec) []corev1.Container { ports := []corev1.ContainerPort{ { Name: "grpc", @@ -152,7 +152,7 @@ func expectedRateLimitContainers(rateLimit *egcfgv1a1.RateLimit, rateLimitDeploy } // expectedContainerVolumeMounts returns expected rateLimit container volume mounts. -func expectedContainerVolumeMounts(rateLimit *egcfgv1a1.RateLimit, rateLimitDeployment *egcfgv1a1.KubernetesDeploymentSpec) []corev1.VolumeMount { +func expectedContainerVolumeMounts(rateLimit *egv1a1.RateLimit, rateLimitDeployment *egv1a1.KubernetesDeploymentSpec) []corev1.VolumeMount { var volumeMounts []corev1.VolumeMount // mount the cert @@ -174,7 +174,7 @@ func expectedContainerVolumeMounts(rateLimit *egcfgv1a1.RateLimit, rateLimitDepl } // expectedDeploymentVolumes returns expected rateLimit deployment volumes. -func expectedDeploymentVolumes(rateLimit *egcfgv1a1.RateLimit, rateLimitDeployment *egcfgv1a1.KubernetesDeploymentSpec) []corev1.Volume { +func expectedDeploymentVolumes(rateLimit *egv1a1.RateLimit, rateLimitDeployment *egv1a1.KubernetesDeploymentSpec) []corev1.Volume { var volumes []corev1.Volume if rateLimit.Backend.Redis.TLS != nil && rateLimit.Backend.Redis.TLS.CertificateRef != nil { @@ -203,7 +203,7 @@ func expectedDeploymentVolumes(rateLimit *egcfgv1a1.RateLimit, rateLimitDeployme } // expectedRateLimitContainerEnv returns expected rateLimit container envs. -func expectedRateLimitContainerEnv(rateLimit *egcfgv1a1.RateLimit, rateLimitDeployment *egcfgv1a1.KubernetesDeploymentSpec) []corev1.EnvVar { +func expectedRateLimitContainerEnv(rateLimit *egv1a1.RateLimit, rateLimitDeployment *egv1a1.KubernetesDeploymentSpec) []corev1.EnvVar { env := []corev1.EnvVar{ { Name: RedisSocketTypeEnvVar, @@ -311,7 +311,7 @@ func expectedRateLimitContainerEnv(rateLimit *egcfgv1a1.RateLimit, rateLimitDepl } // Validate the ratelimit tls secret validating. -func Validate(ctx context.Context, client client.Client, gateway *egcfgv1a1.EnvoyGateway, namespace string) error { +func Validate(ctx context.Context, client client.Client, gateway *egv1a1.EnvoyGateway, namespace string) error { if gateway.RateLimit.Backend.Redis.TLS != nil && gateway.RateLimit.Backend.Redis.TLS.CertificateRef != nil { certificateRef := gateway.RateLimit.Backend.Redis.TLS.CertificateRef _, _, err := kubernetes.ValidateSecretObjectReference(ctx, client, certificateRef, namespace) diff --git a/internal/infrastructure/kubernetes/ratelimit/resource_provider.go b/internal/infrastructure/kubernetes/ratelimit/resource_provider.go index 1accc8aa301..f39961795cc 100644 --- a/internal/infrastructure/kubernetes/ratelimit/resource_provider.go +++ b/internal/infrastructure/kubernetes/ratelimit/resource_provider.go @@ -13,7 +13,7 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/utils/pointer" - egcfgv1a1 "github.com/envoyproxy/gateway/api/config/v1alpha1" + egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/infrastructure/kubernetes/resource" ) @@ -29,15 +29,15 @@ type ResourceRender struct { // Namespace is the Namespace used for managed infra. Namespace string - rateLimit *egcfgv1a1.RateLimit - rateLimitDeployment *egcfgv1a1.KubernetesDeploymentSpec + rateLimit *egv1a1.RateLimit + rateLimitDeployment *egv1a1.KubernetesDeploymentSpec // ownerReferenceUID store the uid of its owner reference. ownerReferenceUID map[string]types.UID } // NewResourceRender returns a new ResourceRender. -func NewResourceRender(ns string, gateway *egcfgv1a1.EnvoyGateway, ownerReferenceUID map[string]types.UID) *ResourceRender { +func NewResourceRender(ns string, gateway *egv1a1.EnvoyGateway, ownerReferenceUID map[string]types.UID) *ResourceRender { return &ResourceRender{ Namespace: ns, rateLimit: gateway.RateLimit, @@ -69,8 +69,8 @@ func (r *ResourceRender) Service() (*corev1.Service, error) { } labels := rateLimitLabels() - kubernetesServiceSpec := &egcfgv1a1.KubernetesServiceSpec{ - Type: egcfgv1a1.GetKubernetesServiceType(egcfgv1a1.ServiceTypeClusterIP), + kubernetesServiceSpec := &egv1a1.KubernetesServiceSpec{ + Type: egv1a1.GetKubernetesServiceType(egv1a1.ServiceTypeClusterIP), } serviceSpec := resource.ExpectedServiceSpec(kubernetesServiceSpec) serviceSpec.Ports = ports diff --git a/internal/infrastructure/kubernetes/ratelimit/resource_provider_test.go b/internal/infrastructure/kubernetes/ratelimit/resource_provider_test.go index 81580b1d205..29fb4cbde75 100644 --- a/internal/infrastructure/kubernetes/ratelimit/resource_provider_test.go +++ b/internal/infrastructure/kubernetes/ratelimit/resource_provider_test.go @@ -20,7 +20,7 @@ import ( gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" "sigs.k8s.io/yaml" - egcfgv1a1 "github.com/envoyproxy/gateway/api/config/v1alpha1" + egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/envoygateway/config" ) @@ -63,10 +63,10 @@ func TestServiceAccount(t *testing.T) { cfg, err := config.New() require.NoError(t, err) - cfg.EnvoyGateway.RateLimit = &egcfgv1a1.RateLimit{ - Backend: egcfgv1a1.RateLimitDatabaseBackend{ - Type: egcfgv1a1.RedisBackendType, - Redis: &egcfgv1a1.RateLimitRedisSettings{ + cfg.EnvoyGateway.RateLimit = &egv1a1.RateLimit{ + Backend: egv1a1.RateLimitDatabaseBackend{ + Type: egv1a1.RedisBackendType, + Redis: &egv1a1.RateLimitRedisSettings{ URL: "redis.redis.svc:6379", }, }, @@ -96,10 +96,10 @@ func TestService(t *testing.T) { cfg, err := config.New() require.NoError(t, err) - cfg.EnvoyGateway.RateLimit = &egcfgv1a1.RateLimit{ - Backend: egcfgv1a1.RateLimitDatabaseBackend{ - Type: egcfgv1a1.RedisBackendType, - Redis: &egcfgv1a1.RateLimitRedisSettings{ + cfg.EnvoyGateway.RateLimit = &egv1a1.RateLimit{ + Backend: egv1a1.RateLimitDatabaseBackend{ + Type: egv1a1.RedisBackendType, + Redis: &egv1a1.RateLimitRedisSettings{ URL: "redis.redis.svc:6379", }, }, @@ -127,18 +127,18 @@ func loadService() (*corev1.Service, error) { func TestDeployment(t *testing.T) { cfg, err := config.New() require.NoError(t, err) - rateLimit := &egcfgv1a1.RateLimit{ - Backend: egcfgv1a1.RateLimitDatabaseBackend{ - Type: egcfgv1a1.RedisBackendType, - Redis: &egcfgv1a1.RateLimitRedisSettings{ + rateLimit := &egv1a1.RateLimit{ + Backend: egv1a1.RateLimitDatabaseBackend{ + Type: egv1a1.RedisBackendType, + Redis: &egv1a1.RateLimitRedisSettings{ URL: "redis.redis.svc:6379", }, }, } cases := []struct { caseName string - rateLimit *egcfgv1a1.RateLimit - deploy *egcfgv1a1.KubernetesDeploymentSpec + rateLimit *egv1a1.RateLimit + deploy *egv1a1.KubernetesDeploymentSpec }{ { caseName: "default", @@ -148,10 +148,10 @@ func TestDeployment(t *testing.T) { { caseName: "custom", rateLimit: rateLimit, - deploy: &egcfgv1a1.KubernetesDeploymentSpec{ + deploy: &egv1a1.KubernetesDeploymentSpec{ Replicas: pointer.Int32(2), - Strategy: egcfgv1a1.DefaultKubernetesDeploymentStrategy(), - Pod: &egcfgv1a1.KubernetesPodSpec{ + Strategy: egv1a1.DefaultKubernetesDeploymentStrategy(), + Pod: &egv1a1.KubernetesPodSpec{ Annotations: map[string]string{ "prometheus.io/scrape": "true", }, @@ -159,7 +159,7 @@ func TestDeployment(t *testing.T) { RunAsUser: pointer.Int64(1000), }, }, - Container: &egcfgv1a1.KubernetesContainerSpec{ + Container: &egv1a1.KubernetesContainerSpec{ Image: pointer.String("custom-image"), Resources: &corev1.ResourceRequirements{ Limits: corev1.ResourceList{ @@ -180,10 +180,10 @@ func TestDeployment(t *testing.T) { { caseName: "extension-env", rateLimit: rateLimit, - deploy: &egcfgv1a1.KubernetesDeploymentSpec{ + deploy: &egv1a1.KubernetesDeploymentSpec{ Replicas: pointer.Int32(2), - Strategy: egcfgv1a1.DefaultKubernetesDeploymentStrategy(), - Pod: &egcfgv1a1.KubernetesPodSpec{ + Strategy: egv1a1.DefaultKubernetesDeploymentStrategy(), + Pod: &egv1a1.KubernetesPodSpec{ Annotations: map[string]string{ "prometheus.io/scrape": "true", }, @@ -191,7 +191,7 @@ func TestDeployment(t *testing.T) { RunAsUser: pointer.Int64(1000), }, }, - Container: &egcfgv1a1.KubernetesContainerSpec{ + Container: &egv1a1.KubernetesContainerSpec{ Env: []corev1.EnvVar{ { Name: "env_a", @@ -222,10 +222,10 @@ func TestDeployment(t *testing.T) { { caseName: "default-env", rateLimit: rateLimit, - deploy: &egcfgv1a1.KubernetesDeploymentSpec{ + deploy: &egv1a1.KubernetesDeploymentSpec{ Replicas: pointer.Int32(2), - Strategy: egcfgv1a1.DefaultKubernetesDeploymentStrategy(), - Pod: &egcfgv1a1.KubernetesPodSpec{ + Strategy: egv1a1.DefaultKubernetesDeploymentStrategy(), + Pod: &egv1a1.KubernetesPodSpec{ Annotations: map[string]string{ "prometheus.io/scrape": "true", }, @@ -233,7 +233,7 @@ func TestDeployment(t *testing.T) { RunAsUser: pointer.Int64(1000), }, }, - Container: &egcfgv1a1.KubernetesContainerSpec{ + Container: &egv1a1.KubernetesContainerSpec{ Env: nil, Image: pointer.String("custom-image"), Resources: &corev1.ResourceRequirements{ @@ -255,10 +255,10 @@ func TestDeployment(t *testing.T) { { caseName: "override-env", rateLimit: rateLimit, - deploy: &egcfgv1a1.KubernetesDeploymentSpec{ + deploy: &egv1a1.KubernetesDeploymentSpec{ Replicas: pointer.Int32(2), - Strategy: egcfgv1a1.DefaultKubernetesDeploymentStrategy(), - Pod: &egcfgv1a1.KubernetesPodSpec{ + Strategy: egv1a1.DefaultKubernetesDeploymentStrategy(), + Pod: &egv1a1.KubernetesPodSpec{ Annotations: map[string]string{ "prometheus.io/scrape": "true", }, @@ -266,7 +266,7 @@ func TestDeployment(t *testing.T) { RunAsUser: pointer.Int64(1000), }, }, - Container: &egcfgv1a1.KubernetesContainerSpec{ + Container: &egv1a1.KubernetesContainerSpec{ Env: []corev1.EnvVar{ { Name: UseStatsdEnvVar, @@ -292,12 +292,12 @@ func TestDeployment(t *testing.T) { }, { caseName: "redis-tls-settings", - rateLimit: &egcfgv1a1.RateLimit{ - Backend: egcfgv1a1.RateLimitDatabaseBackend{ - Type: egcfgv1a1.RedisBackendType, - Redis: &egcfgv1a1.RateLimitRedisSettings{ + rateLimit: &egv1a1.RateLimit{ + Backend: egv1a1.RateLimitDatabaseBackend{ + Type: egv1a1.RedisBackendType, + Redis: &egv1a1.RateLimitRedisSettings{ URL: "redis.redis.svc:6379", - TLS: &egcfgv1a1.RedisTLSSettings{ + TLS: &egv1a1.RedisTLSSettings{ CertificateRef: &gwapiv1b1.SecretObjectReference{ Name: "ratelimit-cert", }, @@ -305,10 +305,10 @@ func TestDeployment(t *testing.T) { }, }, }, - deploy: &egcfgv1a1.KubernetesDeploymentSpec{ + deploy: &egv1a1.KubernetesDeploymentSpec{ Replicas: pointer.Int32(2), - Strategy: egcfgv1a1.DefaultKubernetesDeploymentStrategy(), - Pod: &egcfgv1a1.KubernetesPodSpec{ + Strategy: egv1a1.DefaultKubernetesDeploymentStrategy(), + Pod: &egv1a1.KubernetesPodSpec{ Annotations: map[string]string{ "prometheus.io/scrape": "true", }, @@ -316,7 +316,7 @@ func TestDeployment(t *testing.T) { RunAsUser: pointer.Int64(1000), }, }, - Container: &egcfgv1a1.KubernetesContainerSpec{ + Container: &egv1a1.KubernetesContainerSpec{ Env: []corev1.EnvVar{ { Name: RedisAuthEnvVar, @@ -346,12 +346,12 @@ func TestDeployment(t *testing.T) { }, { caseName: "tolerations", - rateLimit: &egcfgv1a1.RateLimit{ - Backend: egcfgv1a1.RateLimitDatabaseBackend{ - Type: egcfgv1a1.RedisBackendType, - Redis: &egcfgv1a1.RateLimitRedisSettings{ + rateLimit: &egv1a1.RateLimit{ + Backend: egv1a1.RateLimitDatabaseBackend{ + Type: egv1a1.RedisBackendType, + Redis: &egv1a1.RateLimitRedisSettings{ URL: "redis.redis.svc:6379", - TLS: &egcfgv1a1.RedisTLSSettings{ + TLS: &egv1a1.RedisTLSSettings{ CertificateRef: &gwapiv1b1.SecretObjectReference{ Name: "ratelimit-cert", }, @@ -359,10 +359,10 @@ func TestDeployment(t *testing.T) { }, }, }, - deploy: &egcfgv1a1.KubernetesDeploymentSpec{ + deploy: &egv1a1.KubernetesDeploymentSpec{ Replicas: pointer.Int32(2), - Strategy: egcfgv1a1.DefaultKubernetesDeploymentStrategy(), - Pod: &egcfgv1a1.KubernetesPodSpec{ + Strategy: egv1a1.DefaultKubernetesDeploymentStrategy(), + Pod: &egv1a1.KubernetesPodSpec{ Annotations: map[string]string{ "prometheus.io/scrape": "true", }, @@ -378,7 +378,7 @@ func TestDeployment(t *testing.T) { }, }, }, - Container: &egcfgv1a1.KubernetesContainerSpec{ + Container: &egv1a1.KubernetesContainerSpec{ Env: []corev1.EnvVar{ { Name: RedisAuthEnvVar, @@ -408,12 +408,12 @@ func TestDeployment(t *testing.T) { }, { caseName: "volumes", - rateLimit: &egcfgv1a1.RateLimit{ - Backend: egcfgv1a1.RateLimitDatabaseBackend{ - Type: egcfgv1a1.RedisBackendType, - Redis: &egcfgv1a1.RateLimitRedisSettings{ + rateLimit: &egv1a1.RateLimit{ + Backend: egv1a1.RateLimitDatabaseBackend{ + Type: egv1a1.RedisBackendType, + Redis: &egv1a1.RateLimitRedisSettings{ URL: "redis.redis.svc:6379", - TLS: &egcfgv1a1.RedisTLSSettings{ + TLS: &egv1a1.RedisTLSSettings{ CertificateRef: &gwapiv1b1.SecretObjectReference{ Name: "ratelimit-cert-origin", }, @@ -421,10 +421,10 @@ func TestDeployment(t *testing.T) { }, }, }, - deploy: &egcfgv1a1.KubernetesDeploymentSpec{ + deploy: &egv1a1.KubernetesDeploymentSpec{ Replicas: pointer.Int32(2), - Strategy: egcfgv1a1.DefaultKubernetesDeploymentStrategy(), - Pod: &egcfgv1a1.KubernetesPodSpec{ + Strategy: egv1a1.DefaultKubernetesDeploymentStrategy(), + Pod: &egv1a1.KubernetesPodSpec{ Annotations: map[string]string{ "prometheus.io/scrape": "true", }, @@ -451,7 +451,7 @@ func TestDeployment(t *testing.T) { }, }, }, - Container: &egcfgv1a1.KubernetesContainerSpec{ + Container: &egv1a1.KubernetesContainerSpec{ Env: []corev1.EnvVar{ { Name: RedisAuthEnvVar, @@ -485,9 +485,9 @@ func TestDeployment(t *testing.T) { t.Run(tc.caseName, func(t *testing.T) { cfg.EnvoyGateway.RateLimit = tc.rateLimit - cfg.EnvoyGateway.Provider = &egcfgv1a1.EnvoyGatewayProvider{ - Type: egcfgv1a1.ProviderTypeKubernetes, - Kubernetes: &egcfgv1a1.EnvoyGatewayKubernetesProvider{ + cfg.EnvoyGateway.Provider = &egv1a1.EnvoyGatewayProvider{ + Type: egv1a1.ProviderTypeKubernetes, + Kubernetes: &egv1a1.EnvoyGatewayKubernetesProvider{ RateLimitDeployment: tc.deploy, }} r := NewResourceRender(cfg.Namespace, cfg.EnvoyGateway, ownerReferenceUID) diff --git a/internal/infrastructure/kubernetes/ratelimit_deployment_test.go b/internal/infrastructure/kubernetes/ratelimit_deployment_test.go index c07e0df981b..bfb444880f6 100644 --- a/internal/infrastructure/kubernetes/ratelimit_deployment_test.go +++ b/internal/infrastructure/kubernetes/ratelimit_deployment_test.go @@ -16,7 +16,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" fakeclient "sigs.k8s.io/controller-runtime/pkg/client/fake" - egcfgv1a1 "github.com/envoyproxy/gateway/api/config/v1alpha1" + egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/envoygateway" "github.com/envoyproxy/gateway/internal/envoygateway/config" "github.com/envoyproxy/gateway/internal/infrastructure/kubernetes/ratelimit" @@ -26,10 +26,10 @@ func TestCreateOrUpdateRateLimitDeployment(t *testing.T) { cfg, err := config.New() require.NoError(t, err) - cfg.EnvoyGateway.RateLimit = &egcfgv1a1.RateLimit{ - Backend: egcfgv1a1.RateLimitDatabaseBackend{ - Type: egcfgv1a1.RedisBackendType, - Redis: &egcfgv1a1.RateLimitRedisSettings{ + cfg.EnvoyGateway.RateLimit = &egv1a1.RateLimit{ + Backend: egv1a1.RateLimitDatabaseBackend{ + Type: egv1a1.RedisBackendType, + Redis: &egv1a1.RateLimitRedisSettings{ URL: "redis.redis.svc:6379", }, }, @@ -59,7 +59,7 @@ func TestCreateOrUpdateRateLimitDeployment(t *testing.T) { { name: "update ratelimit deployment image", current: deployment, - want: deploymentWithImage(deployment, egcfgv1a1.DefaultRateLimitImage), + want: deploymentWithImage(deployment, egv1a1.DefaultRateLimitImage), }, } @@ -93,10 +93,10 @@ func TestCreateOrUpdateRateLimitDeployment(t *testing.T) { } func TestDeleteRateLimitDeployment(t *testing.T) { - rl := &egcfgv1a1.RateLimit{ - Backend: egcfgv1a1.RateLimitDatabaseBackend{ - Type: egcfgv1a1.RedisBackendType, - Redis: &egcfgv1a1.RateLimitRedisSettings{ + rl := &egv1a1.RateLimit{ + Backend: egv1a1.RateLimitDatabaseBackend{ + Type: egv1a1.RedisBackendType, + Redis: &egv1a1.RateLimitRedisSettings{ URL: "redis.redis.svc:6379", }, }, diff --git a/internal/infrastructure/kubernetes/ratelimit_service_test.go b/internal/infrastructure/kubernetes/ratelimit_service_test.go index 32d447d067f..d117d9d57bf 100644 --- a/internal/infrastructure/kubernetes/ratelimit_service_test.go +++ b/internal/infrastructure/kubernetes/ratelimit_service_test.go @@ -11,15 +11,15 @@ import ( "github.com/stretchr/testify/require" - egcfgv1a1 "github.com/envoyproxy/gateway/api/config/v1alpha1" + egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/infrastructure/kubernetes/ratelimit" ) func TestDeleteRateLimitService(t *testing.T) { - rl := &egcfgv1a1.RateLimit{ - Backend: egcfgv1a1.RateLimitDatabaseBackend{ - Type: egcfgv1a1.RedisBackendType, - Redis: &egcfgv1a1.RateLimitRedisSettings{ + rl := &egv1a1.RateLimit{ + Backend: egv1a1.RateLimitDatabaseBackend{ + Type: egv1a1.RedisBackendType, + Redis: &egv1a1.RateLimitRedisSettings{ URL: "redis.redis.svc:6379", }, }, diff --git a/internal/infrastructure/kubernetes/ratelimit_serviceaccount_test.go b/internal/infrastructure/kubernetes/ratelimit_serviceaccount_test.go index 560a14f32ca..1ddf5cd4d8a 100644 --- a/internal/infrastructure/kubernetes/ratelimit_serviceaccount_test.go +++ b/internal/infrastructure/kubernetes/ratelimit_serviceaccount_test.go @@ -19,17 +19,17 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" fakeclient "sigs.k8s.io/controller-runtime/pkg/client/fake" - egcfgv1a1 "github.com/envoyproxy/gateway/api/config/v1alpha1" + egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/envoygateway" "github.com/envoyproxy/gateway/internal/envoygateway/config" "github.com/envoyproxy/gateway/internal/infrastructure/kubernetes/ratelimit" ) func TestCreateOrUpdateRateLimitServiceAccount(t *testing.T) { - rl := &egcfgv1a1.RateLimit{ - Backend: egcfgv1a1.RateLimitDatabaseBackend{ - Type: egcfgv1a1.RedisBackendType, - Redis: &egcfgv1a1.RateLimitRedisSettings{ + rl := &egv1a1.RateLimit{ + Backend: egv1a1.RateLimitDatabaseBackend{ + Type: egv1a1.RedisBackendType, + Redis: &egv1a1.RateLimitRedisSettings{ URL: "redis.redis.svc:6379", }, }, @@ -127,10 +127,10 @@ func TestCreateOrUpdateRateLimitServiceAccount(t *testing.T) { } func TestDeleteRateLimitServiceAccount(t *testing.T) { - rl := &egcfgv1a1.RateLimit{ - Backend: egcfgv1a1.RateLimitDatabaseBackend{ - Type: egcfgv1a1.RedisBackendType, - Redis: &egcfgv1a1.RateLimitRedisSettings{ + rl := &egv1a1.RateLimit{ + Backend: egv1a1.RateLimitDatabaseBackend{ + Type: egv1a1.RedisBackendType, + Redis: &egv1a1.RateLimitRedisSettings{ URL: "redis.redis.svc:6379", }, }, diff --git a/internal/infrastructure/kubernetes/resource/resource.go b/internal/infrastructure/kubernetes/resource/resource.go index a837302be3d..07bb458ee15 100644 --- a/internal/infrastructure/kubernetes/resource/resource.go +++ b/internal/infrastructure/kubernetes/resource/resource.go @@ -11,7 +11,7 @@ import ( corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - egcfgv1a1 "github.com/envoyproxy/gateway/api/config/v1alpha1" + egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" ) // GetSelector returns a label selector used to select resources @@ -23,11 +23,11 @@ func GetSelector(labels map[string]string) *metav1.LabelSelector { } // ExpectedServiceSpec returns service spec. -func ExpectedServiceSpec(service *egcfgv1a1.KubernetesServiceSpec) corev1.ServiceSpec { +func ExpectedServiceSpec(service *egv1a1.KubernetesServiceSpec) corev1.ServiceSpec { serviceSpec := corev1.ServiceSpec{} serviceSpec.Type = corev1.ServiceType(*service.Type) serviceSpec.SessionAffinity = corev1.ServiceAffinityNone - if *service.Type == egcfgv1a1.ServiceTypeLoadBalancer { + if *service.Type == egv1a1.ServiceTypeLoadBalancer { if service.LoadBalancerClass != nil { serviceSpec.LoadBalancerClass = service.LoadBalancerClass } @@ -48,7 +48,7 @@ func CompareSvc(currentSvc, originalSvc *corev1.Service) bool { } // ExpectedProxyContainerEnv returns expected container envs. -func ExpectedProxyContainerEnv(container *egcfgv1a1.KubernetesContainerSpec, env []corev1.EnvVar) []corev1.EnvVar { +func ExpectedProxyContainerEnv(container *egv1a1.KubernetesContainerSpec, env []corev1.EnvVar) []corev1.EnvVar { amendFunc := func(envVar corev1.EnvVar) { for index, e := range env { if e.Name == envVar.Name { @@ -67,7 +67,7 @@ func ExpectedProxyContainerEnv(container *egcfgv1a1.KubernetesContainerSpec, env } // ExpectedDeploymentVolumes returns expected deployment volumes. -func ExpectedDeploymentVolumes(pod *egcfgv1a1.KubernetesPodSpec, volumes []corev1.Volume) []corev1.Volume { +func ExpectedDeploymentVolumes(pod *egv1a1.KubernetesPodSpec, volumes []corev1.Volume) []corev1.Volume { amendFunc := func(volume corev1.Volume) { for index, e := range volumes { if e.Name == volume.Name { @@ -87,7 +87,7 @@ func ExpectedDeploymentVolumes(pod *egcfgv1a1.KubernetesPodSpec, volumes []corev } // ExpectedContainerVolumeMounts returns expected container volume mounts. -func ExpectedContainerVolumeMounts(container *egcfgv1a1.KubernetesContainerSpec, volumeMounts []corev1.VolumeMount) []corev1.VolumeMount { +func ExpectedContainerVolumeMounts(container *egv1a1.KubernetesContainerSpec, volumeMounts []corev1.VolumeMount) []corev1.VolumeMount { amendFunc := func(volumeMount corev1.VolumeMount) { for index, e := range volumeMounts { if e.Name == volumeMount.Name { diff --git a/internal/infrastructure/kubernetes/resource/resource_test.go b/internal/infrastructure/kubernetes/resource/resource_test.go index 286f5406082..04964a4eabd 100644 --- a/internal/infrastructure/kubernetes/resource/resource_test.go +++ b/internal/infrastructure/kubernetes/resource/resource_test.go @@ -14,13 +14,13 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/util/intstr" - egcfgv1a1 "github.com/envoyproxy/gateway/api/config/v1alpha1" + egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/utils/ptr" ) func TestExpectedServiceSpec(t *testing.T) { type args struct { - service *egcfgv1a1.KubernetesServiceSpec + service *egv1a1.KubernetesServiceSpec } loadbalancerClass := "foobar" tests := []struct { @@ -30,8 +30,8 @@ func TestExpectedServiceSpec(t *testing.T) { }{ { name: "LoadBalancer", - args: args{service: &egcfgv1a1.KubernetesServiceSpec{ - Type: egcfgv1a1.GetKubernetesServiceType(egcfgv1a1.ServiceTypeLoadBalancer), + args: args{service: &egv1a1.KubernetesServiceSpec{ + Type: egv1a1.GetKubernetesServiceType(egv1a1.ServiceTypeLoadBalancer), }}, want: corev1.ServiceSpec{ Type: corev1.ServiceTypeLoadBalancer, @@ -41,8 +41,8 @@ func TestExpectedServiceSpec(t *testing.T) { }, { name: "LoadBalancerWithClass", - args: args{service: &egcfgv1a1.KubernetesServiceSpec{ - Type: egcfgv1a1.GetKubernetesServiceType(egcfgv1a1.ServiceTypeLoadBalancer), + args: args{service: &egv1a1.KubernetesServiceSpec{ + Type: egv1a1.GetKubernetesServiceType(egv1a1.ServiceTypeLoadBalancer), LoadBalancerClass: &loadbalancerClass, }}, want: corev1.ServiceSpec{ @@ -54,8 +54,8 @@ func TestExpectedServiceSpec(t *testing.T) { }, { name: "LoadBalancerWithAllocateLoadBalancerNodePorts", - args: args{service: &egcfgv1a1.KubernetesServiceSpec{ - Type: egcfgv1a1.GetKubernetesServiceType(egcfgv1a1.ServiceTypeLoadBalancer), + args: args{service: &egv1a1.KubernetesServiceSpec{ + Type: egv1a1.GetKubernetesServiceType(egv1a1.ServiceTypeLoadBalancer), AllocateLoadBalancerNodePorts: ptr.To[bool](true), }}, want: corev1.ServiceSpec{ @@ -67,8 +67,8 @@ func TestExpectedServiceSpec(t *testing.T) { }, { name: "ClusterIP", - args: args{service: &egcfgv1a1.KubernetesServiceSpec{ - Type: egcfgv1a1.GetKubernetesServiceType(egcfgv1a1.ServiceTypeClusterIP), + args: args{service: &egv1a1.KubernetesServiceSpec{ + Type: egv1a1.GetKubernetesServiceType(egv1a1.ServiceTypeClusterIP), }}, want: corev1.ServiceSpec{ Type: corev1.ServiceTypeClusterIP, @@ -272,7 +272,7 @@ func TestCompareSvc(t *testing.T) { func TestExpectedProxyContainerEnv(t *testing.T) { type args struct { - container *egcfgv1a1.KubernetesContainerSpec + container *egv1a1.KubernetesContainerSpec env []corev1.EnvVar } tests := []struct { @@ -283,7 +283,7 @@ func TestExpectedProxyContainerEnv(t *testing.T) { { name: "TestExpectedProxyContainerEnv", args: args{ - container: &egcfgv1a1.KubernetesContainerSpec{ + container: &egv1a1.KubernetesContainerSpec{ Env: []corev1.EnvVar{ { Name: "env_a", @@ -343,7 +343,7 @@ func TestExpectedProxyContainerEnv(t *testing.T) { func TestExpectedDeploymentVolumes(t *testing.T) { type args struct { - pod *egcfgv1a1.KubernetesPodSpec + pod *egv1a1.KubernetesPodSpec volumes []corev1.Volume } tests := []struct { @@ -354,7 +354,7 @@ func TestExpectedDeploymentVolumes(t *testing.T) { { name: "TestExpectedDeploymentVolumes", args: args{ - pod: &egcfgv1a1.KubernetesPodSpec{ + pod: &egv1a1.KubernetesPodSpec{ Volumes: []corev1.Volume{ { Name: "certs", @@ -414,7 +414,7 @@ func TestExpectedDeploymentVolumes(t *testing.T) { func TestExpectedContainerVolumeMounts(t *testing.T) { type args struct { - container *egcfgv1a1.KubernetesContainerSpec + container *egv1a1.KubernetesContainerSpec volumeMounts []corev1.VolumeMount } tests := []struct { @@ -425,7 +425,7 @@ func TestExpectedContainerVolumeMounts(t *testing.T) { { name: "TestExpectedContainerVolumeMounts", args: args{ - container: &egcfgv1a1.KubernetesContainerSpec{ + container: &egv1a1.KubernetesContainerSpec{ VolumeMounts: []corev1.VolumeMount{ { Name: "certs", diff --git a/internal/infrastructure/manager.go b/internal/infrastructure/manager.go index 08df3cc7604..2a5cae1062a 100644 --- a/internal/infrastructure/manager.go +++ b/internal/infrastructure/manager.go @@ -12,7 +12,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/client" clicfg "sigs.k8s.io/controller-runtime/pkg/client/config" - "github.com/envoyproxy/gateway/api/config/v1alpha1" + "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/envoygateway" "github.com/envoyproxy/gateway/internal/envoygateway/config" "github.com/envoyproxy/gateway/internal/infrastructure/kubernetes" diff --git a/internal/infrastructure/runner/runner.go b/internal/infrastructure/runner/runner.go index 2f7bd146df9..9aff6f932ef 100644 --- a/internal/infrastructure/runner/runner.go +++ b/internal/infrastructure/runner/runner.go @@ -8,7 +8,7 @@ package runner import ( "context" - "github.com/envoyproxy/gateway/api/config/v1alpha1" + "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/envoygateway/config" "github.com/envoyproxy/gateway/internal/infrastructure" "github.com/envoyproxy/gateway/internal/ir" diff --git a/internal/ir/infra.go b/internal/ir/infra.go index 301973b598a..8899d81cb6e 100644 --- a/internal/ir/infra.go +++ b/internal/ir/infra.go @@ -11,7 +11,7 @@ import ( utilerrors "k8s.io/apimachinery/pkg/util/errors" - "github.com/envoyproxy/gateway/api/config/v1alpha1" + "github.com/envoyproxy/gateway/api/v1alpha1" ) const ( diff --git a/internal/ir/xds.go b/internal/ir/xds.go index 1b1877a34b4..13da14e1331 100644 --- a/internal/ir/xds.go +++ b/internal/ir/xds.go @@ -17,7 +17,6 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - egcfgv1a1 "github.com/envoyproxy/gateway/api/config/v1alpha1" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/api/v1alpha1/validation" ) @@ -929,7 +928,7 @@ type JSONPatchOperation struct { type Tracing struct { ServiceName string `json:"serviceName"` - egcfgv1a1.ProxyTracing + egv1a1.ProxyTracing } // Metrics defines the configuration for metrics generated by Envoy diff --git a/internal/ir/zz_generated.deepcopy.go b/internal/ir/zz_generated.deepcopy.go index 4974fa61607..3c5c228a11d 100644 --- a/internal/ir/zz_generated.deepcopy.go +++ b/internal/ir/zz_generated.deepcopy.go @@ -11,8 +11,7 @@ package ir import ( - "github.com/envoyproxy/gateway/api/config/v1alpha1" - apiv1alpha1 "github.com/envoyproxy/gateway/api/v1alpha1" + "github.com/envoyproxy/gateway/api/v1alpha1" "k8s.io/apimachinery/pkg/apis/meta/v1" ) @@ -177,7 +176,7 @@ func (in *EnvoyPatchPolicyStatus) DeepCopyInto(out *EnvoyPatchPolicyStatus) { *out = *in if in.Status != nil { in, out := &in.Status, &out.Status - *out = new(apiv1alpha1.EnvoyPatchPolicyStatus) + *out = new(v1alpha1.EnvoyPatchPolicyStatus) (*in).DeepCopyInto(*out) } } @@ -506,7 +505,7 @@ func (in *JwtRequestAuthentication) DeepCopyInto(out *JwtRequestAuthentication) *out = *in if in.Providers != nil { in, out := &in.Providers, &out.Providers - *out = make([]apiv1alpha1.JwtAuthenticationFilterProvider, len(*in)) + *out = make([]v1alpha1.JwtAuthenticationFilterProvider, len(*in)) for i := range *in { (*in)[i].DeepCopyInto(&(*out)[i]) } diff --git a/internal/logging/log.go b/internal/logging/log.go index 4236a955d53..0f92491bca6 100644 --- a/internal/logging/log.go +++ b/internal/logging/log.go @@ -13,7 +13,7 @@ import ( "go.uber.org/zap" "go.uber.org/zap/zapcore" - "github.com/envoyproxy/gateway/api/config/v1alpha1" + "github.com/envoyproxy/gateway/api/v1alpha1" ) type Logger struct { diff --git a/internal/logging/log_test.go b/internal/logging/log_test.go index 307c49e8d95..d71bee8b6b4 100644 --- a/internal/logging/log_test.go +++ b/internal/logging/log_test.go @@ -14,7 +14,7 @@ import ( "go.uber.org/zap" "go.uber.org/zap/zapcore" - "github.com/envoyproxy/gateway/api/config/v1alpha1" + "github.com/envoyproxy/gateway/api/v1alpha1" ) func TestZapLogLevel(t *testing.T) { diff --git a/internal/provider/kubernetes/controller.go b/internal/provider/kubernetes/controller.go index 9c31a2e7c11..937fbb961c3 100644 --- a/internal/provider/kubernetes/controller.go +++ b/internal/provider/kubernetes/controller.go @@ -29,9 +29,8 @@ import ( gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" mcsapi "sigs.k8s.io/mcs-api/pkg/apis/v1alpha1" - egcfgv1a1 "github.com/envoyproxy/gateway/api/config/v1alpha1" - "github.com/envoyproxy/gateway/api/config/v1alpha1/validation" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" + "github.com/envoyproxy/gateway/api/v1alpha1/validation" "github.com/envoyproxy/gateway/internal/envoygateway/config" "github.com/envoyproxy/gateway/internal/gatewayapi" "github.com/envoyproxy/gateway/internal/logging" @@ -69,7 +68,7 @@ type gatewayAPIReconciler struct { store *kubernetesProviderStore namespace string namespaceLabels []string - envoyGateway *egcfgv1a1.EnvoyGateway + envoyGateway *egv1a1.EnvoyGateway resources *message.ProviderResources envoyPatchPolicyStatuses *message.EnvoyPatchPolicyStatuses @@ -94,7 +93,7 @@ func newGatewayAPIController(mgr manager.Manager, cfg *config.Server, su status. byNamespaceSelector := cfg.EnvoyGateway.Provider != nil && cfg.EnvoyGateway.Provider.Kubernetes != nil && cfg.EnvoyGateway.Provider.Kubernetes.Watch != nil && - cfg.EnvoyGateway.Provider.Kubernetes.Watch.Type == egcfgv1a1.KubernetesWatchModeTypeNamespaceSelectors && + cfg.EnvoyGateway.Provider.Kubernetes.Watch.Type == egv1a1.KubernetesWatchModeTypeNamespaceSelectors && len(cfg.EnvoyGateway.Provider.Kubernetes.Watch.NamespaceSelectors) != 0 if byNamespaceSelector { namespaceLabels = cfg.EnvoyGateway.Provider.Kubernetes.Watch.NamespaceSelectors @@ -1030,7 +1029,7 @@ func (r *gatewayAPIReconciler) addFinalizer(ctx context.Context, obj client.Obje } } return nil - case *egcfgv1a1.EnvoyProxy: + case *egv1a1.EnvoyProxy: if !slice.ContainsString(objType.Finalizers, gatewayClassFinalizer) { base := client.MergeFrom(objType.DeepCopy()) objType.Finalizers = append(objType.Finalizers, gatewayClassFinalizer) @@ -1056,7 +1055,7 @@ func (r *gatewayAPIReconciler) removeFinalizer(ctx context.Context, obj client.O } } return nil - case *egcfgv1a1.EnvoyProxy: + case *egv1a1.EnvoyProxy: if slice.ContainsString(objType.Finalizers, gatewayClassFinalizer) { base := client.MergeFrom(objType.DeepCopy()) objType.Finalizers = slice.RemoveString(objType.Finalizers, gatewayClassFinalizer) @@ -1312,7 +1311,7 @@ func (r *gatewayAPIReconciler) watchResources(ctx context.Context, mgr manager.M epPredicates = append(epPredicates, predicate.NewPredicateFuncs(r.hasMatchingNamespaceLabels)) } if err := c.Watch( - source.Kind(mgr.GetCache(), &egcfgv1a1.EnvoyProxy{}), + source.Kind(mgr.GetCache(), &egv1a1.EnvoyProxy{}), handler.EnqueueRequestsFromMapFunc(r.enqueueClass), epPredicates..., ); err != nil { @@ -1598,7 +1597,7 @@ func (r *gatewayAPIReconciler) enqueueClass(_ context.Context, _ client.Object) } func (r *gatewayAPIReconciler) hasManagedClass(obj client.Object) bool { - ep, ok := obj.(*egcfgv1a1.EnvoyProxy) + ep, ok := obj.(*egv1a1.EnvoyProxy) if !ok { panic(fmt.Sprintf("unsupported object type %T", obj)) } @@ -1637,7 +1636,7 @@ func (r *gatewayAPIReconciler) processParamsRef(ctx context.Context, gc *gwapiv1 return fmt.Errorf("unsupported parametersRef for gatewayclass %s", gc.Name) } } - epList := new(egcfgv1a1.EnvoyProxyList) + epList := new(egv1a1.EnvoyProxyList) // The EnvoyProxy must be in the same namespace as EG. if err := r.client.List(ctx, epList, &client.ListOptions{Namespace: r.namespace}); err != nil { return fmt.Errorf("failed to list envoyproxies in namespace %s: %v", r.namespace, err) diff --git a/internal/provider/kubernetes/controller_test.go b/internal/provider/kubernetes/controller_test.go index 1269a5b84a3..d6374c96645 100644 --- a/internal/provider/kubernetes/controller_test.go +++ b/internal/provider/kubernetes/controller_test.go @@ -16,7 +16,7 @@ import ( fakeclient "sigs.k8s.io/controller-runtime/pkg/client/fake" gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" - egcfgv1a1 "github.com/envoyproxy/gateway/api/config/v1alpha1" + egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/envoygateway" "github.com/envoyproxy/gateway/internal/envoygateway/config" "github.com/envoyproxy/gateway/internal/gatewayapi" @@ -36,7 +36,7 @@ func TestAddGatewayClassFinalizer(t *testing.T) { Name: "test-gc", }, Spec: gwapiv1b1.GatewayClassSpec{ - ControllerName: egcfgv1a1.GatewayControllerName, + ControllerName: egv1a1.GatewayControllerName, }, }, expect: []string{gatewayClassFinalizer}, @@ -49,7 +49,7 @@ func TestAddGatewayClassFinalizer(t *testing.T) { Finalizers: []string{"fooFinalizer"}, }, Spec: gwapiv1b1.GatewayClassSpec{ - ControllerName: egcfgv1a1.GatewayControllerName, + ControllerName: egv1a1.GatewayControllerName, }, }, expect: []string{"fooFinalizer", gatewayClassFinalizer}, @@ -62,7 +62,7 @@ func TestAddGatewayClassFinalizer(t *testing.T) { Finalizers: []string{gatewayClassFinalizer}, }, Spec: gwapiv1b1.GatewayClassSpec{ - ControllerName: egcfgv1a1.GatewayControllerName, + ControllerName: egv1a1.GatewayControllerName, }, }, expect: []string{gatewayClassFinalizer}, @@ -90,12 +90,12 @@ func TestAddGatewayClassFinalizer(t *testing.T) { func TestAddEnvoyProxyFinalizer(t *testing.T) { testCases := []struct { name string - ep *egcfgv1a1.EnvoyProxy + ep *egv1a1.EnvoyProxy expect []string }{ { name: "envoyproxy with no finalizers", - ep: &egcfgv1a1.EnvoyProxy{ + ep: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Name: "test", }, @@ -104,7 +104,7 @@ func TestAddEnvoyProxyFinalizer(t *testing.T) { }, { name: "envoyproxy with a different finalizer", - ep: &egcfgv1a1.EnvoyProxy{ + ep: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Name: "test-ep", Finalizers: []string{"fooFinalizer"}, @@ -114,7 +114,7 @@ func TestAddEnvoyProxyFinalizer(t *testing.T) { }, { name: "envoyproxy with existing gatewayclass finalizer", - ep: &egcfgv1a1.EnvoyProxy{ + ep: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Name: "test-ep", Finalizers: []string{gatewayClassFinalizer}, @@ -144,12 +144,12 @@ func TestAddEnvoyProxyFinalizer(t *testing.T) { func TestRemoveEnvoyProxyFinalizer(t *testing.T) { testCases := []struct { name string - ep *egcfgv1a1.EnvoyProxy + ep *egv1a1.EnvoyProxy expect []string }{ { name: "envoyproxy with no finalizers", - ep: &egcfgv1a1.EnvoyProxy{ + ep: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Name: "test", }, @@ -158,7 +158,7 @@ func TestRemoveEnvoyProxyFinalizer(t *testing.T) { }, { name: "envoyproxy with a different finalizer", - ep: &egcfgv1a1.EnvoyProxy{ + ep: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Name: "test-ep", Finalizers: []string{"fooFinalizer"}, @@ -168,7 +168,7 @@ func TestRemoveEnvoyProxyFinalizer(t *testing.T) { }, { name: "envoyproxy with existing gatewayclass finalizer", - ep: &egcfgv1a1.EnvoyProxy{ + ep: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Name: "test-ep", Finalizers: []string{gatewayClassFinalizer}, @@ -208,7 +208,7 @@ func TestRemoveGatewayClassFinalizer(t *testing.T) { Name: "test-gc", }, Spec: gwapiv1b1.GatewayClassSpec{ - ControllerName: egcfgv1a1.GatewayControllerName, + ControllerName: egv1a1.GatewayControllerName, }, }, expect: nil, @@ -221,7 +221,7 @@ func TestRemoveGatewayClassFinalizer(t *testing.T) { Finalizers: []string{"fooFinalizer"}, }, Spec: gwapiv1b1.GatewayClassSpec{ - ControllerName: egcfgv1a1.GatewayControllerName, + ControllerName: egv1a1.GatewayControllerName, }, }, expect: []string{"fooFinalizer"}, @@ -234,7 +234,7 @@ func TestRemoveGatewayClassFinalizer(t *testing.T) { Finalizers: []string{gatewayClassFinalizer}, }, Spec: gwapiv1b1.GatewayClassSpec{ - ControllerName: egcfgv1a1.GatewayControllerName, + ControllerName: egv1a1.GatewayControllerName, }, }, expect: nil, @@ -260,7 +260,7 @@ func TestRemoveGatewayClassFinalizer(t *testing.T) { } func TestHasManagedClass(t *testing.T) { - gcCtrlName := gwapiv1b1.GatewayController(egcfgv1a1.GatewayControllerName) + gcCtrlName := gwapiv1b1.GatewayController(egv1a1.GatewayControllerName) testCases := []struct { name string @@ -270,7 +270,7 @@ func TestHasManagedClass(t *testing.T) { }{ { name: "no matching gatewayclasses", - ep: &egcfgv1a1.EnvoyProxy{ + ep: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: config.DefaultNamespace, Name: "test-envoyproxy", @@ -284,8 +284,8 @@ func TestHasManagedClass(t *testing.T) { Spec: gwapiv1b1.GatewayClassSpec{ ControllerName: "SomeOtherController", ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egcfgv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egcfgv1a1.KindEnvoyProxy), + Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), Name: "test-envoyproxy", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, @@ -304,7 +304,7 @@ func TestHasManagedClass(t *testing.T) { }, { name: "match one gatewayclass", - ep: &egcfgv1a1.EnvoyProxy{ + ep: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: config.DefaultNamespace, Name: "test-envoyproxy", @@ -318,8 +318,8 @@ func TestHasManagedClass(t *testing.T) { Spec: gwapiv1b1.GatewayClassSpec{ ControllerName: gcCtrlName, ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egcfgv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egcfgv1a1.KindEnvoyProxy), + Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), Name: "test-envoyproxy", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, @@ -338,7 +338,7 @@ func TestHasManagedClass(t *testing.T) { }, { name: "envoyproxy in different namespace as eg", - ep: &egcfgv1a1.EnvoyProxy{ + ep: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: "not-eg-ns", Name: "test-envoyproxy", @@ -356,7 +356,7 @@ func TestHasManagedClass(t *testing.T) { }, { name: "multiple gatewayclasses one with accepted status", - ep: &egcfgv1a1.EnvoyProxy{ + ep: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: config.DefaultNamespace, Name: "test-envoyproxy", @@ -370,8 +370,8 @@ func TestHasManagedClass(t *testing.T) { Spec: gwapiv1b1.GatewayClassSpec{ ControllerName: gcCtrlName, ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egcfgv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egcfgv1a1.KindEnvoyProxy), + Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), Name: "test-envoyproxy", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, @@ -392,8 +392,8 @@ func TestHasManagedClass(t *testing.T) { Spec: gwapiv1b1.GatewayClassSpec{ ControllerName: gcCtrlName, ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egcfgv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egcfgv1a1.KindEnvoyProxy), + Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), Name: "test-envoyproxy", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, @@ -416,7 +416,7 @@ func TestHasManagedClass(t *testing.T) { tc := testCases[i] // Create the reconciler. - logger := logging.DefaultLogger(egcfgv1a1.LogLevelInfo) + logger := logging.DefaultLogger(egv1a1.LogLevelInfo) r := &gatewayAPIReconciler{ log: logger, classController: gcCtrlName, @@ -445,12 +445,12 @@ func TestHasManagedClass(t *testing.T) { } func TestProcessParamsRef(t *testing.T) { - gcCtrlName := gwapiv1b1.GatewayController(egcfgv1a1.GatewayControllerName) + gcCtrlName := gwapiv1b1.GatewayController(egv1a1.GatewayControllerName) testCases := []struct { name string gc *gwapiv1b1.GatewayClass - ep *egcfgv1a1.EnvoyProxy + ep *egv1a1.EnvoyProxy expected bool }{ { @@ -462,14 +462,14 @@ func TestProcessParamsRef(t *testing.T) { Spec: gwapiv1b1.GatewayClassSpec{ ControllerName: gcCtrlName, ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egcfgv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egcfgv1a1.KindEnvoyProxy), + Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), Name: "test", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, }, }, - ep: &egcfgv1a1.EnvoyProxy{ + ep: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: config.DefaultNamespace, Name: "test", @@ -487,8 +487,8 @@ func TestProcessParamsRef(t *testing.T) { Spec: gwapiv1b1.GatewayClassSpec{ ControllerName: gcCtrlName, ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egcfgv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egcfgv1a1.KindEnvoyProxy), + Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), Name: "test", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, @@ -505,14 +505,14 @@ func TestProcessParamsRef(t *testing.T) { Spec: gwapiv1b1.GatewayClassSpec{ ControllerName: gcCtrlName, ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egcfgv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egcfgv1a1.KindEnvoyProxy), + Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), Name: "non-exist", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, }, }, - ep: &egcfgv1a1.EnvoyProxy{ + ep: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: config.DefaultNamespace, Name: "test", @@ -536,7 +536,7 @@ func TestProcessParamsRef(t *testing.T) { }, }, }, - ep: &egcfgv1a1.EnvoyProxy{ + ep: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: config.DefaultNamespace, Name: "test", @@ -550,7 +550,7 @@ func TestProcessParamsRef(t *testing.T) { tc := testCases[i] // Create the reconciler. - logger := logging.DefaultLogger(egcfgv1a1.LogLevelInfo) + logger := logging.DefaultLogger(egv1a1.LogLevelInfo) r := &gatewayAPIReconciler{ log: logger, diff --git a/internal/provider/kubernetes/helpers.go b/internal/provider/kubernetes/helpers.go index bd9e5745e7e..0eb497f1c35 100644 --- a/internal/provider/kubernetes/helpers.go +++ b/internal/provider/kubernetes/helpers.go @@ -16,7 +16,7 @@ import ( gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" mcsapi "sigs.k8s.io/mcs-api/pkg/apis/v1alpha1" - egcfgv1a1 "github.com/envoyproxy/gateway/api/config/v1alpha1" + egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/envoygateway/config" "github.com/envoyproxy/gateway/internal/gatewayapi" "github.com/envoyproxy/gateway/internal/provider/utils" @@ -227,7 +227,7 @@ func validateBackendRef(ref *gwapiv1b1.BackendRef) error { } // classRefsEnvoyProxy returns true if the provided GatewayClass references the provided EnvoyProxy. -func classRefsEnvoyProxy(gc *gwapiv1b1.GatewayClass, ep *egcfgv1a1.EnvoyProxy) bool { +func classRefsEnvoyProxy(gc *gwapiv1b1.GatewayClass, ep *egv1a1.EnvoyProxy) bool { if gc == nil || ep == nil { return false } @@ -244,8 +244,8 @@ func refsEnvoyProxy(gc *gwapiv1b1.GatewayClass) bool { } return gc.Spec.ParametersRef != nil && - string(gc.Spec.ParametersRef.Group) == egcfgv1a1.GroupVersion.Group && - gc.Spec.ParametersRef.Kind == egcfgv1a1.KindEnvoyProxy && + string(gc.Spec.ParametersRef.Group) == egv1a1.GroupVersion.Group && + gc.Spec.ParametersRef.Kind == egv1a1.KindEnvoyProxy && gc.Spec.ParametersRef.Namespace != nil && len(gc.Spec.ParametersRef.Name) > 0 } diff --git a/internal/provider/kubernetes/helpers_test.go b/internal/provider/kubernetes/helpers_test.go index e3eed4225ef..be30d2a5171 100644 --- a/internal/provider/kubernetes/helpers_test.go +++ b/internal/provider/kubernetes/helpers_test.go @@ -13,7 +13,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" - egcfgv1a1 "github.com/envoyproxy/gateway/api/config/v1alpha1" + egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/envoygateway/config" "github.com/envoyproxy/gateway/internal/gatewayapi" ) @@ -126,7 +126,7 @@ func TestIsGatewayClassAccepted(t *testing.T) { Name: "test", }, Spec: gwapiv1b1.GatewayClassSpec{ - ControllerName: gwapiv1b1.GatewayController(egcfgv1a1.GatewayControllerName), + ControllerName: gwapiv1b1.GatewayController(egv1a1.GatewayControllerName), }, Status: gwapiv1b1.GatewayClassStatus{ Conditions: []metav1.Condition{ @@ -146,7 +146,7 @@ func TestIsGatewayClassAccepted(t *testing.T) { Name: "test", }, Spec: gwapiv1b1.GatewayClassSpec{ - ControllerName: gwapiv1b1.GatewayController(egcfgv1a1.GatewayControllerName), + ControllerName: gwapiv1b1.GatewayController(egv1a1.GatewayControllerName), }, Status: gwapiv1b1.GatewayClassStatus{ Conditions: []metav1.Condition{ @@ -166,7 +166,7 @@ func TestIsGatewayClassAccepted(t *testing.T) { Name: "test", }, Spec: gwapiv1b1.GatewayClassSpec{ - ControllerName: gwapiv1b1.GatewayController(egcfgv1a1.GatewayControllerName), + ControllerName: gwapiv1b1.GatewayController(egv1a1.GatewayControllerName), }, Status: gwapiv1b1.GatewayClassStatus{ Conditions: []metav1.Condition{ @@ -202,7 +202,7 @@ func TestGatewayOldestClass(t *testing.T) { CreationTimestamp: metav1.NewTime(creationTime), }, Spec: gwapiv1b1.GatewayClassSpec{ - ControllerName: egcfgv1a1.GatewayControllerName, + ControllerName: egv1a1.GatewayControllerName, }, } } @@ -309,8 +309,8 @@ func TestRefsEnvoyProxy(t *testing.T) { Spec: gwapiv1b1.GatewayClassSpec{ ControllerName: "test", ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egcfgv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egcfgv1a1.KindEnvoyProxy), + Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), Name: "test", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, @@ -342,7 +342,7 @@ func TestRefsEnvoyProxy(t *testing.T) { ControllerName: "test", ParametersRef: &gwapiv1b1.ParametersReference{ Group: gwapiv1b1.Group("Unsupported"), - Kind: gwapiv1b1.Kind(egcfgv1a1.KindEnvoyProxy), + Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), Name: "test", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, @@ -360,7 +360,7 @@ func TestRefsEnvoyProxy(t *testing.T) { Spec: gwapiv1b1.GatewayClassSpec{ ControllerName: "test", ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egcfgv1a1.GroupVersion.Group), + Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), Kind: gwapiv1b1.Kind("Unsupported"), Name: "test", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), @@ -379,7 +379,7 @@ func TestRefsEnvoyProxy(t *testing.T) { Spec: gwapiv1b1.GatewayClassSpec{ ControllerName: "test", ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egcfgv1a1.GroupVersion.Group), + Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), Kind: gwapiv1b1.Kind("Unsupported"), Name: "test", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), @@ -398,8 +398,8 @@ func TestRefsEnvoyProxy(t *testing.T) { Spec: gwapiv1b1.GatewayClassSpec{ ControllerName: "test", ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egcfgv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egcfgv1a1.KindEnvoyProxy), + Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), Name: "", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, @@ -417,8 +417,8 @@ func TestRefsEnvoyProxy(t *testing.T) { Spec: gwapiv1b1.GatewayClassSpec{ ControllerName: "test", ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egcfgv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egcfgv1a1.KindEnvoyProxy), + Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), Name: "test", }, }, @@ -437,12 +437,12 @@ func TestRefsEnvoyProxy(t *testing.T) { } func TestClassRefsEnvoyProxy(t *testing.T) { - gcCtrlName := gwapiv1b1.GatewayController(egcfgv1a1.GatewayControllerName) + gcCtrlName := gwapiv1b1.GatewayController(egv1a1.GatewayControllerName) testCases := []struct { name string gc *gwapiv1b1.GatewayClass - ep *egcfgv1a1.EnvoyProxy + ep *egv1a1.EnvoyProxy expected bool }{ { @@ -460,14 +460,14 @@ func TestClassRefsEnvoyProxy(t *testing.T) { Spec: gwapiv1b1.GatewayClassSpec{ ControllerName: gcCtrlName, ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egcfgv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egcfgv1a1.KindEnvoyProxy), + Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), Name: "test-ep", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, }, }, - ep: &egcfgv1a1.EnvoyProxy{ + ep: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: config.DefaultNamespace, Name: "test-ep", @@ -484,14 +484,14 @@ func TestClassRefsEnvoyProxy(t *testing.T) { Spec: gwapiv1b1.GatewayClassSpec{ ControllerName: gcCtrlName, ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egcfgv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egcfgv1a1.KindEnvoyProxy), + Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), Name: "not-test-ep", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, }, }, - ep: &egcfgv1a1.EnvoyProxy{ + ep: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: config.DefaultNamespace, Name: "test-ep", @@ -508,14 +508,14 @@ func TestClassRefsEnvoyProxy(t *testing.T) { Spec: gwapiv1b1.GatewayClassSpec{ ControllerName: gcCtrlName, ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egcfgv1a1.GroupVersion.Group), + Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), Kind: gwapiv1b1.Kind("UnsupportedKind"), Name: "test-ep", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, }, }, - ep: &egcfgv1a1.EnvoyProxy{ + ep: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: config.DefaultNamespace, Name: "test-ep", @@ -533,13 +533,13 @@ func TestClassRefsEnvoyProxy(t *testing.T) { ControllerName: gcCtrlName, ParametersRef: &gwapiv1b1.ParametersReference{ Group: gwapiv1b1.Group("UnsupportedGroup"), - Kind: gwapiv1b1.Kind(egcfgv1a1.KindEnvoyProxy), + Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), Name: "test-ep", Namespace: gatewayapi.NamespacePtr(config.DefaultNamespace), }, }, }, - ep: &egcfgv1a1.EnvoyProxy{ + ep: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: config.DefaultNamespace, Name: "test-ep", @@ -556,13 +556,13 @@ func TestClassRefsEnvoyProxy(t *testing.T) { Spec: gwapiv1b1.GatewayClassSpec{ ControllerName: gcCtrlName, ParametersRef: &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egcfgv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egcfgv1a1.KindEnvoyProxy), + Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), Name: "test-ep", }, }, }, - ep: &egcfgv1a1.EnvoyProxy{ + ep: &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: config.DefaultNamespace, Name: "test-ep", @@ -585,7 +585,7 @@ func TestClassRefsEnvoyProxy(t *testing.T) { } func TestClassAccepted(t *testing.T) { - gcCtrlName := gwapiv1b1.GatewayController(egcfgv1a1.GatewayControllerName) + gcCtrlName := gwapiv1b1.GatewayController(egv1a1.GatewayControllerName) testCases := []struct { name string diff --git a/internal/provider/kubernetes/kubernetes.go b/internal/provider/kubernetes/kubernetes.go index c56151202e5..01fe32c7776 100644 --- a/internal/provider/kubernetes/kubernetes.go +++ b/internal/provider/kubernetes/kubernetes.go @@ -17,7 +17,7 @@ import ( "sigs.k8s.io/controller-runtime/pkg/manager" metricsserver "sigs.k8s.io/controller-runtime/pkg/metrics/server" - "github.com/envoyproxy/gateway/api/config/v1alpha1" + "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/envoygateway" "github.com/envoyproxy/gateway/internal/envoygateway/config" "github.com/envoyproxy/gateway/internal/message" diff --git a/internal/provider/kubernetes/kubernetes_test.go b/internal/provider/kubernetes/kubernetes_test.go index 78d5487980a..6a4728ae0c8 100644 --- a/internal/provider/kubernetes/kubernetes_test.go +++ b/internal/provider/kubernetes/kubernetes_test.go @@ -31,7 +31,6 @@ import ( gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" - egcfgv1a1 "github.com/envoyproxy/gateway/api/config/v1alpha1" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/envoygateway/config" "github.com/envoyproxy/gateway/internal/gatewayapi" @@ -105,7 +104,7 @@ func startEnv() (*envtest.Environment, *rest.Config, error) { func testGatewayClassController(ctx context.Context, t *testing.T, provider *Provider, resources *message.ProviderResources) { cli := provider.manager.GetClient() - gc := test.GetGatewayClass("test-gc-controllername", egcfgv1a1.GatewayControllerName) + gc := test.GetGatewayClass("test-gc-controllername", egv1a1.GatewayControllerName) require.NoError(t, cli.Create(ctx, gc)) defer func() { @@ -121,7 +120,7 @@ func testGatewayClassController(ctx context.Context, t *testing.T, provider *Pro func testGatewayClassAcceptedStatus(ctx context.Context, t *testing.T, provider *Provider, resources *message.ProviderResources) { cli := provider.manager.GetClient() - gc := test.GetGatewayClass("test-gc-accepted-status", egcfgv1a1.GatewayControllerName) + gc := test.GetGatewayClass("test-gc-accepted-status", egv1a1.GatewayControllerName) require.NoError(t, cli.Create(ctx, gc)) defer func() { @@ -171,10 +170,10 @@ func testGatewayClassWithParamRef(ctx context.Context, t *testing.T, provider *P require.NoError(t, cli.Delete(ctx, ep)) }() - gc := test.GetGatewayClass("gc-with-param-ref", egcfgv1a1.GatewayControllerName) + gc := test.GetGatewayClass("gc-with-param-ref", egv1a1.GatewayControllerName) gc.Spec.ParametersRef = &gwapiv1b1.ParametersReference{ - Group: gwapiv1b1.Group(egcfgv1a1.GroupVersion.Group), - Kind: gwapiv1b1.Kind(egcfgv1a1.KindEnvoyProxy), + Group: gwapiv1b1.Group(egv1a1.GroupVersion.Group), + Kind: gwapiv1b1.Kind(egv1a1.KindEnvoyProxy), Name: epName, Namespace: gatewayapi.NamespacePtr(testNs), } @@ -222,7 +221,7 @@ func testGatewayClassWithParamRef(ctx context.Context, t *testing.T, provider *P func testGatewayScheduledStatus(ctx context.Context, t *testing.T, provider *Provider, resources *message.ProviderResources) { cli := provider.manager.GetClient() - gc := test.GetGatewayClass("gc-scheduled-status-test", egcfgv1a1.GatewayControllerName) + gc := test.GetGatewayClass("gc-scheduled-status-test", egv1a1.GatewayControllerName) require.NoError(t, cli.Create(ctx, gc)) // Ensure the GatewayClass reports "Ready". @@ -375,7 +374,7 @@ func testGatewayScheduledStatus(ctx context.Context, t *testing.T, provider *Pro func testLongNameHashedResources(ctx context.Context, t *testing.T, provider *Provider, resources *message.ProviderResources) { cli := provider.manager.GetClient() - gc := test.GetGatewayClass("envoy-gateway-class", egcfgv1a1.GatewayControllerName) + gc := test.GetGatewayClass("envoy-gateway-class", egv1a1.GatewayControllerName) require.NoError(t, cli.Create(ctx, gc)) // Ensure the GatewayClass reports "Ready". @@ -477,7 +476,7 @@ func testLongNameHashedResources(ctx context.Context, t *testing.T, provider *Pr func testRateLimitFilter(ctx context.Context, t *testing.T, provider *Provider, resources *message.ProviderResources) { cli := provider.manager.GetClient() - gc := test.GetGatewayClass("ratelimit-test", egcfgv1a1.GatewayControllerName) + gc := test.GetGatewayClass("ratelimit-test", egv1a1.GatewayControllerName) require.NoError(t, cli.Create(ctx, gc)) // Ensure the GatewayClass reports ready. @@ -653,7 +652,7 @@ func testRateLimitFilter(ctx context.Context, t *testing.T, provider *Provider, func testAuthenFilter(ctx context.Context, t *testing.T, provider *Provider, resources *message.ProviderResources) { cli := provider.manager.GetClient() - gc := test.GetGatewayClass("authen-test", egcfgv1a1.GatewayControllerName) + gc := test.GetGatewayClass("authen-test", egv1a1.GatewayControllerName) require.NoError(t, cli.Create(ctx, gc)) // Ensure the GatewayClass reports ready. @@ -829,7 +828,7 @@ func testAuthenFilter(ctx context.Context, t *testing.T, provider *Provider, res func testHTTPRoute(ctx context.Context, t *testing.T, provider *Provider, resources *message.ProviderResources) { cli := provider.manager.GetClient() - gc := test.GetGatewayClass("httproute-test", egcfgv1a1.GatewayControllerName) + gc := test.GetGatewayClass("httproute-test", egv1a1.GatewayControllerName) require.NoError(t, cli.Create(ctx, gc)) // Ensure the GatewayClass reports ready. @@ -1396,7 +1395,7 @@ func testHTTPRoute(ctx context.Context, t *testing.T, provider *Provider, resour func testTLSRoute(ctx context.Context, t *testing.T, provider *Provider, resources *message.ProviderResources) { cli := provider.manager.GetClient() - gc := test.GetGatewayClass("tlsroute-test", egcfgv1a1.GatewayControllerName) + gc := test.GetGatewayClass("tlsroute-test", egv1a1.GatewayControllerName) require.NoError(t, cli.Create(ctx, gc)) defer func() { @@ -1537,7 +1536,7 @@ func testTLSRoute(ctx context.Context, t *testing.T, provider *Provider, resourc func testServiceCleanupForMultipleRoutes(ctx context.Context, t *testing.T, provider *Provider, resources *message.ProviderResources) { cli := provider.manager.GetClient() - gc := test.GetGatewayClass("service-cleanup-test", egcfgv1a1.GatewayControllerName) + gc := test.GetGatewayClass("service-cleanup-test", egv1a1.GatewayControllerName) require.NoError(t, cli.Create(ctx, gc)) defer func() { require.NoError(t, cli.Delete(ctx, gc)) @@ -1692,9 +1691,9 @@ func TestNamespacedProvider(t *testing.T) { svr, err := config.New() require.NoError(t, err) // config to watch a subset of namespaces - svr.EnvoyGateway.Provider.Kubernetes = &egcfgv1a1.EnvoyGatewayKubernetesProvider{ - Watch: &egcfgv1a1.KubernetesWatchMode{ - Type: egcfgv1a1.KubernetesWatchModeTypeNamespaces, + svr.EnvoyGateway.Provider.Kubernetes = &egv1a1.EnvoyGatewayKubernetesProvider{ + Watch: &egv1a1.KubernetesWatchMode{ + Type: egv1a1.KubernetesWatchModeTypeNamespaces, Namespaces: []string{"ns1", "ns2"}, }, } @@ -1713,7 +1712,7 @@ func TestNamespacedProvider(t *testing.T) { cli := provider.manager.GetClient() gcName := "gc-watch-ns" - gc := test.GetGatewayClass(gcName, egcfgv1a1.GatewayControllerName) + gc := test.GetGatewayClass(gcName, egv1a1.GatewayControllerName) require.NoError(t, cli.Create(ctx, gc)) // Create the namespaces. @@ -1753,9 +1752,9 @@ func TestNamespaceSelectorsProvider(t *testing.T) { svr, err := config.New() require.NoError(t, err) // config to watch a subset of namespaces - svr.EnvoyGateway.Provider.Kubernetes = &egcfgv1a1.EnvoyGatewayKubernetesProvider{ - Watch: &egcfgv1a1.KubernetesWatchMode{ - Type: egcfgv1a1.KubernetesWatchModeTypeNamespaceSelectors, + svr.EnvoyGateway.Provider.Kubernetes = &egv1a1.EnvoyGatewayKubernetesProvider{ + Watch: &egv1a1.KubernetesWatchMode{ + Type: egv1a1.KubernetesWatchModeTypeNamespaceSelectors, NamespaceSelectors: []string{"label-1", "label-2"}, }, } @@ -1784,7 +1783,7 @@ func TestNamespaceSelectorsProvider(t *testing.T) { require.NoError(t, cli.Create(ctx, nonWatchedNS)) gcName := "gc-name" - gc := test.GetGatewayClass(gcName, egcfgv1a1.GatewayControllerName) + gc := test.GetGatewayClass(gcName, egv1a1.GatewayControllerName) require.NoError(t, cli.Create(ctx, gc)) require.Eventually(t, func() bool { diff --git a/internal/provider/kubernetes/predicates_test.go b/internal/provider/kubernetes/predicates_test.go index a716c39a0af..6d156f083ed 100644 --- a/internal/provider/kubernetes/predicates_test.go +++ b/internal/provider/kubernetes/predicates_test.go @@ -17,7 +17,7 @@ import ( gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" - "github.com/envoyproxy/gateway/api/config/v1alpha1" + "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/envoygateway" "github.com/envoyproxy/gateway/internal/gatewayapi" "github.com/envoyproxy/gateway/internal/logging" diff --git a/internal/provider/kubernetes/routes_test.go b/internal/provider/kubernetes/routes_test.go index efe6084f40e..6d29eb9d096 100644 --- a/internal/provider/kubernetes/routes_test.go +++ b/internal/provider/kubernetes/routes_test.go @@ -21,7 +21,6 @@ import ( gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" - cfgv1a1 "github.com/envoyproxy/gateway/api/config/v1alpha1" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/envoygateway" "github.com/envoyproxy/gateway/internal/gatewayapi" @@ -32,7 +31,7 @@ import ( func TestProcessHTTPRoutes(t *testing.T) { // The gatewayclass configured for the reconciler and referenced by test cases. - gcCtrlName := gwapiv1b1.GatewayController(cfgv1a1.GatewayControllerName) + gcCtrlName := gwapiv1b1.GatewayController(egv1a1.GatewayControllerName) gc := &gwapiv1b1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test", @@ -479,7 +478,7 @@ func TestProcessHTTPRoutes(t *testing.T) { objs := []client.Object{gc, gw} // Create the reconciler. - logger := logging.DefaultLogger(cfgv1a1.LogLevelInfo) + logger := logging.DefaultLogger(egv1a1.LogLevelInfo) ctx := context.Background() @@ -555,7 +554,7 @@ func TestProcessHTTPRoutes(t *testing.T) { func TestProcessGRPCRoutes(t *testing.T) { // The gatewayclass configured for the reconciler and referenced by test cases. - gcCtrlName := gwapiv1b1.GatewayController(cfgv1a1.GatewayControllerName) + gcCtrlName := gwapiv1b1.GatewayController(egv1a1.GatewayControllerName) gc := &gwapiv1b1.GatewayClass{ ObjectMeta: metav1.ObjectMeta{ Name: "test", @@ -811,7 +810,7 @@ func TestProcessGRPCRoutes(t *testing.T) { objs := []client.Object{gc, gw} // Create the reconciler. - logger := logging.DefaultLogger(cfgv1a1.LogLevelInfo) + logger := logging.DefaultLogger(egv1a1.LogLevelInfo) ctx := context.Background() @@ -918,7 +917,7 @@ func TestValidateHTTPRouteParentRefs(t *testing.T) { Name: "gc1", }, Spec: gwapiv1b1.GatewayClassSpec{ - ControllerName: gwapiv1b1.GatewayController(cfgv1a1.GatewayControllerName), + ControllerName: gwapiv1b1.GatewayController(egv1a1.GatewayControllerName), }, }, }, @@ -1053,7 +1052,7 @@ func TestValidateHTTPRouteParentRefs(t *testing.T) { Name: "gc1", }, Spec: gwapiv1b1.GatewayClassSpec{ - ControllerName: gwapiv1b1.GatewayController(cfgv1a1.GatewayControllerName), + ControllerName: gwapiv1b1.GatewayController(egv1a1.GatewayControllerName), }, }, }, @@ -1139,7 +1138,7 @@ func TestValidateHTTPRouteParentRefs(t *testing.T) { Name: "gc1", }, Spec: gwapiv1b1.GatewayClassSpec{ - ControllerName: gwapiv1b1.GatewayController(cfgv1a1.GatewayControllerName), + ControllerName: gwapiv1b1.GatewayController(egv1a1.GatewayControllerName), }, }, { @@ -1198,7 +1197,7 @@ func TestValidateHTTPRouteParentRefs(t *testing.T) { } // Create the reconciler. - r := &gatewayAPIReconciler{classController: gwapiv1b1.GatewayController(cfgv1a1.GatewayControllerName)} + r := &gatewayAPIReconciler{classController: gwapiv1b1.GatewayController(egv1a1.GatewayControllerName)} ctx := context.Background() for _, tc := range testCases { diff --git a/internal/provider/kubernetes/test/utils.go b/internal/provider/kubernetes/test/utils.go index d5d65f48b7a..eb0653a10d6 100644 --- a/internal/provider/kubernetes/test/utils.go +++ b/internal/provider/kubernetes/test/utils.go @@ -14,7 +14,6 @@ import ( gwapiv1a2 "sigs.k8s.io/gateway-api/apis/v1alpha2" gwapiv1b1 "sigs.k8s.io/gateway-api/apis/v1beta1" - egcfgv1a1 "github.com/envoyproxy/gateway/api/config/v1alpha1" egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/utils/ptr" ) @@ -26,8 +25,8 @@ type ObjectKindNamespacedName struct { } // NewEnvoyProxy returns an EnvoyProxy object with the provided ns/name. -func NewEnvoyProxy(ns, name string) *egcfgv1a1.EnvoyProxy { - return &egcfgv1a1.EnvoyProxy{ +func NewEnvoyProxy(ns, name string) *egv1a1.EnvoyProxy { + return &egv1a1.EnvoyProxy{ ObjectMeta: metav1.ObjectMeta{ Namespace: ns, Name: name, diff --git a/internal/provider/runner/runner.go b/internal/provider/runner/runner.go index 5a6880337bd..d64ce27d7f2 100644 --- a/internal/provider/runner/runner.go +++ b/internal/provider/runner/runner.go @@ -11,7 +11,7 @@ import ( ctrl "sigs.k8s.io/controller-runtime" - "github.com/envoyproxy/gateway/api/config/v1alpha1" + "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/envoygateway/config" "github.com/envoyproxy/gateway/internal/message" "github.com/envoyproxy/gateway/internal/provider/kubernetes" diff --git a/internal/provider/runner/runner_test.go b/internal/provider/runner/runner_test.go index b955b0862c1..d7fcd1092af 100644 --- a/internal/provider/runner/runner_test.go +++ b/internal/provider/runner/runner_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/envoyproxy/gateway/api/config/v1alpha1" + "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/envoygateway/config" "github.com/envoyproxy/gateway/internal/logging" "github.com/envoyproxy/gateway/internal/message" diff --git a/internal/xds/bootstrap/bootstrap.go b/internal/xds/bootstrap/bootstrap.go index c774885ca8f..dc6fe78e48e 100644 --- a/internal/xds/bootstrap/bootstrap.go +++ b/internal/xds/bootstrap/bootstrap.go @@ -14,7 +14,7 @@ import ( "k8s.io/apimachinery/pkg/util/sets" - egcfgv1a1 "github.com/envoyproxy/gateway/api/config/v1alpha1" + egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" ) const ( @@ -120,7 +120,7 @@ func (b *bootstrapConfig) render() error { } // GetRenderedBootstrapConfig renders the bootstrap YAML string -func GetRenderedBootstrapConfig(proxyMetrics *egcfgv1a1.ProxyMetrics) (string, error) { +func GetRenderedBootstrapConfig(proxyMetrics *egv1a1.ProxyMetrics) (string, error) { var ( enablePrometheus bool metricSinks []metricSink @@ -156,11 +156,11 @@ func GetRenderedBootstrapConfig(proxyMetrics *egcfgv1a1.ProxyMetrics) (string, e // Add custom envoy proxy stats for _, match := range proxyMetrics.Matches { switch match.Type { - case egcfgv1a1.Prefix: + case egv1a1.Prefix: StatsMatcher.Prefixs = append(StatsMatcher.Prefixs, match.Value) - case egcfgv1a1.Suffix: + case egv1a1.Suffix: StatsMatcher.Suffixs = append(StatsMatcher.Suffixs, match.Value) - case egcfgv1a1.RegularExpression: + case egv1a1.RegularExpression: StatsMatcher.RegularExpressions = append(StatsMatcher.RegularExpressions, match.Value) } } diff --git a/internal/xds/bootstrap/bootstrap_test.go b/internal/xds/bootstrap/bootstrap_test.go index f4a2a02fe87..bbee8f02026 100644 --- a/internal/xds/bootstrap/bootstrap_test.go +++ b/internal/xds/bootstrap/bootstrap_test.go @@ -13,30 +13,30 @@ import ( "github.com/stretchr/testify/assert" - egcfgv1a1 "github.com/envoyproxy/gateway/api/config/v1alpha1" + egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" ) func TestGetRenderedBootstrapConfig(t *testing.T) { cases := []struct { name string - proxyMetrics *egcfgv1a1.ProxyMetrics + proxyMetrics *egv1a1.ProxyMetrics }{ { name: "default", }, { name: "enable-prometheus", - proxyMetrics: &egcfgv1a1.ProxyMetrics{ - Prometheus: &egcfgv1a1.PrometheusProvider{}, + proxyMetrics: &egv1a1.ProxyMetrics{ + Prometheus: &egv1a1.PrometheusProvider{}, }, }, { name: "otel-metrics", - proxyMetrics: &egcfgv1a1.ProxyMetrics{ - Sinks: []egcfgv1a1.MetricSink{ + proxyMetrics: &egv1a1.ProxyMetrics{ + Sinks: []egv1a1.MetricSink{ { - Type: egcfgv1a1.MetricSinkTypeOpenTelemetry, - OpenTelemetry: &egcfgv1a1.OpenTelemetrySink{ + Type: egv1a1.MetricSinkTypeOpenTelemetry, + OpenTelemetry: &egv1a1.OpenTelemetrySink{ Host: "otel-collector.monitoring.svc", Port: 4317, }, @@ -46,26 +46,26 @@ func TestGetRenderedBootstrapConfig(t *testing.T) { }, { name: "custom-stats-matcher", - proxyMetrics: &egcfgv1a1.ProxyMetrics{ - Matches: []egcfgv1a1.Match{ + proxyMetrics: &egv1a1.ProxyMetrics{ + Matches: []egv1a1.Match{ { - Type: egcfgv1a1.Prefix, + Type: egv1a1.Prefix, Value: "http", }, { - Type: egcfgv1a1.Suffix, + Type: egv1a1.Suffix, Value: "upstream_rq", }, { - Type: egcfgv1a1.RegularExpression, + Type: egv1a1.RegularExpression, Value: "virtual.*", }, { - Type: egcfgv1a1.Prefix, + Type: egv1a1.Prefix, Value: "cluster", }, }, - Prometheus: &egcfgv1a1.PrometheusProvider{}, + Prometheus: &egv1a1.PrometheusProvider{}, }, }, } diff --git a/internal/xds/bootstrap/util.go b/internal/xds/bootstrap/util.go index d41e7ce5dd4..ca0ffbfa3e8 100644 --- a/internal/xds/bootstrap/util.go +++ b/internal/xds/bootstrap/util.go @@ -6,14 +6,14 @@ package bootstrap import ( - egcfgv1a1 "github.com/envoyproxy/gateway/api/config/v1alpha1" + egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" yamlutils "github.com/envoyproxy/gateway/internal/utils/yaml" ) // ApplyBootstrapConfig applies the bootstrap config to the default bootstrap config and return the result config. -func ApplyBootstrapConfig(boostrapConfig *egcfgv1a1.ProxyBootstrap, defaultBootstrap string) (string, error) { +func ApplyBootstrapConfig(boostrapConfig *egv1a1.ProxyBootstrap, defaultBootstrap string) (string, error) { bootstrapType := boostrapConfig.Type - if bootstrapType != nil && *bootstrapType == egcfgv1a1.BootstrapTypeMerge { + if bootstrapType != nil && *bootstrapType == egv1a1.BootstrapTypeMerge { mergedBootstrap, err := yamlutils.MergeYAML(defaultBootstrap, boostrapConfig.Value) if err != nil { return "", err diff --git a/internal/xds/server/runner/runner.go b/internal/xds/server/runner/runner.go index af9117c8841..96ceccd5359 100644 --- a/internal/xds/server/runner/runner.go +++ b/internal/xds/server/runner/runner.go @@ -29,7 +29,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials" - "github.com/envoyproxy/gateway/api/config/v1alpha1" + "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/envoygateway/config" "github.com/envoyproxy/gateway/internal/message" "github.com/envoyproxy/gateway/internal/xds/bootstrap" diff --git a/internal/xds/server/runner/runner_test.go b/internal/xds/server/runner/runner_test.go index c1425a3ffab..6f574e2f9f2 100644 --- a/internal/xds/server/runner/runner_test.go +++ b/internal/xds/server/runner/runner_test.go @@ -22,7 +22,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials" - "github.com/envoyproxy/gateway/api/config/v1alpha1" + "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/envoygateway/config" "github.com/envoyproxy/gateway/internal/logging" "github.com/envoyproxy/gateway/internal/xds/bootstrap" diff --git a/internal/xds/translator/extension.go b/internal/xds/translator/extension.go index 8db90f13498..b8eae0c5f7a 100644 --- a/internal/xds/translator/extension.go +++ b/internal/xds/translator/extension.go @@ -21,7 +21,7 @@ import ( resourcev3 "github.com/envoyproxy/go-control-plane/pkg/resource/v3" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" - "github.com/envoyproxy/gateway/api/config/v1alpha1" + "github.com/envoyproxy/gateway/api/v1alpha1" extensionTypes "github.com/envoyproxy/gateway/internal/extension/types" "github.com/envoyproxy/gateway/internal/ir" "github.com/envoyproxy/gateway/internal/xds/types" diff --git a/internal/xds/translator/runner/runner.go b/internal/xds/translator/runner/runner.go index 484c2f10ea6..9ce7c6232f6 100644 --- a/internal/xds/translator/runner/runner.go +++ b/internal/xds/translator/runner/runner.go @@ -10,7 +10,7 @@ import ( ktypes "k8s.io/apimachinery/pkg/types" - "github.com/envoyproxy/gateway/api/config/v1alpha1" + "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/envoygateway/config" extension "github.com/envoyproxy/gateway/internal/extension/types" "github.com/envoyproxy/gateway/internal/infrastructure/kubernetes/ratelimit" diff --git a/internal/xds/translator/tracing.go b/internal/xds/translator/tracing.go index 28aa3cbd8b1..a95118c2ffd 100644 --- a/internal/xds/translator/tracing.go +++ b/internal/xds/translator/tracing.go @@ -15,7 +15,7 @@ import ( xdstype "github.com/envoyproxy/go-control-plane/envoy/type/v3" "github.com/pkg/errors" - egcfgv1a1 "github.com/envoyproxy/gateway/api/config/v1alpha1" + egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/ir" "github.com/envoyproxy/gateway/internal/utils/protocov" "github.com/envoyproxy/gateway/internal/utils/ptr" @@ -48,7 +48,7 @@ func buildHCMTracing(tracing *ir.Tracing) (*hcm.HttpConnectionManager_Tracing, e // TODO: consider add some default tags for better UX for k, v := range tracing.CustomTags { switch v.Type { - case egcfgv1a1.CustomTagTypeLiteral: + case egv1a1.CustomTagTypeLiteral: tags = append(tags, &tracingtype.CustomTag{ Tag: k, Type: &tracingtype.CustomTag_Literal_{ @@ -57,7 +57,7 @@ func buildHCMTracing(tracing *ir.Tracing) (*hcm.HttpConnectionManager_Tracing, e }, }, }) - case egcfgv1a1.CustomTagTypeEnvironment: + case egv1a1.CustomTagTypeEnvironment: defaultVal := "" if v.Environment.DefaultValue != nil { defaultVal = *v.Environment.DefaultValue @@ -72,7 +72,7 @@ func buildHCMTracing(tracing *ir.Tracing) (*hcm.HttpConnectionManager_Tracing, e }, }, }) - case egcfgv1a1.CustomTagTypeRequestHeader: + case egv1a1.CustomTagTypeRequestHeader: defaultVal := "" if v.RequestHeader.DefaultValue != nil { defaultVal = *v.RequestHeader.DefaultValue diff --git a/internal/xds/translator/translator_test.go b/internal/xds/translator/translator_test.go index 01a876d52bb..83d15580dd8 100644 --- a/internal/xds/translator/translator_test.go +++ b/internal/xds/translator/translator_test.go @@ -21,7 +21,7 @@ import ( metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "sigs.k8s.io/yaml" - "github.com/envoyproxy/gateway/api/config/v1alpha1" + "github.com/envoyproxy/gateway/api/v1alpha1" "github.com/envoyproxy/gateway/internal/extension/testutils" "github.com/envoyproxy/gateway/internal/infrastructure/kubernetes/ratelimit" "github.com/envoyproxy/gateway/internal/ir" diff --git a/test/config/gatewayclass.yaml b/test/config/gatewayclass.yaml index 5f43cb897e0..aed59334ef4 100644 --- a/test/config/gatewayclass.yaml +++ b/test/config/gatewayclass.yaml @@ -5,12 +5,12 @@ metadata: spec: controllerName: gateway.envoyproxy.io/gatewayclass-controller parametersRef: - group: config.gateway.envoyproxy.io + group: gateway.envoyproxy.io kind: EnvoyProxy name: proxy-config namespace: envoy-gateway-system --- -apiVersion: config.gateway.envoyproxy.io/v1alpha1 +apiVersion: gateway.envoyproxy.io/v1alpha1 kind: EnvoyProxy metadata: name: proxy-config diff --git a/tools/hack/docs-headings.sh b/tools/hack/docs-headings.sh index 7311c46092e..2b3aa039da9 100755 --- a/tools/hack/docs-headings.sh +++ b/tools/hack/docs-headings.sh @@ -15,7 +15,7 @@ run::sed() { fi } -files=(docs/latest/api/config_types.md docs/latest/api/extension_types.md) +files=(docs/latest/api/extension_types.md) # Required since Sphinx mst does not link to h4 headings. for file in "${files[@]}" ; do diff --git a/tools/make/docs.mk b/tools/make/docs.mk index 2496cc8c3d9..40f474c6aa0 100644 --- a/tools/make/docs.mk +++ b/tools/make/docs.mk @@ -44,12 +44,6 @@ helm-readme-gen: $(tools/helm-docs) .PHONY: docs-api-gen docs-api-gen: $(tools/crd-ref-docs) - $(tools/crd-ref-docs) \ - --source-path=api/config \ - --config=tools/crd-ref-docs/config.yaml \ - --output-path=docs/latest/api/config_types.md \ - --max-depth 10 \ - --renderer=markdown $(tools/crd-ref-docs) \ --source-path=api/v1alpha1 \ --config=tools/crd-ref-docs/config.yaml \