-
Notifications
You must be signed in to change notification settings - Fork 404
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix] add exception for the platform in network policy
- Loading branch information
1 parent
2a95c09
commit 2d5f895
Showing
7 changed files
with
149 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package isolation | ||
|
||
import ( | ||
"github.com/loft-sh/vcluster/test/framework" | ||
"github.com/onsi/ginkgo/v2" | ||
) | ||
|
||
var _ = ginkgo.Describe("test that we can reach pod with a app:loft label", func() { | ||
f := framework.DefaultFramework | ||
|
||
if f.MultiNamespaceMode { | ||
ginkgo.Skip("Isolated mode is not supported in Multi-Namespace mode") | ||
} | ||
|
||
cpod, err := f.CreateCurlPodHost(framework.DefaultFramework.VclusterNamespace, map[string]string{"release": framework.DefaultFramework.VclusterName}) | ||
framework.ExpectNoError(err) | ||
|
||
ginkgo.It("should be able to reach a pod in another ns if it has a app:loft", func() { | ||
_, svc, err := f.CreateHostNginxPodAndService("test-ns", map[string]string{"app": "loft"}) | ||
framework.ExpectNoError(err) | ||
|
||
framework.DefaultFramework.TestHostServiceIsEventuallyReachable(cpod, svc) | ||
}) | ||
|
||
ginkgo.It("should not be able to reach a pod in another ns if it has a app:something", func() { | ||
_, svc, err := f.CreateHostNginxPodAndService("test-ns-2", map[string]string{"app": "something"}) | ||
framework.ExpectNoError(err) | ||
framework.DefaultFramework.TestHostServiceIsEventuallyUnreachable(cpod, svc) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters