From 1e867eb4ea06372f6a4972fe50f9c82337e2248f Mon Sep 17 00:00:00 2001
From: omar <omar.hammami@solo.io>
Date: Fri, 8 Nov 2024 11:56:35 -0600
Subject: [PATCH 1/2] add groups

---
 codegen/gloo.go | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/codegen/gloo.go b/codegen/gloo.go
index f9c7d5ac2..8ba6a2874 100644
--- a/codegen/gloo.go
+++ b/codegen/gloo.go
@@ -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{
 			{

From 4c4fd0ae2224d2cd7253d88444f63c515c472003 Mon Sep 17 00:00:00 2001
From: omar <omar.hammami@solo.io>
Date: Fri, 8 Nov 2024 16:05:57 -0600
Subject: [PATCH 2/2] covert to skv2

---
 api/gloo/gateway/v1/external_options.proto | 70 +++++++++++++++++++++-
 api/gloo/gateway/v1/gateway.proto          | 35 ++++++++++-
 api/gloo/gateway/v1/http_gateway.proto     | 37 +++++++++++-
 3 files changed, 137 insertions(+), 5 deletions(-)

diff --git a/api/gloo/gateway/v1/external_options.proto b/api/gloo/gateway/v1/external_options.proto
index e54c9c89a..0af8c0e96 100644
--- a/api/gloo/gateway/v1/external_options.proto
+++ b/api/gloo/gateway/v1/external_options.proto
@@ -252,7 +252,7 @@ message RouteOptionSpec {
   repeated core.skv2.solo.io.PolicyTargetReference target_refs = 5;
 }
 
-message ListenerOption {
+message ListenerOptionSpec {
 
 
   // Listener options
@@ -266,7 +266,7 @@ message ListenerOption {
   repeated core.skv2.solo.io.PolicyTargetReferenceWithSectionName target_refs = 3;
 }
 
-message HttpListenerOption {
+message HttpListenerOptionSpec {
 
 
   // HttpListener options
@@ -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;
+}
diff --git a/api/gloo/gateway/v1/gateway.proto b/api/gloo/gateway/v1/gateway.proto
index 5617603fc..0fdfcd847 100644
--- a/api/gloo/gateway/v1/gateway.proto
+++ b/api/gloo/gateway/v1/gateway.proto
@@ -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
@@ -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;
+}
diff --git a/api/gloo/gateway/v1/http_gateway.proto b/api/gloo/gateway/v1/http_gateway.proto
index 9ea54d5db..463167e57 100644
--- a/api/gloo/gateway/v1/http_gateway.proto
+++ b/api/gloo/gateway/v1/http_gateway.proto
@@ -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;
@@ -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.
@@ -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;
-}
\ No newline at end of file
+}
+
+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;
+}