Skip to content

Commit b566cc4

Browse files
committed
Fix docs
Signed-off-by: Zachary Nixon <nixozach@amazon.com>
1 parent 681b78a commit b566cc4

21 files changed

Lines changed: 283 additions & 133 deletions

File tree

api/v1alpha1/envoygateway_helpers.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ func (e *EnvoyGateway) SetEnvoyGatewayDefaults() {
8989
}
9090
}
9191

92-
func (e *EnvoyGateway) handleProviderDefaults() {}
93-
9492
// GetEnvoyGatewayAdmin returns the EnvoyGatewayAdmin of EnvoyGateway or a default EnvoyGatewayAdmin if unspecified.
9593
func (e *EnvoyGateway) GetEnvoyGatewayAdmin() *EnvoyGatewayAdmin {
9694
if e.Admin != nil {

api/v1alpha1/envoygateway_helpers_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
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+
16
package v1alpha1
27

38
import (

api/v1alpha1/envoygateway_types.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,7 @@ type EnvoyGatewayProvider struct {
353353
Custom *EnvoyGatewayCustomProvider `json:"custom,omitempty"`
354354
}
355355

356+
// EnvoyGatewayKubernetesInfrastructureConfiguration defines configuration for the Kubernetes infrastructure provider.
356357
type EnvoyGatewayKubernetesInfrastructureConfiguration struct {
357358
// RateLimitDeployment defines the desired state of the Envoy ratelimit deployment resource.
358359
// If unspecified, default settings for the managed Envoy ratelimit deployment resource
@@ -386,6 +387,7 @@ type EnvoyGatewayKubernetesInfrastructureConfiguration struct {
386387
TopologyInjector *EnvoyGatewayTopologyInjector `json:"proxyTopologyInjector,omitempty"`
387388
}
388389

390+
// EnvoyGatewayKubernetesConfiguration defines configuration for how Envoy Gateway communicates with the Kubernetes API server.
389391
type EnvoyGatewayKubernetesConfiguration struct {
390392
// Watch holds configuration of which input resources should be watched and reconciled.
391393
// +optional
@@ -493,7 +495,7 @@ type EnvoyGatewayCustomProvider struct {
493495

494496
// ResourceProviderType defines the types of custom resource providers supported by Envoy Gateway.
495497
//
496-
// +kubebuilder:validation:Enum=File,Kubernetes
498+
// +kubebuilder:validation:Enum=File;Kubernetes
497499
type ResourceProviderType string
498500

499501
const (

charts/gateway-crds-helm/templates/generated/gateway.envoyproxy.io_envoyproxies.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11231,11 +11231,24 @@ spec:
1123111231
rule: ((has(self.envoyHpa) && !has(self.envoyDaemonSet)) ||
1123211232
(!has(self.envoyHpa) && has(self.envoyDaemonSet))) || (!has(self.envoyHpa)
1123311233
&& !has(self.envoyDaemonSet))
11234+
remote:
11235+
description: |-
11236+
Remote defers runtime deployment of the data plane to another process.
11237+
If unspecified and type is "Remote", default settings for the custom provider
11238+
are applied.
11239+
properties:
11240+
useListenerPortAsContainerPort:
11241+
description: |-
11242+
UseListenerPortAsContainerPort disables the port shifting feature in the Envoy Proxy.
11243+
When set to false (default value), if the service port is a privileged port (1-1023), add a constant to the value converting it into an ephemeral port.
11244+
This allows the container to bind to the port without needing a CAP_NET_BIND_SERVICE capability.
11245+
type: boolean
11246+
type: object
1123411247
type:
1123511248
description: |-
1123611249
Type is the type of resource provider to use. A resource provider provides
1123711250
infrastructure resources for running the data plane, e.g. Envoy proxy, and
11238-
optional auxiliary control planes. Supported types are "Kubernetes"and "Host".
11251+
optional auxiliary control planes. Supported types are "Kubernetes", "Remote', and "Host".
1123911252
enum:
1124011253
- Kubernetes
1124111254
- Host

charts/gateway-helm/charts/crds/crds/generated/gateway.envoyproxy.io_envoyproxies.yaml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11230,11 +11230,24 @@ spec:
1123011230
rule: ((has(self.envoyHpa) && !has(self.envoyDaemonSet)) ||
1123111231
(!has(self.envoyHpa) && has(self.envoyDaemonSet))) || (!has(self.envoyHpa)
1123211232
&& !has(self.envoyDaemonSet))
11233+
remote:
11234+
description: |-
11235+
Remote defers runtime deployment of the data plane to another process.
11236+
If unspecified and type is "Remote", default settings for the custom provider
11237+
are applied.
11238+
properties:
11239+
useListenerPortAsContainerPort:
11240+
description: |-
11241+
UseListenerPortAsContainerPort disables the port shifting feature in the Envoy Proxy.
11242+
When set to false (default value), if the service port is a privileged port (1-1023), add a constant to the value converting it into an ephemeral port.
11243+
This allows the container to bind to the port without needing a CAP_NET_BIND_SERVICE capability.
11244+
type: boolean
11245+
type: object
1123311246
type:
1123411247
description: |-
1123511248
Type is the type of resource provider to use. A resource provider provides
1123611249
infrastructure resources for running the data plane, e.g. Envoy proxy, and
11237-
optional auxiliary control planes. Supported types are "Kubernetes"and "Host".
11250+
optional auxiliary control planes. Supported types are "Kubernetes", "Remote', and "Host".
1123811251
enum:
1123911252
- Kubernetes
1124011253
- Host

internal/cmd/egctl/translate.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313
"os"
1414
"sort"
1515

16-
"github.com/envoyproxy/gateway/internal/globalratelimit"
1716
adminv3 "github.com/envoyproxy/go-control-plane/envoy/admin/v3"
1817
bootstrapv3 "github.com/envoyproxy/go-control-plane/envoy/config/bootstrap/v3"
1918
resourcev3 "github.com/envoyproxy/go-control-plane/pkg/resource/v3"
@@ -29,6 +28,7 @@ import (
2928
"github.com/envoyproxy/gateway/internal/gatewayapi"
3029
"github.com/envoyproxy/gateway/internal/gatewayapi/resource"
3130
"github.com/envoyproxy/gateway/internal/gatewayapi/status"
31+
"github.com/envoyproxy/gateway/internal/globalratelimit"
3232
"github.com/envoyproxy/gateway/internal/logging"
3333
"github.com/envoyproxy/gateway/internal/xds/bootstrap"
3434
"github.com/envoyproxy/gateway/internal/xds/translator"
@@ -383,7 +383,7 @@ func TranslateGatewayAPIToXds(namespace, dnsDomain, resourceType string, resourc
383383
xTranslator := &translator.Translator{
384384
// Set some default settings for translation
385385
GlobalRateLimit: &translator.GlobalRateLimitSettings{
386-
ServiceURL: globalratelimit.GetRateLimitUrl(nil, namespace, dnsDomain),
386+
ServiceURL: globalratelimit.GetRateLimitURL(nil, namespace, dnsDomain),
387387
},
388388
Logger: logging.DefaultLogger(io.Discard, egv1a1.LogLevelInfo),
389389
}

internal/crypto/certgen.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,9 @@ func GenerateCerts(cfg *config.Server) (*Certificates, error) {
114114
// For custom provider (host mode), use localhost for xDS communication
115115
egDNSNames = []string{"localhost"}
116116
envoyDNSNames = []string{"localhost"}
117-
} else {
118-
// Kubernetes is the only supported Envoy Gateway provider.
117+
}
118+
119+
if len(egDNSNames) == 0 {
119120
return nil, fmt.Errorf("unsupported provider type %v", egProvider)
120121
}
121122

internal/extension/grpc.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
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+
16
package extension
27

38
import (
@@ -12,9 +17,6 @@ import (
1217
"strings"
1318
"time"
1419

15-
egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1"
16-
"github.com/envoyproxy/gateway/internal/kubernetes"
17-
"github.com/envoyproxy/gateway/internal/utils/fraction"
1820
"google.golang.org/grpc"
1921
"google.golang.org/grpc/codes"
2022
"google.golang.org/grpc/credentials"
@@ -25,6 +27,10 @@ import (
2527
"k8s.io/utils/ptr"
2628
k8scli "sigs.k8s.io/controller-runtime/pkg/client"
2729
gwapiv1 "sigs.k8s.io/gateway-api/apis/v1"
30+
31+
egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1"
32+
"github.com/envoyproxy/gateway/internal/kubernetes"
33+
"github.com/envoyproxy/gateway/internal/utils/fraction"
2834
)
2935

3036
const grpcServiceConfigTemplate = `{
@@ -57,7 +63,7 @@ func GetExtensionServerAddress(service *egv1a1.ExtensionService) string {
5763
}
5864

5965
// GenerateGRPCOptions generates the necessary connection descriptors for a GRPC client.
60-
func GenerateGRPCOptions(ctx context.Context, client k8scli.Client, ext *egv1a1.ExtensionService, maxMessageSize *resource.Quantity, svcName string, namespace string) ([]grpc.DialOption, error) {
66+
func GenerateGRPCOptions(ctx context.Context, client k8scli.Client, ext *egv1a1.ExtensionService, maxMessageSize *resource.Quantity, svcName, namespace string) ([]grpc.DialOption, error) {
6167
// These two errors shouldn't happen since we check these conditions when loading the extension
6268
if ext == nil {
6369
return nil, errors.New("the registered extension's config is nil")

internal/extension/grpc_test.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
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+
16
package extension
27

38
import (
@@ -7,12 +12,13 @@ import (
712
"reflect"
813
"testing"
914

10-
egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1"
11-
"github.com/envoyproxy/gateway/internal/envoygateway"
1215
"google.golang.org/grpc"
1316
"k8s.io/apimachinery/pkg/api/resource"
1417
fakeclient "sigs.k8s.io/controller-runtime/pkg/client/fake"
1518
gwapiv1 "sigs.k8s.io/gateway-api/apis/v1"
19+
20+
egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1"
21+
"github.com/envoyproxy/gateway/internal/envoygateway"
1622
)
1723

1824
func Test_GenerateGRPCOptions(t *testing.T) {

internal/extension/registry/extension_manager_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import (
1616
"sync"
1717
"testing"
1818

19-
grpcExtension "github.com/envoyproxy/gateway/internal/extension"
2019
clusterv3 "github.com/envoyproxy/go-control-plane/envoy/config/cluster/v3"
2120
listenerv3 "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3"
2221
routev3 "github.com/envoyproxy/go-control-plane/envoy/config/route/v3"
@@ -36,6 +35,7 @@ import (
3635
egv1a1 "github.com/envoyproxy/gateway/api/v1alpha1"
3736
"github.com/envoyproxy/gateway/internal/envoygateway"
3837
"github.com/envoyproxy/gateway/internal/envoygateway/config"
38+
grpcExtension "github.com/envoyproxy/gateway/internal/extension"
3939
extTypes "github.com/envoyproxy/gateway/internal/extension/types"
4040
"github.com/envoyproxy/gateway/internal/ir"
4141
"github.com/envoyproxy/gateway/proto/extension"

0 commit comments

Comments
 (0)