Skip to content

Commit

Permalink
mesh: add ComputedDestinations and controller that computes them
Browse files Browse the repository at this point in the history
  • Loading branch information
ishustava committed Oct 13, 2023
1 parent ab434f9 commit 5361cf9
Show file tree
Hide file tree
Showing 5 changed files with 230 additions and 53 deletions.

This file was deleted.

17 changes: 17 additions & 0 deletions internal/mesh/internal/types/computed_destinations.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// 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 RegisterComputedDestinations(r resource.Registry) {
r.Register(resource.Registration{
Type: pbmesh.ComputedDestinationsType,
Proto: &pbmesh.ComputedDestinations{},
Scope: resource.ScopeNamespace,
})
}
18 changes: 18 additions & 0 deletions proto-public/pbmesh/v2beta1/computed_destinations.pb.binary.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

179 changes: 179 additions & 0 deletions proto-public/pbmesh/v2beta1/computed_destinations.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions proto-public/pbmesh/v2beta1/computed_destinations.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

syntax = "proto3";

package hashicorp.consul.mesh.v2beta1;

import "pbmesh/v2beta1/destinations.proto";
import "pbresource/annotations.proto";

message ComputedDestinations {
option (hashicorp.consul.resource.spec) = {scope: SCOPE_NAMESPACE};

// destinations is the list of explicit destinations to define for the selected workloads.
repeated Destination destinations = 2;
}

0 comments on commit 5361cf9

Please sign in to comment.