Skip to content

Commit

Permalink
add groups (#1370)
Browse files Browse the repository at this point in the history
  • Loading branch information
puertomontt authored Nov 15, 2024
1 parent a43976b commit 0bb08b0
Show file tree
Hide file tree
Showing 23 changed files with 8,284 additions and 2,920 deletions.
80 changes: 74 additions & 6 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 All @@ -281,7 +281,7 @@ message HttpListenerOption {
}


message VirtualHostOptionStatus {
message HttpListenerOptionStatus {
enum State {
// Pending status indicates the resource has not yet been validated
Pending = 0;
Expand All @@ -301,16 +301,50 @@ message VirtualHostOptionStatus {
// 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, VirtualHostOptionStatus> subresource_statuses = 4;
map<string, HttpListenerOptionStatus> subresource_statuses = 4;

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



message VirtualHostOptionNamespacedStatuses {
map<string, VirtualHostOptionStatus> statuses = 1;
message HttpListenerOptionNamespacedStatuses {
map<string, HttpListenerOptionStatus> 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;
}


Expand Down Expand Up @@ -346,3 +380,37 @@ message RouteOptionStatus {
message RouteOptionNamespacedStatuses {
map<string, RouteOptionStatus> statuses = 1;
}



message VirtualHostOptionStatus {
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, VirtualHostOptionStatus> subresource_statuses = 4;

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



message VirtualHostOptionNamespacedStatuses {
map<string, VirtualHostOptionStatus> statuses = 1;
}
4 changes: 3 additions & 1 deletion codegen/gloo.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ func GlooGroups() []model.Group {
}, GlooCustomTemplates),
makeGroup("gateway", "v1", []resourceToGenerate{
{kind: "Gateway"},
{kind: "HttpListenerOption"},
{kind: "ListenerOption"},
{kind: "MatchableHttpGateway"},
{kind: "MatchableTcpGateway"},
{kind: "RouteOption"},
{kind: "RouteTable"},
{kind: "VirtualService"},
{kind: "VirtualHostOption"},
{kind: "RouteOption"},
}, GlooCustomTemplates),
makeGroup("enterprise.gloo", "v1", []resourceToGenerate{
{
Expand Down
54 changes: 54 additions & 0 deletions crds/gateway.solo.io_crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,60 @@ spec:
subresources:
status: {}

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
labels:
app: ""
app.kubernetes.io/name: ""
name: httplisteneroptions.gateway.solo.io
spec:
group: gateway.solo.io
names:
kind: HttpListenerOption
listKind: HttpListenerOptionList
plural: httplisteneroptions
singular: httplisteneroption
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
type: object
x-kubernetes-preserve-unknown-fields: true
served: true
storage: true
subresources:
status: {}

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
labels:
app: ""
app.kubernetes.io/name: ""
name: listeneroptions.gateway.solo.io
spec:
group: gateway.solo.io
names:
kind: ListenerOption
listKind: ListenerOptionList
plural: listeneroptions
singular: listeneroption
scope: Namespaced
versions:
- name: v1
schema:
openAPIV3Schema:
type: object
x-kubernetes-preserve-unknown-fields: true
served: true
storage: true
subresources:
status: {}

---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
Expand Down
Loading

0 comments on commit 0bb08b0

Please sign in to comment.