From 41960ae998cf4957757075ca7e3b69e1451ac4f5 Mon Sep 17 00:00:00 2001 From: Janki Chhatbar Date: Mon, 19 Jun 2023 21:09:38 +0530 Subject: [PATCH] Register OVN-IC APIs Epic: https://github.com/submariner-io/enhancements/issues/186 Signed-off-by: Janki Chhatbar --- go.mod | 4 +- go.sum | 8 +- pkg/embeddedyamls/generators/yamls2go.go | 2 + pkg/embeddedyamls/yamls.go | 112 +++++++++++++++++++++++ 4 files changed, 120 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 3299dbee7d..f7a2bb164a 100644 --- a/go.mod +++ b/go.mod @@ -14,9 +14,9 @@ require ( github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.65.2 github.com/prometheus-operator/prometheus-operator/pkg/client v0.65.2 github.com/prometheus/client_golang v1.15.1 - github.com/submariner-io/admiral v0.16.0-m0 + github.com/submariner-io/admiral v0.16.0-m0.0.20230602131053-613bd96ec5a2 github.com/submariner-io/shipyard v0.16.0-m0 - github.com/submariner-io/submariner v0.16.0-m0 + github.com/submariner-io/submariner v0.16.0-m0.0.20230605130356-a1fab90349ca github.com/uw-labs/lichen v0.1.7 golang.org/x/text v0.9.0 k8s.io/api v0.27.2 diff --git a/go.sum b/go.sum index 868f4cd808..ecf80f8ab9 100644 --- a/go.sum +++ b/go.sum @@ -1364,12 +1364,12 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/submariner-io/admiral v0.16.0-m0 h1:WVzyoaE6zkPzkhUBiEoS3twK6ccXHDHkRNJ1O81VI/w= -github.com/submariner-io/admiral v0.16.0-m0/go.mod h1:42+8VT+tHo03Cgt8mYh69AJrS3pptKSU5BRckONw+vE= +github.com/submariner-io/admiral v0.16.0-m0.0.20230602131053-613bd96ec5a2 h1:3Z3EoAK+07Ro6UW9RTpB3aehzz4U2dwTh9rq1s/Vg30= +github.com/submariner-io/admiral v0.16.0-m0.0.20230602131053-613bd96ec5a2/go.mod h1:42+8VT+tHo03Cgt8mYh69AJrS3pptKSU5BRckONw+vE= github.com/submariner-io/shipyard v0.16.0-m0 h1:5pw0gTYVGqCLLe3zSEikmqDRScaOriwTcWwYh+HWsZg= github.com/submariner-io/shipyard v0.16.0-m0/go.mod h1:wgnJxga0mr5ujphMnTK6dfz0w0OCqbRVe/fwO+wu2C0= -github.com/submariner-io/submariner v0.16.0-m0 h1:IgP61+RyIDOT4+nSJhDZC4XHx3TSlKDJKci7h33iW7M= -github.com/submariner-io/submariner v0.16.0-m0/go.mod h1:bP/nwcqZLy0dscCW+lN2AOUo39MstjEHicmnkTemDCg= +github.com/submariner-io/submariner v0.16.0-m0.0.20230605130356-a1fab90349ca h1:bdC9W+A3T9p2/ToslHlvlK5MpPr9IUEAPViw6cPMPPo= +github.com/submariner-io/submariner v0.16.0-m0.0.20230605130356-a1fab90349ca/go.mod h1:5KF3Dx6qfOuVK++Plz/W1u/5+kd9Rq7PInZI9IKEtDk= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= diff --git a/pkg/embeddedyamls/generators/yamls2go.go b/pkg/embeddedyamls/generators/yamls2go.go index a66dd1e52d..7e7f3926a5 100644 --- a/pkg/embeddedyamls/generators/yamls2go.go +++ b/pkg/embeddedyamls/generators/yamls2go.go @@ -40,6 +40,8 @@ var files = []string{ "deploy/submariner/crds/submariner.io_clusterglobalegressips.yaml", "deploy/submariner/crds/submariner.io_globalegressips.yaml", "deploy/submariner/crds/submariner.io_globalingressips.yaml", + "deploy/submariner/crds/submariner.io_gatewayroutes.yaml", + "deploy/submariner/crds/submariner.io_nongatewayroutes.yaml", "deploy/mcsapi/crds/multicluster.x_k8s.io_serviceexports.yaml", "deploy/mcsapi/crds/multicluster.x_k8s.io_serviceimports.yaml", "config/broker/broker-admin/service_account.yaml", diff --git a/pkg/embeddedyamls/yamls.go b/pkg/embeddedyamls/yamls.go index 9eb292bfb8..9ca87bf3ca 100644 --- a/pkg/embeddedyamls/yamls.go +++ b/pkg/embeddedyamls/yamls.go @@ -1965,6 +1965,118 @@ spec: storage: true subresources: status: {} +` + Deploy_submariner_crds_submariner_io_gatewayroutes_yaml = `--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.0 + name: gatewayroutes.submariner.io +spec: + group: submariner.io + names: + kind: GatewayRoute + listKind: GatewayRouteList + plural: gatewayroutes + shortNames: + - gwrt + singular: gatewayroute + scope: Namespaced + versions: + - name: v1 + schema: + openAPIV3Schema: + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + nextHops: + description: Specifies the next hops to reach the remote CIDRs + items: + type: string + type: array + remoteCIDRs: + description: Specifies the remote CIDRs available via the next hop + items: + type: string + type: array + required: + - nextHops + - remoteCIDRs + type: object + required: + - spec + type: object + served: true + storage: true +` + Deploy_submariner_crds_submariner_io_nongatewayroutes_yaml = `--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.12.0 + name: nongatewayroutes.submariner.io +spec: + group: submariner.io + names: + kind: NonGatewayRoute + listKind: NonGatewayRouteList + plural: nongatewayroutes + shortNames: + - ngwrt + singular: nongatewayroute + scope: Namespaced + versions: + - name: v1 + schema: + openAPIV3Schema: + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + nextHops: + description: Specifies the next hops to reach the remote CIDRs + items: + type: string + type: array + remoteCIDRs: + description: Specifies the remote CIDRs available via the next hop + items: + type: string + type: array + required: + - nextHops + - remoteCIDRs + type: object + required: + - spec + type: object + served: true + storage: true ` Deploy_mcsapi_crds_multicluster_x_k8s_io_serviceexports_yaml = `apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition