consul/proto-public/pbmesh/v2beta1/api_gateway.proto
sarahalsmiller 1eca44aef9
NET-7153 Proto messages for API Gateway (#20250)
* API Gateway proto

* fix lint issue

* new line

* run make proto format

* regened with comment

* lint

* utilizie existing TLS struct

* Update proto-public/pbmesh/v2beta1/api_gateway.proto

Co-authored-by: Nathan Coleman <nathan.coleman@hashicorp.com>

* generated file

* Update proto-public/pbmesh/v2beta1/api_gateway.proto

* regen with comment

* format the comment

---------

Co-authored-by: Nathan Coleman <nathan.coleman@hashicorp.com>
2024-01-24 12:10:20 -06:00

55 lines
1.7 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
syntax = "proto3";
package hashicorp.consul.mesh.v2beta1;
import "pbmesh/v2beta1/pbproxystate/transport_socket.proto";
import "pbresource/annotations.proto";
import "pbresource/resource.proto";
message APIGateway {
option (hashicorp.consul.resource.spec) = {scope: SCOPE_NAMESPACE};
// GatewayClassName is the name of the GatewayClass used by the APIGateway
string gateway_class_name = 1;
// +kubebuilder:validation:MinItems=1
repeated APIGatewayListener listeners = 2;
}
message APIGatewayListener {
// Name is the name of the listener in a given gateway. This must be
// unique within a gateway.
string name = 1;
// +kubebuilder:validation:Maximum=65535
// +kubebuilder:validation:Minimum=0
uint32 port = 2;
// Protocol is the protocol that a listener should use, it must
// either be "http" or "tcp"
// +kubebuilder:validation≈ftg6:Enum=tcp,http
string protocol = 3;
// Hostname is the host name that a listener should be bound to, if
// unspecified, the listener accepts requests for all hostnames.
string hostname = 4;
// TLS is the TLS settings for the listener.
APIGatewayTLSConfiguration tls = 5;
//TODO NET-7311 @Gateway-Management
}
// APIGatewayTLSConfiguration specifies the configuration of a listeners
// TLS settings.
message APIGatewayTLSConfiguration {
// Certificates is a set of references to certificates
// that a gateway listener uses for TLS termination.
repeated hashicorp.consul.resource.Reference certificates = 1;
// TLSParameters contains optional configuration for running TLS termination.
optional pbproxystate.TLSParameters tls_parameters = 2;
}