Skip to content

Commit d5a5b25

Browse files
authored
Adds API Docs Tooling (#980)
Signed-off-by: danehans <[email protected]>
1 parent c26d894 commit d5a5b25

File tree

19 files changed

+860
-18
lines changed

19 files changed

+860
-18
lines changed

api/config/doc.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Copyright Envoy Gateway Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
// The full text of the Apache license is available in the LICENSE file at
4+
// the root of the repo.
5+
6+
package config

api/config/v1alpha1/doc.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Copyright Envoy Gateway Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
// The full text of the Apache license is available in the LICENSE file at
4+
// the root of the repo.
5+
6+
// Package v1alpha1 contains API Schema definitions for the config.gateway.envoyproxy.io
7+
// API group.
8+
//
9+
// +kubebuilder:object:generate=true
10+
// +groupName=config.gateway.envoyproxy.io
11+
package v1alpha1

api/config/v1alpha1/groupversion_info.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
// The full text of the Apache license is available in the LICENSE file at
44
// the root of the repo.
55

6-
// Package v1alpha1 contains API Schema definitions for the config v1alpha1 API group.
7-
//
8-
// +kubebuilder:object:generate=true
9-
// +groupName=config.gateway.envoyproxy.io
106
package v1alpha1
117

128
import (

api/doc.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Copyright Envoy Gateway Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
// The full text of the Apache license is available in the LICENSE file at
4+
// the root of the repo.
5+
6+
package api

api/v1alpha1/doc.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// Copyright Envoy Gateway Authors
2+
// SPDX-License-Identifier: Apache-2.0
3+
// The full text of the Apache license is available in the LICENSE file at
4+
// the root of the repo.
5+
6+
// Package v1alpha1 contains API Schema definitions for the gateway.envoyproxy.io API group.
7+
//
8+
// +kubebuilder:object:generate=true
9+
// +groupName=gateway.envoyproxy.io
10+
package v1alpha1

api/v1alpha1/groupversion_info.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
// The full text of the Apache license is available in the LICENSE file at
44
// the root of the repo.
55

6-
// Package v1alpha1 contains API Schema definitions for the gateway.envoyproxy.io API group.
7-
//
8-
// +kubebuilder:object:generate=true
9-
// +groupName=gateway.envoyproxy.io
106
package v1alpha1
117

128
import (

api/v1alpha1/ratelimitfilter_types.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,7 @@ type RateLimitValue struct {
148148
}
149149

150150
// RateLimitUnit specifies the intervals for setting rate limits.
151-
// Valid RateLimitUnit values are:
152-
//
153-
// * "Second"
154-
// * "Minute"
155-
// * "Hour"
156-
// * "Day"
151+
// Valid RateLimitUnit values are "Second", "Minute", "Hour", and "Day".
157152
//
158153
// +kubebuilder:validation:Enum=Second;Minute;Hour;Day
159154
type RateLimitUnit string

docs/latest/api/config_types.md

Lines changed: 282 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,282 @@
1+
# API Reference
2+
3+
## Packages
4+
- [config.gateway.envoyproxy.io/v1alpha1](#configgatewayenvoyproxyiov1alpha1)
5+
6+
7+
## config.gateway.envoyproxy.io/v1alpha1
8+
9+
Package v1alpha1 contains API Schema definitions for the config.gateway.envoyproxy.io
10+
API group.
11+
12+
13+
### Resource Types
14+
- [EnvoyGateway](#envoygateway)
15+
- [EnvoyProxy](#envoyproxy)
16+
17+
18+
19+
## EnvoyGateway
20+
21+
22+
23+
EnvoyGateway is the Schema for the envoygateways API.
24+
25+
26+
27+
| Field | Description |
28+
| --- | --- |
29+
| `apiVersion` _string_ | `config.gateway.envoyproxy.io/v1alpha1`
30+
| `kind` _string_ | `EnvoyGateway`
31+
| `EnvoyGatewaySpec` _[EnvoyGatewaySpec](#envoygatewayspec)_ | EnvoyGatewaySpec defines the desired state of Envoy Gateway. |
32+
33+
34+
## EnvoyGatewaySpec
35+
36+
37+
38+
EnvoyGatewaySpec defines the desired state of Envoy Gateway.
39+
40+
_Appears in:_
41+
- [EnvoyGateway](#envoygateway)
42+
43+
| Field | Description |
44+
| --- | --- |
45+
| `gateway` _[Gateway](#gateway)_ | Gateway defines desired Gateway API specific configuration. If unset, default configuration parameters will apply. |
46+
| `provider` _[Provider](#provider)_ | Provider defines the desired provider and provider-specific configuration. If unspecified, the Kubernetes provider is used with default configuration parameters. |
47+
| `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 will not be needed to enable Local Rate limiitng. |
48+
49+
50+
## EnvoyProxy
51+
52+
53+
54+
EnvoyProxy is the Schema for the envoyproxies API
55+
56+
57+
58+
| Field | Description |
59+
| --- | --- |
60+
| `apiVersion` _string_ | `config.gateway.envoyproxy.io/v1alpha1`
61+
| `kind` _string_ | `EnvoyProxy`
62+
| `metadata` _[ObjectMeta](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#objectmeta-v1-meta)_ | Refer to Kubernetes API documentation for fields of `metadata`. |
63+
| `spec` _[EnvoyProxySpec](#envoyproxyspec)_ | |
64+
65+
66+
## EnvoyProxySpec
67+
68+
69+
70+
EnvoyProxySpec defines the desired state of EnvoyProxy.
71+
72+
_Appears in:_
73+
- [EnvoyProxy](#envoyproxy)
74+
75+
| Field | Description |
76+
| --- | --- |
77+
| `provider` _[ResourceProvider](#resourceprovider)_ | Provider defines the desired resource provider and provider-specific configuration. If unspecified, the "Kubernetes" resource provider is used with default configuration parameters. |
78+
| `logging` _[ProxyLogging](#proxylogging)_ | Logging defines logging parameters for managed proxies. If unspecified, default settings apply. |
79+
80+
81+
82+
83+
## FileProvider
84+
85+
86+
87+
FileProvider defines configuration for the File provider.
88+
89+
_Appears in:_
90+
- [Provider](#provider)
91+
92+
93+
94+
## Gateway
95+
96+
97+
98+
Gateway defines the desired Gateway API configuration of Envoy Gateway.
99+
100+
_Appears in:_
101+
- [EnvoyGatewaySpec](#envoygatewayspec)
102+
103+
| Field | Description |
104+
| --- | --- |
105+
| `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:
106+
https://gateway-api.sigs.k8s.io/v1alpha2/references/spec/#gateway.networking.k8s.io/v1alpha2.GatewayClass |
107+
108+
109+
## KubernetesDeploymentSpec
110+
111+
112+
113+
KubernetesDeploymentSpec defines the desired state of the Kubernetes deployment resource.
114+
115+
_Appears in:_
116+
- [KubernetesResourceProvider](#kubernetesresourceprovider)
117+
118+
| Field | Description |
119+
| --- | --- |
120+
| `replicas` _integer_ | Replicas is the number of desired pods. Defaults to 1. |
121+
122+
123+
## KubernetesProvider
124+
125+
126+
127+
KubernetesProvider defines configuration for the Kubernetes provider.
128+
129+
_Appears in:_
130+
- [Provider](#provider)
131+
132+
133+
134+
## KubernetesResourceProvider
135+
136+
137+
138+
KubernetesResourceProvider defines configuration for the Kubernetes resource provider.
139+
140+
_Appears in:_
141+
- [ResourceProvider](#resourceprovider)
142+
143+
| Field | Description |
144+
| --- | --- |
145+
| `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. |
146+
147+
148+
## LogComponent
149+
150+
_Underlying type:_ `string`
151+
152+
LogComponent defines a component that supports a configured logging level.
153+
154+
_Appears in:_
155+
- [ProxyLogging](#proxylogging)
156+
157+
158+
159+
## LogLevel
160+
161+
_Underlying type:_ `string`
162+
163+
LogLevel defines a log level for system logs.
164+
165+
_Appears in:_
166+
- [ProxyLogging](#proxylogging)
167+
168+
169+
170+
## Provider
171+
172+
173+
174+
Provider defines the desired configuration of a provider.
175+
176+
_Appears in:_
177+
- [EnvoyGatewaySpec](#envoygatewayspec)
178+
179+
| Field | Description |
180+
| --- | --- |
181+
| `type` _[ProviderType](#providertype)_ | Type is the type of provider to use. Supported types are:
182+
* Kubernetes: A provider that provides runtime configuration via the Kubernetes API. |
183+
| `kubernetes` _[KubernetesProvider](#kubernetesprovider)_ | Kubernetes defines the configuration of the Kubernetes provider. Kubernetes provides runtime configuration via the Kubernetes API. |
184+
| `file` _[FileProvider](#fileprovider)_ | File defines the configuration of the File provider. File provides runtime configuration defined by one or more files. |
185+
186+
187+
## ProviderType
188+
189+
_Underlying type:_ `string`
190+
191+
ProviderType defines the types of providers supported by Envoy Gateway.
192+
193+
_Appears in:_
194+
- [Provider](#provider)
195+
- [ResourceProvider](#resourceprovider)
196+
197+
198+
199+
## ProxyLogging
200+
201+
202+
203+
ProxyLogging defines logging parameters for managed proxies.
204+
205+
_Appears in:_
206+
- [EnvoyProxySpec](#envoyproxyspec)
207+
208+
| Field | Description |
209+
| --- | --- |
210+
| `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 "System: Info". |
211+
212+
213+
## RateLimit
214+
215+
216+
217+
RateLimit defines the configuration associated with the Rate Limit Service used for Global Rate Limiting.
218+
219+
_Appears in:_
220+
- [EnvoyGatewaySpec](#envoygatewayspec)
221+
222+
| Field | Description |
223+
| --- | --- |
224+
| `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. |
225+
226+
227+
## RateLimitDatabaseBackend
228+
229+
230+
231+
RateLimitDatabaseBackend defines the configuration associated with the database backend used by the rate limit service.
232+
233+
_Appears in:_
234+
- [RateLimit](#ratelimit)
235+
236+
| Field | Description |
237+
| --- | --- |
238+
| `type` _[RateLimitDatabaseBackendType](#ratelimitdatabasebackendtype)_ | Type is the type of database backend to use. Supported types are: * Redis: Connects to a Redis database. |
239+
| `redis` _[RateLimitRedisSettings](#ratelimitredissettings)_ | Redis defines the settings needed to connect to a Redis database. |
240+
241+
242+
## RateLimitDatabaseBackendType
243+
244+
_Underlying type:_ `string`
245+
246+
RateLimitDatabaseBackendType specifies the types of database backend to be used by the rate limit service.
247+
248+
_Appears in:_
249+
- [RateLimitDatabaseBackend](#ratelimitdatabasebackend)
250+
251+
252+
253+
## RateLimitRedisSettings
254+
255+
256+
257+
RateLimitRedisSettings defines the configuration for connecting to a Redis database.
258+
259+
_Appears in:_
260+
- [RateLimitDatabaseBackend](#ratelimitdatabasebackend)
261+
262+
| Field | Description |
263+
| --- | --- |
264+
| `url` _string_ | URL of the Redis Database. |
265+
266+
267+
## ResourceProvider
268+
269+
270+
271+
ResourceProvider defines the desired state of a resource provider.
272+
273+
_Appears in:_
274+
- [EnvoyProxySpec](#envoyproxyspec)
275+
276+
| Field | Description |
277+
| --- | --- |
278+
| `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:
279+
* Kubernetes: Provides infrastructure resources for running the data plane, e.g. Envoy proxy. |
280+
| `kubernetes` _[KubernetesResourceProvider](#kubernetesresourceprovider)_ | 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. |
281+
282+

0 commit comments

Comments
 (0)