mirror of https://github.com/hashicorp/consul
Net 7155- Consul API Gateway Controller Stub Work (#20324)
* API Gateway proto * fix lint issue * new line * run make proto format * checkpoint * stub * Update internal/mesh/internal/controllers/apigateways/controller.gopull/20330/head^2
parent
840f11a0c5
commit
37ebaa6920
|
@ -22,6 +22,7 @@ flowchart TD
|
|||
demo/v2/artist
|
||||
hcp/v2/link
|
||||
internal/v1/tombstone
|
||||
mesh/v2beta1/apigateway
|
||||
mesh/v2beta1/computedexplicitdestinations --> catalog/v2beta1/service
|
||||
mesh/v2beta1/computedexplicitdestinations --> catalog/v2beta1/workload
|
||||
mesh/v2beta1/computedexplicitdestinations --> mesh/v2beta1/computedroutes
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
// Copyright (c) HashiCorp, Inc.
|
||||
// SPDX-License-Identifier: BUSL-1.1
|
||||
|
||||
package apigateways
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/hashicorp/consul/internal/controller"
|
||||
pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v2beta1"
|
||||
)
|
||||
|
||||
const (
|
||||
ControllerName = "consul.io/api-gateway"
|
||||
)
|
||||
|
||||
func Controller() *controller.Controller {
|
||||
r := &reconciler{}
|
||||
|
||||
return controller.NewController(ControllerName, pbmesh.APIGatewayType).
|
||||
WithReconciler(r)
|
||||
}
|
||||
|
||||
type reconciler struct{}
|
||||
|
||||
// Reconcile is responsible for creating a Service w/ a MeshGateway owner,
|
||||
// in addition to other things discussed in the RFC.
|
||||
func (r *reconciler) Reconcile(ctx context.Context, rt controller.Runtime, req controller.Request) error {
|
||||
rt.Logger = rt.Logger.With("resource-id", req.ID)
|
||||
rt.Logger.Trace("reconciling api gateway")
|
||||
|
||||
//TODO NET-7378
|
||||
|
||||
return nil
|
||||
}
|
|
@ -5,6 +5,7 @@ package controllers
|
|||
|
||||
import (
|
||||
"context"
|
||||
"github.com/hashicorp/consul/internal/mesh/internal/controllers/apigateways"
|
||||
|
||||
"github.com/hashicorp/consul/internal/mesh/internal/controllers/gatewayproxy"
|
||||
"github.com/hashicorp/consul/internal/mesh/internal/controllers/meshconfiguration"
|
||||
|
@ -57,4 +58,5 @@ func Register(mgr *controller.Manager, deps Dependencies) {
|
|||
|
||||
mgr.Register(meshgateways.Controller())
|
||||
mgr.Register(meshconfiguration.Controller())
|
||||
mgr.Register(apigateways.Controller())
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue