Skip to content

Commit

Permalink
use mtls
Browse files Browse the repository at this point in the history
  • Loading branch information
czeslavo committed Feb 5, 2024
1 parent c2434e3 commit 44975ec
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ require (
github.com/kong/go-database-reconciler v1.4.0
github.com/kong/go-kong v0.51.1-0.20240125175037-0c077f5b9ac7
github.com/kong/kubernetes-telemetry v0.1.3
github.com/kong/kubernetes-testing-framework v0.44.1-0.20240205140522-212122cacfa5
github.com/kong/kubernetes-testing-framework v0.44.1-0.20240205142508-67728343fd9d
github.com/lithammer/dedent v1.1.0
github.com/miekg/dns v1.1.58
github.com/mitchellh/mapstructure v1.5.0
Expand Down
10 changes: 2 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,8 @@ github.com/kong/go-kong v0.51.1-0.20240125175037-0c077f5b9ac7 h1:/iV93Gwv410lIeJ
github.com/kong/go-kong v0.51.1-0.20240125175037-0c077f5b9ac7/go.mod h1:YNkLvjxfOqS+BZ1J2YWOy/83wc26JM5QJbAukoeg1sY=
github.com/kong/kubernetes-telemetry v0.1.3 h1:Hz2tkHGIIUqbn1x46QRDmmNjbEtJyxyOvHSPne3uPto=
github.com/kong/kubernetes-telemetry v0.1.3/go.mod h1:wB7o8dOKa5R396CyiU0sPa8am/g3c5DKd/qrn/Vmb+k=
github.com/kong/kubernetes-testing-framework v0.44.1-0.20240202145146-bfaba2de4ca0 h1:E2x6ZjxqzsfZrtBbEYEGuW62bw7d5A61C1NcEmTGcEc=
github.com/kong/kubernetes-testing-framework v0.44.1-0.20240202145146-bfaba2de4ca0/go.mod h1:5sfsKs6kF3UiVkQWI8TrX5ZrOTWw6sv/lSVs5JaMJ40=
github.com/kong/kubernetes-testing-framework v0.44.1-0.20240202161102-891d46eaef6f h1:pGecga5/RPhm+/MHtP44fKNT5HfAc3VQG1o9OkbuB4U=
github.com/kong/kubernetes-testing-framework v0.44.1-0.20240202161102-891d46eaef6f/go.mod h1:5sfsKs6kF3UiVkQWI8TrX5ZrOTWw6sv/lSVs5JaMJ40=
github.com/kong/kubernetes-testing-framework v0.44.1-0.20240202161743-711ae3966c1b h1:boBmxgZ1Ay/fhEyz7YUmFFO5U7qVbb97iJwfgM3FNtk=
github.com/kong/kubernetes-testing-framework v0.44.1-0.20240202161743-711ae3966c1b/go.mod h1:5sfsKs6kF3UiVkQWI8TrX5ZrOTWw6sv/lSVs5JaMJ40=
github.com/kong/kubernetes-testing-framework v0.44.1-0.20240205140522-212122cacfa5 h1:nSgV3SzFAQsom2g0EO6uLfhnETsszML6GdzO8j/ttwQ=
github.com/kong/kubernetes-testing-framework v0.44.1-0.20240205140522-212122cacfa5/go.mod h1:5sfsKs6kF3UiVkQWI8TrX5ZrOTWw6sv/lSVs5JaMJ40=
github.com/kong/kubernetes-testing-framework v0.44.1-0.20240205142508-67728343fd9d h1:cacVtkZkeePd6lxwlScIKpWjijCJDqwHc/OLaQ8lfCs=
github.com/kong/kubernetes-testing-framework v0.44.1-0.20240205142508-67728343fd9d/go.mod h1:5sfsKs6kF3UiVkQWI8TrX5ZrOTWw6sv/lSVs5JaMJ40=
github.com/kong/semver/v4 v4.0.1 h1:DIcNR8W3gfx0KabFBADPalxxsp+q/5COwIFkkhrFQ2Y=
github.com/kong/semver/v4 v4.0.1/go.mod h1:LImQ0oT15pJvSns/hs2laLca2zcYoHu5EsSNY0J6/QA=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
Expand Down
7 changes: 7 additions & 0 deletions test/e2e/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,13 @@ func deployIngressWithEchoBackends(ctx context.Context, t *testing.T, env enviro

t.Logf("exposing deployment %s via service", deployment.Name)
service := generators.NewServiceForDeployment(deployment, corev1.ServiceTypeClusterIP)
for i := range service.Spec.Ports {
// Set Service's appProtocol to http so that Kuma load-balances requests on HTTP-level instead of TCP.
// TCP load-balancing proved to cause issues with not distributing load evenly in short time spans like in this test.
// Ref: https://github.com/Kong/kubernetes-ingress-controller/issues/5498
service.Spec.Ports[i].AppProtocol = lo.ToPtr("http")
}

_, err = env.Cluster().Client().CoreV1().Services(corev1.NamespaceDefault).Create(ctx, service, metav1.CreateOptions{})
require.NoError(t, err)
t.Cleanup(func() {
Expand Down
1 change: 1 addition & 0 deletions test/e2e/kuma_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (

func NewKumaAddon() *kuma.Addon {
return kuma.NewBuilder().
WithMTLS().
WithVersion(semver.MustParse("2.6.0")).
Build()
}
Expand Down

0 comments on commit 44975ec

Please sign in to comment.