-
Notifications
You must be signed in to change notification settings - Fork 353
Chore/11294 build resources using builder functions #15376
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
base: master
Are you sure you want to change the base?
Changes from all commits
74af091
e480fda
6f46998
8eb989e
5d85659
0f269f0
4f6db7e
b99ca87
81ce36d
c595283
3d01178
6491287
cd2253c
82b7b9e
7ccee23
9d6fc30
cb10096
f8fb94f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -4,35 +4,28 @@ import ( | |||||
| "fmt" | ||||||
| "net" | ||||||
|
|
||||||
| . "github.com/onsi/ginkgo/v2" | ||||||
| . "github.com/onsi/gomega" | ||||||
| "golang.org/x/sync/errgroup" | ||||||
|
|
||||||
| config_core "github.com/kumahq/kuma/v2/pkg/config/core" | ||||||
| core_mesh "github.com/kumahq/kuma/v2/pkg/core/resources/apis/mesh" | ||||||
| "github.com/kumahq/kuma/v2/pkg/test/resources/builders" | ||||||
| . "github.com/kumahq/kuma/v2/test/framework" | ||||||
| "github.com/kumahq/kuma/v2/test/framework/client" | ||||||
| "github.com/kumahq/kuma/v2/test/framework/deployments/democlient" | ||||||
| "github.com/kumahq/kuma/v2/test/framework/deployments/testserver" | ||||||
| . "github.com/onsi/ginkgo/v2" | ||||||
| . "github.com/onsi/gomega" | ||||||
| "golang.org/x/sync/errgroup" | ||||||
| ) | ||||||
|
|
||||||
| const nonDefaultMesh = "non-default" | ||||||
|
|
||||||
| func HybridUniversalGlobal() { | ||||||
| meshMTLSOn := ` | ||||||
| type: Mesh | ||||||
| name: %s | ||||||
| mtls: | ||||||
| enabledBackend: ca-1 | ||||||
| backends: | ||||||
| - name: ca-1 | ||||||
| type: builtin | ||||||
| networking: | ||||||
| outbound: | ||||||
| passthrough: %s | ||||||
| routing: | ||||||
| zoneEgress: %s | ||||||
| ` | ||||||
|
|
||||||
| meshMTLOnFn := func(name string, enableNetworkOutBound, enableZoneIngress bool) *core_mesh.MeshResource { | ||||||
| return builders.Mesh().WithName(nonDefaultMesh).WithBuiltinMTLSBackend("ca-1"). | ||||||
|
||||||
| return builders.Mesh().WithName(nonDefaultMesh).WithBuiltinMTLSBackend("ca-1"). | |
| return builders.Mesh().WithName(name).WithBuiltinMTLSBackend("ca-1"). |
Copilot
AI
Jan 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method WithEgressRoutingEnabled() does not exist in the MeshBuilder API. This will cause a compilation error. Remove this line or verify the correct method name.
| WithEgressRoutingEnabled(). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The method only sets the passthrough value when
Networkingis nil. IfNetworkingalready exists, the method silently does nothing, leading to incorrect behavior. The method should always update the passthrough value.