From 603c4c2a291d60105e208b5c7593e4fd04038534 Mon Sep 17 00:00:00 2001 From: Kate Osborn Date: Fri, 1 Apr 2022 09:58:56 -0600 Subject: [PATCH] Disable unsused controllers - Disables Gateway, GatewayClass, and GatewayConfig controllers - Updates README to remove instruction on creating the GatewayConfig resource - Updates CONTRIBUTING file structure to include pkg directory --- CONTRIBUTING.md | 1 + README.md | 6 ------ internal/manager/manager.go | 17 ----------------- 3 files changed, 1 insertion(+), 23 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dc3dc5b1ee..89a97bd8de 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -34,6 +34,7 @@ Follow our [Installation Instructions](README.md#run-nginx-gateway) to get the N * The internal code is found at `internal/` * Build files for Docker are found under `build/` * Deployment yaml files are found at `deploy/` + * External APIs, clients, and SDKs can be found under `pkg/` * We use [Go Modules](https://github.com/golang/go/wiki/Modules) for managing dependencies. * We use [Ginkgo](https://onsi.github.io/ginkgo/) and [Gomega](https://onsi.github.io/gomega/) for our BDD style unit tests. diff --git a/README.md b/README.md index 0145f694d5..643339a3bc 100644 --- a/README.md +++ b/README.md @@ -63,12 +63,6 @@ You can deploy NGINX Kubernetes Gateway on an existing Kubernetes 1.16+ cluster. ``` kubectl apply -k "github.com/kubernetes-sigs/gateway-api/config/crd?ref=v0.4.2" ``` - -1. Install the NGINX Kubernetes Gateway CRDs: - - ``` - kubectl apply -f deploy/manifests/crds - ``` 1. Deploy the NGINX Kubernetes Gateway: diff --git a/internal/manager/manager.go b/internal/manager/manager.go index 6b07501d79..72dffd2af9 100644 --- a/internal/manager/manager.go +++ b/internal/manager/manager.go @@ -12,9 +12,6 @@ import ( "github.com/nginxinc/nginx-kubernetes-gateway/internal/config" "github.com/nginxinc/nginx-kubernetes-gateway/internal/events" - gw "github.com/nginxinc/nginx-kubernetes-gateway/internal/implementations/gateway" - gc "github.com/nginxinc/nginx-kubernetes-gateway/internal/implementations/gatewayclass" - gcfg "github.com/nginxinc/nginx-kubernetes-gateway/internal/implementations/gatewayconfig" hr "github.com/nginxinc/nginx-kubernetes-gateway/internal/implementations/httproute" svc "github.com/nginxinc/nginx-kubernetes-gateway/internal/implementations/service" ngxcfg "github.com/nginxinc/nginx-kubernetes-gateway/internal/nginx/config" @@ -22,7 +19,6 @@ import ( ngxruntime "github.com/nginxinc/nginx-kubernetes-gateway/internal/nginx/runtime" "github.com/nginxinc/nginx-kubernetes-gateway/internal/state" "github.com/nginxinc/nginx-kubernetes-gateway/internal/status" - nginxgwv1alpha1 "github.com/nginxinc/nginx-kubernetes-gateway/pkg/apis/gateway/v1alpha1" "github.com/nginxinc/nginx-kubernetes-gateway/pkg/sdk" ) @@ -34,7 +30,6 @@ var scheme = runtime.NewScheme() func init() { // TO-DO: handle errors returned by the calls bellow _ = gatewayv1alpha2.AddToScheme(scheme) - _ = nginxgwv1alpha1.AddToScheme(scheme) _ = apiv1.AddToScheme(scheme) } @@ -55,18 +50,6 @@ func Start(cfg config.Config) error { return fmt.Errorf("cannot build runtime manager: %w", err) } - err = sdk.RegisterGatewayController(mgr, gw.NewGatewayImplementation(cfg)) - if err != nil { - return fmt.Errorf("cannot register gateway implementation: %w", err) - } - err = sdk.RegisterGatewayClassController(mgr, gc.NewGatewayClassImplementation(cfg)) - if err != nil { - return fmt.Errorf("cannot register gatewayclass implementation: %w", err) - } - err = sdk.RegisterGatewayConfigController(mgr, gcfg.NewGatewayConfigImplementation(cfg)) - if err != nil { - return fmt.Errorf("cannot register gatewayconfig implementation: %w", err) - } err = sdk.RegisterHTTPRouteController(mgr, hr.NewHTTPRouteImplementation(cfg, eventCh)) if err != nil { return fmt.Errorf("cannot register httproute implementation: %w", err)