-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a real connectivity test, creating nginx deployment on one cluster, exporting the service using submariner, and accessing nginx from the second cluster. We run the test in both ways, deploying on dr1 and accessing from dr2, and deploying on dr2 and accessing from dr1. Both tests run concurrently by separating deploy and wait steps. The entire test takes 15 seconds, but on the first run after deploying there is more than 60 seconds delay before service DNS name can be resolved, and the test takes 85 seconds. We don't see any delay when running on the regional-dr environment. Example run with submariner.yaml: $ drenv start envs/submariner.yaml 2023-06-21 18:27:00,108 INFO [submariner] Starting environment 2023-06-21 18:27:00,135 INFO [hub] Starting minikube cluster 2023-06-21 18:27:01,165 INFO [dr1] Starting minikube cluster 2023-06-21 18:27:02,160 INFO [dr2] Starting minikube cluster 2023-06-21 18:27:38,610 INFO [hub] Cluster started in 38.47 seconds 2023-06-21 18:27:38,611 INFO [hub/0] Running addons/submariner/start 2023-06-21 18:27:58,850 INFO [dr1] Cluster started in 57.69 seconds 2023-06-21 18:28:20,728 INFO [dr2] Cluster started in 78.57 seconds 2023-06-21 18:29:10,467 INFO [hub/0] addons/submariner/start completed in 91.86 seconds 2023-06-21 18:29:10,467 INFO [hub/0] Running addons/submariner/test 2023-06-21 18:30:35,047 INFO [hub/0] addons/submariner/test completed in 84.58 seconds 2023-06-21 18:30:35,048 INFO [submariner] Environment started in 214.94 seconds Example run with regional-dr.yaml: $ drenv start envs/regional-dr.yaml 2023-06-21 18:54:05,517 INFO [rdr] Starting environment ... 2023-06-21 18:55:27,894 INFO [hub/1] Running addons/submariner/start ... 2023-06-21 18:59:42,084 INFO [hub/1] addons/submariner/start completed in 254.19 seconds 2023-06-21 18:59:42,084 INFO [hub/1] Running addons/submariner/test ... 2023-06-21 19:00:10,954 INFO [hub/1] addons/submariner/test completed in 28.87 seconds 2023-06-21 19:01:47,030 INFO [rdr] Environment started in 461.51 seconds Signed-off-by: Nir Soffer <nsoffer@redhat.com>
- Loading branch information
Showing
15 changed files
with
374 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# SPDX-FileCopyrightText: The RamenDR authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: nginx | ||
namespace: nginx | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: nginx | ||
template: | ||
metadata: | ||
labels: | ||
app: nginx | ||
spec: | ||
containers: | ||
- image: nginx | ||
name: nginx | ||
ports: | ||
- containerPort: 80 |
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,8 @@ | ||
# SPDX-FileCopyrightText: The RamenDR authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
--- | ||
resources: | ||
- namespace.yaml | ||
- deploy.yaml | ||
- service.yaml |
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,8 @@ | ||
# SPDX-FileCopyrightText: The RamenDR authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: nginx |
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,15 @@ | ||
# SPDX-FileCopyrightText: The RamenDR authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: nginx | ||
namespace: nginx | ||
spec: | ||
ports: | ||
- port: 80 | ||
selector: | ||
app: nginx | ||
type: ClusterIP |
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,7 @@ | ||
# SPDX-FileCopyrightText: The RamenDR authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
--- | ||
resources: | ||
- namespace.yaml | ||
- pod.yaml |
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,8 @@ | ||
# SPDX-FileCopyrightText: The RamenDR authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
--- | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: nginx |
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,20 @@ | ||
# SPDX-FileCopyrightText: The RamenDR authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
# | ||
--- | ||
apiVersion: v1 | ||
kind: Pod | ||
metadata: | ||
name: test | ||
namespace: nginx | ||
spec: | ||
containers: | ||
- name: test | ||
image: quay.io/submariner/nettest | ||
command: | ||
- sh | ||
- -c | ||
- | | ||
trap exit TERM | ||
sleep 300 & | ||
wait |
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,7 @@ | ||
# SPDX-FileCopyrightText: The RamenDR authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
--- | ||
resources: | ||
- ../../base/dst | ||
namespace: ns1 |
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,7 @@ | ||
# SPDX-FileCopyrightText: The RamenDR authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
--- | ||
resources: | ||
- ../../base/src | ||
namespace: ns1 |
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,7 @@ | ||
# SPDX-FileCopyrightText: The RamenDR authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
--- | ||
resources: | ||
- ../../base/dst | ||
namespace: ns2 |
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,7 @@ | ||
# SPDX-FileCopyrightText: The RamenDR authors | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
--- | ||
resources: | ||
- ../../base/src | ||
namespace: ns2 |
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 |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
|
||
import os | ||
import sys | ||
import time | ||
|
||
import drenv | ||
from drenv import cluster as drenv_cluster | ||
|
Oops, something went wrong.