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

in mesh upstreams #10080

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
3 changes: 3 additions & 0 deletions changelog/v1.18.0-beta23/mesh-upstream.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
changelog:
- type: NON_USER_FACING
description: Add `inMesh` to static upstreams. This isn't user facing for OSS Gloo.

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

2 changes: 2 additions & 0 deletions install/helm/gloo/crds/gloo.solo.io_v1_Upstream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1658,6 +1658,8 @@ spec:
type: string
type: object
type: array
inMesh:
type: boolean
serviceSpec:
properties:
graphql:
Expand Down
7 changes: 6 additions & 1 deletion projects/gloo/api/v1/options/static/static.proto
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ message UpstreamSpec {
// If both this and host.sni_addr are set, host.sni_addr has priority.
// defaults to "true".
google.protobuf.BoolValue auto_sni_rewrite = 6;

// In mesh indicates that hosts references ServiceEntries, possibly the
// ServiceEntries derived from VirtualDestination, to route upstream
// traffic.
bool in_mesh = 7;
stevenctl marked this conversation as resolved.
Show resolved Hide resolved
}

// Represents a single instance of an upstream
Expand Down Expand Up @@ -72,4 +77,4 @@ message Host {
// - "envoy.transport_socket_match"
// - "io.solo.health_checkers.advanced_http"
map<string, google.protobuf.Struct> metadata = 6;
}
}
2 changes: 2 additions & 0 deletions projects/gloo/pkg/api/v1/options/static/static.pb.clone.go

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

4 changes: 4 additions & 0 deletions projects/gloo/pkg/api/v1/options/static/static.pb.equal.go

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

89 changes: 51 additions & 38 deletions projects/gloo/pkg/api/v1/options/static/static.pb.go

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

5 changes: 5 additions & 0 deletions projects/gloo/pkg/api/v1/options/static/static.pb.hash.go

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

6 changes: 6 additions & 0 deletions projects/gloo/pkg/plugins/static/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ func (p *plugin) Resolve(u *v1.Upstream) (*url.URL, error) {
if !ok {
return nil, nil
}
if staticSpec.Static.GetInMesh() {
return nil, nil
}
if len(staticSpec.Static.GetHosts()) == 0 {
return nil, errors.Errorf("must provide at least 1 host in static spec")
}
Expand All @@ -74,6 +77,9 @@ func (p *plugin) ProcessUpstream(params plugins.Params, in *v1.Upstream, out *en
// not ours
return nil
}
if staticSpec.Static.GetInMesh() {
return nil
}

spec := staticSpec.Static
var foundSslPort bool
Expand Down
Loading