diff --git a/api/v1alpha1/envoygateway_types.go b/api/v1alpha1/envoygateway_types.go index 6d6caa68e4..586b4f49bd 100644 --- a/api/v1alpha1/envoygateway_types.go +++ b/api/v1alpha1/envoygateway_types.go @@ -93,6 +93,28 @@ type EnvoyGatewaySpec struct { // // +optional ExtensionAPIs *ExtensionAPISettings `json:"extensionApis,omitempty"` + + // RuntimeFlags defines the runtime flags for Envoy Gateway. + // Unlike ExtensionAPIs, these flags are temporary and will be removed in future releases once the related features are stable. + RuntimeFlags *RuntimeFlags `json:"runtimeFlags,omitempty"` +} + +// RuntimeFlag defines a runtime flag used to guard breaking changes or risky experimental features in new Envoy Gateway releases. +// A runtime flag may be enabled or disabled by default and can be toggled through the EnvoyGateway resource. +type RuntimeFlag string + +const ( + // UseAddressAsListenerName indicates that the listener name should be derived from the address and port. + UseAddressAsListenerName RuntimeFlag = "UseAddressAsListenerName" +) + +// RuntimeFlags provide a mechanism to guard breaking changes or risky experimental features in new Envoy Gateway releases. +// Each flag may be enabled or disabled by default and can be toggled through the EnvoyGateway resource. +// The names of these flags will be included in the release notes alongside an explanation of the change. +// Please note that these flags are temporary and will be removed in future releases once the related features are stable. +type RuntimeFlags struct { + Enabled []RuntimeFlag `json:"enabled,omitempty"` + Disabled []RuntimeFlag `json:"disabled,omitempty"` } type KubernetesClient struct { diff --git a/api/v1alpha1/zz_generated.deepcopy.go b/api/v1alpha1/zz_generated.deepcopy.go index 7257d8f0b8..72bffbdfac 100644 --- a/api/v1alpha1/zz_generated.deepcopy.go +++ b/api/v1alpha1/zz_generated.deepcopy.go @@ -2092,6 +2092,11 @@ func (in *EnvoyGatewaySpec) DeepCopyInto(out *EnvoyGatewaySpec) { *out = new(ExtensionAPISettings) **out = **in } + if in.RuntimeFlags != nil { + in, out := &in.RuntimeFlags, &out.RuntimeFlags + *out = new(RuntimeFlags) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvoyGatewaySpec. @@ -6007,6 +6012,31 @@ func (in *RouteTranslationConfig) DeepCopy() *RouteTranslationConfig { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RuntimeFlags) DeepCopyInto(out *RuntimeFlags) { + *out = *in + if in.Enabled != nil { + in, out := &in.Enabled, &out.Enabled + *out = make([]RuntimeFlag, len(*in)) + copy(*out, *in) + } + if in.Disabled != nil { + in, out := &in.Disabled, &out.Disabled + *out = make([]RuntimeFlag, len(*in)) + copy(*out, *in) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RuntimeFlags. +func (in *RuntimeFlags) DeepCopy() *RuntimeFlags { + if in == nil { + return nil + } + out := new(RuntimeFlags) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *SecretTranslationConfig) DeepCopyInto(out *SecretTranslationConfig) { *out = *in diff --git a/site/content/en/latest/api/extension_types.md b/site/content/en/latest/api/extension_types.md index 85a5bddb6a..4fb4c19403 100644 --- a/site/content/en/latest/api/extension_types.md +++ b/site/content/en/latest/api/extension_types.md @@ -1216,6 +1216,7 @@ EnvoyGateway is the schema for the envoygateways API. | `rateLimit` | _[RateLimit](#ratelimit)_ | false | | 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)_ | false | | ExtensionManager defines an extension manager to register for the Envoy Gateway Control Plane. | | `extensionApis` | _[ExtensionAPISettings](#extensionapisettings)_ | false | | ExtensionAPIs defines the settings related to specific Gateway API Extensions
implemented by Envoy Gateway | +| `runtimeFlags` | _[RuntimeFlags](#runtimeflags)_ | true | | RuntimeFlags defines the runtime flags for Envoy Gateway.
Unlike ExtensionAPIs, these flags are temporary and will be removed in future releases once the related features are stable. | #### EnvoyGatewayAdmin @@ -1475,6 +1476,7 @@ _Appears in:_ | `rateLimit` | _[RateLimit](#ratelimit)_ | false | | 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)_ | false | | ExtensionManager defines an extension manager to register for the Envoy Gateway Control Plane. | | `extensionApis` | _[ExtensionAPISettings](#extensionapisettings)_ | false | | ExtensionAPIs defines the settings related to specific Gateway API Extensions
implemented by Envoy Gateway | +| `runtimeFlags` | _[RuntimeFlags](#runtimeflags)_ | true | | RuntimeFlags defines the runtime flags for Envoy Gateway.
Unlike ExtensionAPIs, these flags are temporary and will be removed in future releases once the related features are stable. | #### EnvoyGatewayTelemetry @@ -4426,6 +4428,40 @@ _Appears in:_ | `Endpoint` | EndpointRoutingType is the RoutingType for Endpoint routing.
| +#### RuntimeFlag + +_Underlying type:_ _string_ + +RuntimeFlag defines a runtime flag used to guard breaking changes or risky experimental features in new Envoy Gateway releases. +A runtime flag may be enabled or disabled by default and can be toggled through the EnvoyGateway resource. + +_Appears in:_ +- [RuntimeFlags](#runtimeflags) + +| Value | Description | +| ----- | ----------- | +| `UseAddressAsListenerName` | UseAddressAsListenerName indicates that the listener name should be derived from the address and port.
| + + +#### RuntimeFlags + + + +RuntimeFlags provide a mechanism to guard breaking changes or risky experimental features in new Envoy Gateway releases. +Each flag may be enabled or disabled by default and can be toggled through the EnvoyGateway resource. +The names of these flags will be included in the release notes alongside an explanation of the change. +Please note that these flags are temporary and will be removed in future releases once the related features are stable. + +_Appears in:_ +- [EnvoyGateway](#envoygateway) +- [EnvoyGatewaySpec](#envoygatewayspec) + +| Field | Type | Required | Default | Description | +| --- | --- | --- | --- | --- | +| `enabled` | _[RuntimeFlag](#runtimeflag) array_ | true | | | +| `disabled` | _[RuntimeFlag](#runtimeflag) array_ | true | | | + + #### SecretTranslationConfig