From 55f8025471a70db687598def3cb957f8950b6d3f Mon Sep 17 00:00:00 2001 From: Nathan Coleman Date: Tue, 7 Nov 2023 12:04:13 -0500 Subject: [PATCH] Register controller for MeshGateway w/ TODOs for hooks --- internal/mesh/internal/types/mesh_gateway.go | 20 ++++++++++++++++++++ internal/mesh/internal/types/types.go | 1 + 2 files changed, 21 insertions(+) create mode 100644 internal/mesh/internal/types/mesh_gateway.go diff --git a/internal/mesh/internal/types/mesh_gateway.go b/internal/mesh/internal/types/mesh_gateway.go new file mode 100644 index 0000000000000..8da4c3e0f5ec0 --- /dev/null +++ b/internal/mesh/internal/types/mesh_gateway.go @@ -0,0 +1,20 @@ +// Copyright (c) HashiCorp, Inc. +// SPDX-License-Identifier: BUSL-1.1 + +package types + +import ( + "github.com/hashicorp/consul/internal/resource" + pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v2beta1" +) + +func RegisterMeshGateway(r resource.Registry) { + r.Register(resource.Registration{ + Type: pbmesh.MeshGatewayType, + Proto: &pbmesh.MeshGateway{}, + Scope: resource.ScopeCluster, + ACLs: nil, // TODO NET-6423 + Mutate: nil, // TODO NET-6425 + Validate: nil, // TODO NET-6424 + }) +} diff --git a/internal/mesh/internal/types/types.go b/internal/mesh/internal/types/types.go index cf1443aabf18d..69f99c8984ae7 100644 --- a/internal/mesh/internal/types/types.go +++ b/internal/mesh/internal/types/types.go @@ -18,6 +18,7 @@ func Register(r resource.Registry) { RegisterGRPCRoute(r) RegisterDestinationPolicy(r) RegisterComputedRoutes(r) + RegisterMeshGateway(r) // todo (v2): uncomment once we implement it. //RegisterDestinationsConfiguration(r) }