Skip to content

Commit

Permalink
cherry-pick: commits from main to v0.3.0 (#1027)
Browse files Browse the repository at this point in the history
* fix: incorrect command in release schedule (#973)

* chore: rename release-notes v0.3.0-rc1.yaml to v0.3.0-rc.1.yaml

Signed-off-by: bitliu <bitliu@tencent.com>

* fix: incorrect command in release schedule

Signed-off-by: bitliu <bitliu@tencent.com>

---------

Signed-off-by: bitliu <bitliu@tencent.com>
(cherry picked from commit 7639637)
Signed-off-by: bitliu <bitliu@tencent.com>

* xds: Deprecated http2_protocol_options (#974)

* xds: Deprecated http2_protocol_options

Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
(cherry picked from commit 4a04915)
Signed-off-by: bitliu <bitliu@tencent.com>

* Use HTTP1.1 to connect to upstream jwks endpoint (#977)

Use HTTP1.1 to connec to upstream jwks endpoint

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
(cherry picked from commit 82e7672)
Signed-off-by: bitliu <bitliu@tencent.com>

* Add status in HTTPRoute when Ratelimit is disabled (#982)

* Add status in HTTPRoute when Ratelimit is disabled

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
(cherry picked from commit ebb902b)
Signed-off-by: bitliu <bitliu@tencent.com>

* build(deps): bump actions/deploy-pages from 1.2.3 to 1.2.4 (#984)

Bumps [actions/deploy-pages](https://github.com/actions/deploy-pages) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/actions/deploy-pages/releases)
- [Commits](actions/deploy-pages@v1.2.3...v1.2.4)

---
updated-dependencies:
- dependency-name: actions/deploy-pages
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 1bea44e)
Signed-off-by: bitliu <bitliu@tencent.com>

* build(deps): bump sigs.k8s.io/controller-runtime from 0.14.2 to 0.14.4 (#985)

Bumps [sigs.k8s.io/controller-runtime](https://github.com/kubernetes-sigs/controller-runtime) from 0.14.2 to 0.14.4.
- [Release notes](https://github.com/kubernetes-sigs/controller-runtime/releases)
- [Changelog](https://github.com/kubernetes-sigs/controller-runtime/blob/master/RELEASE.md)
- [Commits](kubernetes-sigs/controller-runtime@v0.14.2...v0.14.4)

---
updated-dependencies:
- dependency-name: sigs.k8s.io/controller-runtime
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit fadc142)
Signed-off-by: bitliu <bitliu@tencent.com>

* fix function names for RL Infra (#976)

The create and delete function names were incorrectly swapped.

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
(cherry picked from commit 265c419)
Signed-off-by: bitliu <bitliu@tencent.com>

* Add docs for GRPCRoute (#969)

* Add docs for GRPCRoute

Fixes: #642

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
(cherry picked from commit 3516d10)
Signed-off-by: bitliu <bitliu@tencent.com>

* align wellknown package (#981)

Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
(cherry picked from commit eec43d2)
Signed-off-by: bitliu <bitliu@tencent.com>

* Plug in rate limit service URL into xds cluster (#983)

* Plug in rate limit service URL into xds cluster

Signed-off-by: Arko Dasgupta <arko@tetrate.io>

* more guardrails

Signed-off-by: Arko Dasgupta <arko@tetrate.io>

* set to grpcPort and pin image

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
(cherry picked from commit 1b26380)
Signed-off-by: bitliu <bitliu@tencent.com>

* Adds JWT Authn User Docs (#991)

Signed-off-by: danehans <daneyonhansen@gmail.com>
(cherry picked from commit 2a431c1)
Signed-off-by: bitliu <bitliu@tencent.com>

* user docs for global rate limit (#989)

* user docs for global rate limit

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
(cherry picked from commit ab47d2e)
Signed-off-by: bitliu <bitliu@tencent.com>

* docs: add ref to global ratelimit (#999)

Signed-off-by: bitliu <bitliu@tencent.com>
(cherry picked from commit 5115330)
Signed-off-by: bitliu <bitliu@tencent.com>

* Update gateway-api to v0.6.1 (#1003)

https://github.com/kubernetes-sigs/gateway-api/releases/tag/v0.6.1

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
(cherry picked from commit d01daec)
Signed-off-by: bitliu <bitliu@tencent.com>

* Add GRPCRoute to SupportedKinds (#990)

Fixes: #950

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
(cherry picked from commit beb6eae)
Signed-off-by: bitliu <bitliu@tencent.com>

* Use `path_separated_prefix` Route match (#1004)

* Use `path_separated_prefix` Route match

We were using `prefix` Route match in xds for
the `PathPrefix` Gateway API match defined here
https://gateway-api.sigs.k8s.io/references/spec/#gateway.networking.k8s.io/v1beta1.HTTPPathMatch

The match translates to a `path_separated_prefix` instead
https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/route/v3/route_components.proto#config-route-v3-routematch

This should fix the `HTTPRouteMatching` conformance test where requests
with `/v2example` should match `/` and not `/v2`

Fixes: #995

Signed-off-by: Arko Dasgupta <arko@tetrate.io>

* rewrite empty match case

Signed-off-by: Arko Dasgupta <arko@tetrate.io>

* use prefix match for `/`

Signed-off-by: Arko Dasgupta <arko@tetrate.io>

---------

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
(cherry picked from commit c26d894)
Signed-off-by: bitliu <bitliu@tencent.com>

* Adds API Docs Tooling (#980)

Signed-off-by: danehans <daneyonhansen@gmail.com>
(cherry picked from commit d5a5b25)
Signed-off-by: bitliu <bitliu@tencent.com>

* Updates API godocs for improved markdown rendering (#1010)

Updates API godocs for improved html rendering

Signed-off-by: danehans <daneyonhansen@gmail.com>
(cherry picked from commit b43574a)
Signed-off-by: bitliu <bitliu@tencent.com>

* chore: bump testdata to gwapi v0.6.1 (#1011)

Signed-off-by: bitliu <bitliu@tencent.com>
(cherry picked from commit f39b025)
Signed-off-by: bitliu <bitliu@tencent.com>

* conformance: enable GatewayClassObservedGenerationBump (#896)

Signed-off-by: bitliu <bitliu@tencent.com>
(cherry picked from commit b668002)
Signed-off-by: bitliu <bitliu@tencent.com>

* Run all conformance tests except redirect tests (#1014)

Redirect tests are failing due to a possible issue
with the way upstream conformance tests have made assumptions
Skipping them for now until below issues are resolved

#992
#993
#994

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
(cherry picked from commit 38a6ddd)
Signed-off-by: bitliu <bitliu@tencent.com>

* remove empty route error check in auth xds logic (#1019)

the Xds translator should not error out when the IR routes
are empty

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
(cherry picked from commit 821b7d5)
Signed-off-by: bitliu <bitliu@tencent.com>

* Removes GatewayObservedGenerationBump and HTTPRouteObservedGenerationBump Tests (#1021)

(cherry picked from commit d016a66)
Signed-off-by: bitliu <bitliu@tencent.com>

* Add Gateway API support doc (#1017)

add gatewayapi support doc

Signed-off-by: AliceProxy <alicewasko@datawire.io>
(cherry picked from commit a33e627)
Signed-off-by: bitliu <bitliu@tencent.com>

* Adds Cherry-Pick Steps to Release Doc (#1018)

Signed-off-by: danehans <daneyonhansen@gmail.com>
(cherry picked from commit 3d8120e)
Signed-off-by: bitliu <bitliu@tencent.com>

* update to validate 1.26 (#1020)

* update to validate 1.26

Signed-off-by: Held, Jarad <jaradheld@gmail.com>

* correct the tag for kubernetes version for comformance tests

Signed-off-by: Held, Jarad <jaradheld@gmail.com>

---------

Signed-off-by: Held, Jarad <jaradheld@gmail.com>
(cherry picked from commit 6bf8617)
Signed-off-by: bitliu <bitliu@tencent.com>

* Bumps Compatibility Matrix for v0.3 (#1002)

Signed-off-by: danehans <daneyonhansen@gmail.com>
(cherry picked from commit d7a2e19)
Signed-off-by: bitliu <bitliu@tencent.com>

* update gateway api support doc (#1022)

* add note about not supported `filters` for `HTTPBackendRef`
* rm `extensionRef` support for `GRPCRoute`
* move the link under docs/latest

Signed-off-by: Arko Dasgupta <arko@tetrate.io>
(cherry picked from commit 9991359)
Signed-off-by: bitliu <bitliu@tencent.com>

* release(v0.3.0): add release notes and release announcement (#1013)

* release(v0.3.0): add release notes and release announcement

Signed-off-by: bitliu <bitliu@tencent.com>

* update

Signed-off-by: bitliu <bitliu@tencent.com>

---------

Signed-off-by: bitliu <bitliu@tencent.com>
(cherry picked from commit e55c15f)
Signed-off-by: bitliu <bitliu@tencent.com>

* release: cut v0.3.0 versioned docs (#1025)

Signed-off-by: bitliu <bitliu@tencent.com>
(cherry picked from commit 5b316b4)
Signed-off-by: bitliu <bitliu@tencent.com>

---------

Signed-off-by: bitliu <bitliu@tencent.com>
Signed-off-by: hejianpeng <hejianpeng2@huawei.com>
Signed-off-by: Arko Dasgupta <arko@tetrate.io>
Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: danehans <daneyonhansen@gmail.com>
Signed-off-by: AliceProxy <alicewasko@datawire.io>
Signed-off-by: Held, Jarad <jaradheld@gmail.com>
Co-authored-by: zirain <hejianpeng2@huawei.com>
Co-authored-by: Arko Dasgupta <arkodg@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daneyon Hansen <daneyonhansen@gmail.com>
Co-authored-by: Alice Wasko <alicewasko@datawire.io>
Co-authored-by: Jarad <76065018+jcheld@users.noreply.github.com>
  • Loading branch information
7 people authored Feb 10, 2023
1 parent ffa4bad commit f735041
Show file tree
Hide file tree
Showing 232 changed files with 8,978 additions and 629 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_and_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
needs: [build]
strategy:
matrix:
version: [ v1.23.6, v1.24.0, v1.25.3 ]
version: [ v1.24.0, v1.25.3, v1.26.0 ]
steps:
- uses: actions/checkout@v3
- uses: ./tools/github-actions/setup-deps
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1.2.3
uses: actions/deploy-pages@v1.2.4
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.3.0-rc.1
v0.3.0
6 changes: 6 additions & 0 deletions api/config/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// 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
11 changes: 11 additions & 0 deletions api/config/v1alpha1/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// 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
17 changes: 8 additions & 9 deletions api/config/v1alpha1/envoygateway_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ const (

//+kubebuilder:object:root=true

// EnvoyGateway is the Schema for the envoygateways API.
// EnvoyGateway is the schema for the envoygateways API.
type EnvoyGateway struct {
metav1.TypeMeta `json:",inline"`

// EnvoyGatewaySpec defines the desired state of Envoy Gateway.
// EnvoyGatewaySpec defines the desired state of EnvoyGateway.
EnvoyGatewaySpec `json:",inline"`
}

Expand All @@ -45,7 +45,7 @@ type EnvoyGatewaySpec struct {
// 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 will not be needed to enable Local Rate limiitng.
// This configuration is unneeded for "Local" rate limiting.
//
// +optional
RateLimit *RateLimit `json:"rateLimit,omitempty"`
Expand All @@ -56,8 +56,7 @@ type Gateway struct {
// 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
// https://gateway-api.sigs.k8s.io/v1alpha2/references/spec/#gateway.networking.k8s.io/v1alpha2.GatewayClass
//
// +optional
ControllerName string `json:"controllerName,omitempty"`
Expand All @@ -66,20 +65,20 @@ type Gateway struct {
// Provider defines the desired configuration of a provider.
// +union
type Provider struct {
// Type is the type of provider to use. Supported types are:
//
// * Kubernetes: A provider that provides runtime configuration via the Kubernetes API.
// Type is the type of provider to use. Supported types are "Kubernetes".
//
// +unionDiscriminator
Type ProviderType `json:"type"`

// Kubernetes defines the configuration of the Kubernetes provider. Kubernetes
// provides runtime configuration via the Kubernetes API.
//
// +optional
Kubernetes *KubernetesProvider `json:"kubernetes,omitempty"`

// File defines the configuration of the File provider. File provides runtime
// configuration defined by one or more files.
// configuration defined by one or more files. This type is not implemented
// until https://github.com/envoyproxy/gateway/issues/1001 is fixed.
//
// +optional
File *FileProvider `json:"file,omitempty"`
Expand Down
27 changes: 15 additions & 12 deletions api/config/v1alpha1/envoyproxy_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ const (
//+kubebuilder:object:root=true
//+kubebuilder:subresource:status

// EnvoyProxy is the Schema for the envoyproxies API
// EnvoyProxy is the schema for the envoyproxies API.
type EnvoyProxy struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec EnvoyProxySpec `json:"spec,omitempty"`
// EnvoyProxySpec defines the desired state of EnvoyProxy.
Spec EnvoyProxySpec `json:"spec,omitempty"`
// EnvoyProxyStatus defines the actual state of EnvoyProxy.
Status EnvoyProxyStatus `json:"status,omitempty"`
}

Expand All @@ -36,7 +38,8 @@ type EnvoyProxySpec struct {
Provider *ResourceProvider `json:"provider,omitempty"`

// Logging defines logging parameters for managed proxies. If unspecified,
// default settings apply.
// default settings apply. This type is not implemented until
// https://github.com/envoyproxy/gateway/issues/280 is fixed.
//
// +kubebuilder:default={level: {system: info}}
Logging ProxyLogging `json:"logging,omitempty"`
Expand All @@ -47,10 +50,7 @@ type EnvoyProxySpec struct {
type ResourceProvider struct {
// 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: Provides infrastructure resources for running the data plane,
// e.g. Envoy proxy.
// optional auxiliary control planes. Supported types are "Kubernetes".
//
// +unionDiscriminator
Type ProviderType `json:"type"`
Expand All @@ -74,7 +74,8 @@ type KubernetesResourceProvider struct {
EnvoyDeployment *KubernetesDeploymentSpec `json:"envoyDeployment,omitempty"`
}

// ProxyLogging defines logging parameters for managed proxies.
// ProxyLogging defines logging parameters for managed proxies. This type is not
// implemented until https://github.com/envoyproxy/gateway/issues/280 is fixed.
type ProxyLogging struct {
// 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 "System: Info".
Expand All @@ -84,7 +85,8 @@ type ProxyLogging struct {
}

// LogComponent defines a component that supports a configured logging level.
//
// This type is not implemented until https://github.com/envoyproxy/gateway/issues/280
// is fixed.
// +kubebuilder:validation:Enum=system;upstream;http;connection;admin;client;filter;main;router;runtime
type LogComponent string

Expand Down Expand Up @@ -121,8 +123,8 @@ const (
LogComponentRuntime LogComponent = "runtime"
)

// LogLevel defines a log level for system logs.
//
// LogLevel defines a log level for system logs. This type is not implemented until
// https://github.com/envoyproxy/gateway/issues/280 is fixed.
// +kubebuilder:validation:Enum=debug;info;error
type LogLevel string

Expand All @@ -137,7 +139,8 @@ const (
LogLevelError LogLevel = "error"
)

// EnvoyProxyStatus defines the observed state of EnvoyProxy
// EnvoyProxyStatus defines the observed state of EnvoyProxy. This type is not implemented
// until https://github.com/envoyproxy/gateway/issues/1007 is fixed.
type EnvoyProxyStatus struct {
// INSERT ADDITIONAL STATUS FIELDS - define observed state of cluster.
// Important: Run "make" to regenerate code after modifying this file.
Expand Down
4 changes: 0 additions & 4 deletions api/config/v1alpha1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
// 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 v1alpha1 API group.
//
// +kubebuilder:object:generate=true
// +groupName=config.gateway.envoyproxy.io
package v1alpha1

import (
Expand Down
3 changes: 2 additions & 1 deletion api/config/v1alpha1/shared_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ const (
// ProviderTypeKubernetes defines the "Kubernetes" provider.
ProviderTypeKubernetes ProviderType = "Kubernetes"

// ProviderTypeFile defines the "File" provider.
// ProviderTypeFile defines the "File" provider. This type is not implemented
// until https://github.com/envoyproxy/gateway/issues/1001 is fixed.
ProviderTypeFile ProviderType = "File"
)

Expand Down
6 changes: 6 additions & 0 deletions api/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// 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 api
44 changes: 12 additions & 32 deletions api/v1alpha1/authenticationfilter_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,16 @@ type AuthenticationFilter struct {
// AuthenticationFilterSpec defines the desired state of the AuthenticationFilter type.
// +union
type AuthenticationFilterSpec struct {
// Type defines the type of authentication provider to use. Supported provider types are:
//
// * JWT: A provider that uses JSON Web Token (JWT) for authenticating requests.
// Type defines the type of authentication provider to use. Supported provider types
// are "JWT".
//
// +unionDiscriminator
Type AuthenticationFilterType `json:"type"`

// JWT defines the JSON Web Token (JWT) authentication provider type. When multiple
// jwtProviders are specified, the JWT is considered valid if any of the providers
// successfully validate the JWT. For additional details, see:
//
// https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/jwt_authn_filter.html
// successfully validate the JWT. For additional details, see
// https://www.envoyproxy.io/docs/envoy/latest/configuration/http/http_filters/jwt_authn_filter.html.
//
// +kubebuilder:validation:MaxItems=4
// +optional
Expand All @@ -52,7 +50,8 @@ type AuthenticationFilterSpec struct {
type AuthenticationFilterType string

const (
// JwtAuthenticationFilterProviderType is the JWT authentication provider type.
// JwtAuthenticationFilterProviderType is a provider that uses JSON Web Token (JWT)
// for authenticating requests..
JwtAuthenticationFilterProviderType AuthenticationFilterType = "JWT"
)

Expand All @@ -67,33 +66,17 @@ type JwtAuthenticationFilterProvider struct {
Name string `json:"name"`

// Issuer is the principal that issued the JWT and takes the form of a URL or email address.
// For additional details, see:
//
// URL format: https://tools.ietf.org/html/rfc7519#section-4.1.1
// Email format: https://rfc-editor.org/rfc/rfc5322.html
//
// URL Example:
// issuer: https://auth.example.com
//
// Email Example:
// issuer: jdoe@example.com
//
// If not provided, the JWT issuer is not checked.
// 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.
//
// +kubebuilder:validation:MaxLength=253
// +optional
Issuer string `json:"issuer,omitempty"`

// Audiences is a list of JWT audiences allowed to access. For additional details, see:
//
// https://tools.ietf.org/html/rfc7519#section-4.1.3
//
// Example:
// audiences:
// - foo.apps.example.com
// bar.apps.example.com
//
// If not provided, JWT audiences are not checked.
// 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.
//
// +kubebuilder:validation:MaxItems=8
// +optional
Expand All @@ -112,9 +95,6 @@ type RemoteJWKS struct {
// URI is the HTTPS URI to fetch the JWKS. Envoy's system trust bundle is used to
// validate the server certificate.
//
// Example:
// uri: https://www.foo.com/oauth2/v1/certs
//
// +kubebuilder:validation:MinLength=1
// +kubebuilder:validation:MaxLength=253
URI string `json:"uri"`
Expand Down
10 changes: 10 additions & 0 deletions api/v1alpha1/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// 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 gateway.envoyproxy.io API group.
//
// +kubebuilder:object:generate=true
// +groupName=gateway.envoyproxy.io
package v1alpha1
4 changes: 0 additions & 4 deletions api/v1alpha1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
// 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.
//
// +kubebuilder:object:generate=true
// +groupName=gateway.envoyproxy.io
package v1alpha1

import (
Expand Down
41 changes: 19 additions & 22 deletions api/v1alpha1/ratelimitfilter_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,11 @@ type RateLimitFilter struct {
// +union
type RateLimitFilterSpec struct {
// Type decides the scope for the RateLimits.
// Valid RateLimitType values are:
//
// * "Global" - In this mode, the rate limits are applied across all Envoy proxy instances.
// Valid RateLimitType values are "Global".
//
// +unionDiscriminator
Type RateLimitType `json:"type"`
// Global rate limit configuration.
// Global defines global rate limit configuration.
//
// +optional
Global *GlobalRateLimit `json:"global,omitempty"`
Expand All @@ -51,7 +49,7 @@ const (
GlobalRateLimitType RateLimitType = "Global"
)

// GlobalRateLimit defines the global rate limit configuration.
// GlobalRateLimit defines global rate limit configuration.
type GlobalRateLimit struct {
// Rules are a list of RateLimit selectors and limits.
// Each rule and its associated limit is applied
Expand Down Expand Up @@ -116,29 +114,33 @@ type HeaderMatch struct {

// 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.
// Do not set this field when Type="Distinct", implying matching on any/all unique
// values within the header.
//
// +optional
// +kubebuilder:validation:MaxLength=1024
Value *string `json:"value,omitempty"`
}

// HeaderMatchType specifies the semantics of how HTTP header values should be
// compared. Valid HeaderMatchType values are:
//
// - "Exact": Use this type to match the exact value of the Value field against the value of the specified HTTP Header.
// - "RegularExpression": Use this type to match a regular expression against the value of the specified HTTP Header.
// The regex string must adhere to the syntax documented in https://github.com/google/re2/wiki/Syntax.
// - "Distinct": Use this type to match any and all possible unique values encountered in the specified HTTP Header.
// Note that each unique value will receive its own rate limit bucket.
// HeaderMatchType specifies the semantics of how HTTP header values should be compared.
// Valid HeaderMatchType values are "Exact", "RegularExpression", and "Distinct".
//
// +kubebuilder:validation:Enum=Exact;RegularExpression;Distinct
type HeaderMatchType string

// HeaderMatchType constants.
const (
HeaderMatchExact HeaderMatchType = "Exact"
// HeaderMatchExact matches the exact value of the Value field against the value of
// the specified HTTP Header.
HeaderMatchExact HeaderMatchType = "Exact"
// HeaderMatchRegularExpression matches a regular expression against the value of the
// specified HTTP Header. The regex string must adhere to the syntax documented in
// https://github.com/google/re2/wiki/Syntax.
HeaderMatchRegularExpression HeaderMatchType = "RegularExpression"
HeaderMatchDistinct HeaderMatchType = "Distinct"
// HeaderMatchDistinct matches any and all possible unique values encountered in the
// specified HTTP Header. Note that each unique value will receive its own rate limit
// bucket.
HeaderMatchDistinct HeaderMatchType = "Distinct"
)

// RateLimitValue defines the limits for rate limiting.
Expand All @@ -148,12 +150,7 @@ type RateLimitValue struct {
}

// RateLimitUnit specifies the intervals for setting rate limits.
// Valid RateLimitUnit values are:
//
// * "Second"
// * "Minute"
// * "Hour"
// * "Day"
// Valid RateLimitUnit values are "Second", "Minute", "Hour", and "Day".
//
// +kubebuilder:validation:Enum=Second;Minute;Hour;Day
type RateLimitUnit string
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<html>
<head>
<meta http-equiv="refresh" content="0; url=/v0.2.0">
<meta http-equiv="refresh" content="0; url=/v0.3.0">
</head>
</html>
Loading

0 comments on commit f735041

Please sign in to comment.