Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split pbmesh.UpstreamsConfiguration as a resource out of pbmesh.Upstreams #17991

Merged
merged 3 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions internal/mesh/exports.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ var (

// Resource Types for the v1alpha1 version.

ProxyConfigurationV1Alpha1Type = types.ProxyConfigurationV1Alpha1Type
UpstreamsV1Alpha1Type = types.UpstreamsV1Alpha1Type
ProxyConfigurationV1Alpha1Type = types.ProxyConfigurationV1Alpha1Type
UpstreamsV1Alpha1Type = types.UpstreamsV1Alpha1Type
UpstreamsConfigurationV1Alpha1Type = types.UpstreamsConfigurationV1Alpha1Type
)

// RegisterTypes adds all resource types within the "catalog" API group
Expand Down
2 changes: 1 addition & 1 deletion internal/mesh/internal/types/proxy_configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const (
var (
ProxyConfigurationV1Alpha1Type = &pbresource.Type{
Group: GroupName,
GroupVersion: CurrentVersion,
GroupVersion: VersionV1Alpha1,
Kind: ProxyConfigurationKind,
}

Expand Down
1 change: 1 addition & 0 deletions internal/mesh/internal/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ const (
func Register(r resource.Registry) {
RegisterProxyConfiguration(r)
RegisterUpstreams(r)
RegisterUpstreamsConfiguration(r)
}
2 changes: 1 addition & 1 deletion internal/mesh/internal/types/upstreams.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const (
var (
UpstreamsV1Alpha1Type = &pbresource.Type{
Group: GroupName,
GroupVersion: CurrentVersion,
GroupVersion: VersionV1Alpha1,
Kind: UpstreamsKind,
}

Expand Down
32 changes: 32 additions & 0 deletions internal/mesh/internal/types/upstreams_configuration.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package types

import (
"github.com/hashicorp/consul/internal/resource"
pbmesh "github.com/hashicorp/consul/proto-public/pbmesh/v1alpha1"
"github.com/hashicorp/consul/proto-public/pbresource"
)

const (
UpstreamsConfigurationKind = "UpstreamsConfiguration"
)

var (
UpstreamsConfigurationV1Alpha1Type = &pbresource.Type{
Group: GroupName,
GroupVersion: VersionV1Alpha1,
Kind: UpstreamsConfigurationKind,
}

UpstreamsConfigurationType = UpstreamsConfigurationV1Alpha1Type
)

func RegisterUpstreamsConfiguration(r resource.Registry) {
r.Register(resource.Registration{
Type: UpstreamsConfigurationV1Alpha1Type,
Proto: &pbmesh.UpstreamsConfiguration{},
Validate: nil,
})
}

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

Large diffs are not rendered by default.

34 changes: 2 additions & 32 deletions proto-public/pbmesh/v1alpha1/upstreams.pb.binary.go

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

Loading