Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add groups #1367

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 68 additions & 2 deletions api/gloo/gateway/v1/external_options.proto
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ message RouteOptionSpec {
repeated core.skv2.solo.io.PolicyTargetReference target_refs = 5;
}

message ListenerOption {
message ListenerOptionSpec {


// Listener options
Expand All @@ -266,7 +266,7 @@ message ListenerOption {
repeated core.skv2.solo.io.PolicyTargetReferenceWithSectionName target_refs = 3;
}

message HttpListenerOption {
message HttpListenerOptionSpec {


// HttpListener options
Expand Down Expand Up @@ -346,3 +346,69 @@ message RouteOptionStatus {
message RouteOptionNamespacedStatuses {
map<string, RouteOptionStatus> statuses = 1;
}


message ListenerOptionStatus {
enum State {
// Pending status indicates the resource has not yet been validated
Pending = 0;
// Accepted indicates the resource has been validated
Accepted = 1;
// Rejected indicates an invalid configuration by the user
// Rejected resources may be propagated to the xDS server depending on their severity
Rejected = 2;
// Warning indicates a partially invalid configuration by the user
// Resources with Warnings may be partially accepted by a controller, depending on the implementation
Warning = 3;
}
// State is the enum indicating the state of the resource
State state = 1;
// Reason is a description of the error for Rejected resources. If the resource is pending or accepted, this field will be empty
string reason = 2;
// Reference to the reporter who wrote this status
string reported_by = 3;
// Reference to statuses (by resource-ref string: "Kind.Namespace.Name") of subresources of the parent resource
map<string, ListenerOptionStatus> subresource_statuses = 4;

// Opaque details about status results
google.protobuf.Struct details = 5;
}



message ListenerOptionNamespacedStatuses {
map<string, ListenerOptionStatus> statuses = 1;
}


message HttpListenerOptionStatus {
enum State {
// Pending status indicates the resource has not yet been validated
Pending = 0;
// Accepted indicates the resource has been validated
Accepted = 1;
// Rejected indicates an invalid configuration by the user
// Rejected resources may be propagated to the xDS server depending on their severity
Rejected = 2;
// Warning indicates a partially invalid configuration by the user
// Resources with Warnings may be partially accepted by a controller, depending on the implementation
Warning = 3;
}
// State is the enum indicating the state of the resource
State state = 1;
// Reason is a description of the error for Rejected resources. If the resource is pending or accepted, this field will be empty
string reason = 2;
// Reference to the reporter who wrote this status
string reported_by = 3;
// Reference to statuses (by resource-ref string: "Kind.Namespace.Name") of subresources of the parent resource
map<string, HttpListenerOptionStatus> subresource_statuses = 4;

// Opaque details about status results
google.protobuf.Struct details = 5;
}



message HttpListenerOptionNamespacedStatuses {
map<string, HttpListenerOptionStatus> statuses = 1;
}
35 changes: 34 additions & 1 deletion api/gloo/gateway/v1/gateway.proto
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ message GatewaySpec {
gloo.solo.io.RouteConfigurationOptions route_options = 13;
}

message TcpGateway {
message TcpGatewaySpec {
// TCP hosts that the gateway can route to
repeated gloo.solo.io.TcpHost tcp_hosts = 1;
// TCP Gateway configuration
Expand Down Expand Up @@ -217,3 +217,36 @@ message GatewayStatus {
message GatewayNamespacedStatuses {
map<string, GatewayStatus> statuses = 1;
}


message TcpGatewayStatus {
enum State {
// Pending status indicates the resource has not yet been validated
Pending = 0;
// Accepted indicates the resource has been validated
Accepted = 1;
// Rejected indicates an invalid configuration by the user
// Rejected resources may be propagated to the xDS server depending on their severity
Rejected = 2;
// Warning indicates a partially invalid configuration by the user
// Resources with Warnings may be partially accepted by a controller, depending on the implementation
Warning = 3;
}
// State is the enum indicating the state of the resource
State state = 1;
// Reason is a description of the error for Rejected resources. If the resource is pending or accepted, this field will be empty
string reason = 2;
// Reference to the reporter who wrote this status
string reported_by = 3;
// Reference to statuses (by resource-ref string: "Kind.Namespace.Name") of subresources of the parent resource
map<string, TcpGatewayStatus> subresource_statuses = 4;

// Opaque details about status results
google.protobuf.Struct details = 5;
}



message TcpGatewayNamespacedStatuses {
map<string, TcpGatewayStatus> statuses = 1;
}
37 changes: 35 additions & 2 deletions api/gloo/gateway/v1/http_gateway.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ syntax = "proto3";
package gateway.solo.io;
option go_package = "github.com/solo-io/solo-apis/pkg/api/gateway.solo.io/v1";

import "google/protobuf/struct.proto";
import "extproto/ext.proto";
option (extproto.equal_all) = true;
option (extproto.hash_all) = true;
Expand All @@ -12,7 +13,7 @@ import "github.com/solo-io/solo-kit/api/v1/ref.proto";
import "github.com/solo-io/solo-apis/api/gloo/gloo/v1/proxy.proto";
import "github.com/solo-io/solo-apis/api/gloo/gloo/v1/http_listener_options.proto";

message HttpGateway {
message HttpGatewaySpec {
// Names & namespace refs of the virtual services which contain the actual routes for the gateway.
// If the list is empty, all virtual services in all namespaces that Gloo watches will apply,
// with accordance to `ssl` flag on `Gateway` above.
Expand Down Expand Up @@ -87,4 +88,36 @@ message VirtualServiceSelectorExpressions {
// Expressions allow for more flexible virtual service label matching, such as equality-based requirements, set-based requirements, or a combination of both.
// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#equality-based-requirement
repeated Expression expressions = 3;
}
}

message HttpGatewayStatus {
enum State {
// Pending status indicates the resource has not yet been validated
Pending = 0;
// Accepted indicates the resource has been validated
Accepted = 1;
// Rejected indicates an invalid configuration by the user
// Rejected resources may be propagated to the xDS server depending on their severity
Rejected = 2;
// Warning indicates a partially invalid configuration by the user
// Resources with Warnings may be partially accepted by a controller, depending on the implementation
Warning = 3;
}
// State is the enum indicating the state of the resource
State state = 1;
// Reason is a description of the error for Rejected resources. If the resource is pending or accepted, this field will be empty
string reason = 2;
// Reference to the reporter who wrote this status
string reported_by = 3;
// Reference to statuses (by resource-ref string: "Kind.Namespace.Name") of subresources of the parent resource
map<string, HttpGatewayStatus> subresource_statuses = 4;

// Opaque details about status results
google.protobuf.Struct details = 5;
}



message HttpGatewayNamespacedStatuses {
map<string, HttpGatewayStatus> statuses = 1;
}
6 changes: 5 additions & 1 deletion codegen/gloo.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,16 @@ func GlooGroups() []model.Group {
}, GlooCustomTemplates),
makeGroup("gateway", "v1", []resourceToGenerate{
{kind: "Gateway"},
{kind: "HttpGateway"},
{kind: "HttpListenerOption"},
{kind: "ListenerOption"},
{kind: "MatchableHttpGateway"},
{kind: "MatchableTcpGateway"},
{kind: "RouteOption"},
{kind: "RouteTable"},
{kind: "TcpGateway"},
{kind: "VirtualService"},
{kind: "VirtualHostOption"},
{kind: "RouteOption"},
}, GlooCustomTemplates),
makeGroup("enterprise.gloo", "v1", []resourceToGenerate{
{
Expand Down
Loading