-
Notifications
You must be signed in to change notification settings - Fork 442
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
084dfe1
commit f733ef1
Showing
7 changed files
with
154 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,38 @@ | ||
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") | ||
} | ||
|
||
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) | ||
cpod, err := f.CreateCurlPodHost(framework.DefaultFramework.VclusterNamespace) | ||
framework.ExpectNoError(err) | ||
|
||
framework.DefaultFramework.TestHostServiceIsEventuallyReachable(cpod, svc) | ||
}) | ||
}) | ||
|
||
var _ = ginkgo.Describe("test that we can't reach pod with a app:something label", func() { | ||
f := framework.DefaultFramework | ||
if f.MultiNamespaceMode { | ||
ginkgo.Skip("Isolated mode is not supported in Multi-Namespace mode") | ||
} | ||
|
||
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": "something"}) | ||
framework.ExpectNoError(err) | ||
cpod, err := f.CreateCurlPodHost(framework.DefaultFramework.VclusterNamespace) | ||
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